4

I need to draw a tangent line that intersects a secant line at a right angle outside the circle.

The MWE below correctly renders a circle and a secant line, and labels the intersection points. However, I can't figure out how to reorient the tangent line so it intersects the secant at a 90° angle outside the circle.

Diagram

Questions:

❓ Questions:

  1. Is my secant line and labeling code efficient?
  2. How do I modify the code so the tangent intersects the secant at a right angle outside the circle?

Thank you for taking time to assist me.

mwe:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc,intersections}
\usepackage{amsmath}

\begin{document}

\begin{tikzpicture}[scale=1.5]
    % Draw the circle with a name for intersection calculations
    \draw[thick, name path=circle] (0,0) circle (2);
    
    % Mark the center
    \fill (0,0) circle (1.5pt);
    \node at (0.2,-0.2) {$O$};
    
    % Define the secant line path (extend beyond circle)
    \path[name path=secant] (-1,3) -- (3,-2);
    
    % Find intersection points automatically and store them
    \path[name intersections={of=circle and secant}] 
        (intersection-1) coordinate (A)
        (intersection-2) coordinate (B);
    
    % Extend the secant line beyond the circle in both directions
    \draw[thick, red] (-1,3) -- (3,-2);
    
    % Mark intersection points
    \fill[red] (A) circle (1.5pt) (B) circle (1.5pt);
    
    % Labels for intersection points
    \node at (A) [above right] {$A$};
    \node at (B) [below left] {$B$};
    
    % Define tangent point on the circle
    \coordinate (T) at (1.6, 1.2);  % Point on circle where tangent touches
    
    % Draw tangent line (perpendicular to radius at T)
    % The radius to T has direction (1.6, 1.2), so perpendicular direction is (-1.2, 1.6)
    \draw[thick, blue] ($(T) + 2*(-1.2, 1.6)$) -- ($(T) + 2*(1.2, -1.6)$);
    
    % Mark the tangent point
    \fill[blue] (T) circle (1.5pt);
    \node at (T) [above left] {$T$};
    
\end{tikzpicture}

\end{document}

1 Answer 1

7

You could utilize polar coordinates like this:

\documentclass[
    tikz
    ,border = 1cm
]{standalone}
\begin{document}
    \foreach \thedegree in {5,10,...,360} {
        \begin{tikzpicture}
            \useasboundingbox (-2,-2) rectangle (2,2);
            \draw (0,0) circle[radius = 1];
            \draw 
                (0,0) -- (\thedegree:{cos(\thedegree)})
                (\thedegree:{cos(\thedegree)}) -- ++(\thedegree+90:-2) 
                (\thedegree:{cos(\thedegree)}) -- ++(\thedegree+90:2)
                (0,0) -- (\thedegree+90:1)
                (\thedegree+90:1) -- ++(\thedegree:-2)
                (\thedegree+90:1) -- ++(\thedegree:2)
            ;
        \end{tikzpicture}
    }
\end{document}

output

1
  • 1
    Thank you @Jasper. How I love learning from the masters! Commented 9 hours ago

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.