8

The following code renders a circle circumscribing a triangle. One angle is marked $\theta$. I would like the other angle to be marked $90 - \theta$. There is not room it where it belongs. I am looking for suggestions on "pins" or hooked arrows. In either case, the end of the "pin" or hooked arrow should be at the green dot.

\documentclass{amsart}
\usepackage{amsmath}

\usepackage{tikz}
\usetikzlibrary{calc,intersections}

\begin{document}

\begin{tikzpicture}

%The circle circumscribing \triangle{ABC} is drawn. O is the center of the circle.
%\angle{ABO} and \angle{ACB} are complimentary angles.
\coordinate (O) at (0,0);
\draw (O) circle (1.75);
\draw[fill] (O) circle (1.5pt);
%
\path (190:1.75) coordinate (A) (120:1.75) coordinate (B) (70:1.75) coordinate (C);
\draw (A) -- (B) -- (C) -- cycle;
%
\draw[dashed] (O) -- (A);
\draw[dashed] (O) -- (B);
%


%The mark indicating the measure of \angle{ABO} is drawn. It is labeled \theta.
\draw[draw=blue] let \p1=($(A)-(B)$), \n1={atan(\y1/\x1)} in ($(B)!2.5mm!(O)$) arc (-60:{\n1-180}:0.25);
\draw[draw=blue] let \p1=($(A)-(B)$), \n1={atan(\y1/\x1)} in node[anchor={0.5*((\n1-180)-60)+180}, inner sep=0, font=\tiny] at ($(B) +({0.5*((\n1-180)-60)}:0.3)$){$\theta$};


%The mark indicating the measure of \angle{ABO} is drawn. It is labeled \theta.
\draw[draw=blue] let \p1=($(A)-(C)$), \n1={atan(\y1/\x1)}, \p2=($(B)-(C)$), \n2={atan(\y2/\x2)} in ($(C)!3.5mm!(B)$) arc ({\n2-180}:{\n1-180}:0.35);
\draw[fill=green] let \p1=($(A)-(C)$), \n1={atan(\y1/\x1)}, \p2=($(B)-(C)$), \n2={atan(\y2/\x2)} in ($(C) +({0.5*(\n1+\n2)-180}:0.45)$) circle (1pt);

\end{tikzpicture}

\end{document}

2 Answers 2

10

Here is a proposal. EDIT: I added your own proposal with some tiny modification (made it compile and added looseness).

\documentclass{amsart}
\usepackage{amsmath}

\usepackage{tikz}
\usetikzlibrary{calc,intersections}

\begin{document}

\begin{tikzpicture}

%The circle circumscribing \triangle{ABC} is drawn. O is the center of the circle.
%\angle{ABO} and \angle{ACB} are complimentary angles.
\coordinate (O) at (0,0);
\draw (O) circle (1.75);
\draw[fill] (O) circle (1.5pt);
%
\path (190:1.75) coordinate (A) (120:1.75) coordinate (B) (70:1.75) coordinate (C);
\draw (A) -- (B) -- (C) -- cycle;
%
\draw[dashed] (O) -- (A);
\draw[dashed] (O) -- (B);
%


%The mark indicating the measure of \angle{ABO} is drawn. It is labeled \theta.
\draw[draw=blue] let \p1=($(A)-(B)$), \n1={atan(\y1/\x1)} in ($(B)!2.5mm!(O)$) arc (-60:{\n1-180}:0.25);
\draw[draw=blue] let \p1=($(A)-(B)$), \n1={atan(\y1/\x1)} in node[anchor={0.5*((\n1-180)-60)+180}, inner sep=0, font=\tiny] at ($(B) +({0.5*((\n1-180)-60)}:0.3)$){$\theta$};


%The mark indicating the measure of \angle{ABO} is drawn. It is labeled \theta.
\draw[draw=blue] let \p1=($(A)-(C)$), \n1={atan(\y1/\x1)}, \p2=($(B)-(C)$), \n2={atan(\y2/\x2)} in ($(C)!3.5mm!(B)$) arc ({\n2-180}:{\n1-180}:0.35);
\draw[fill=green] let \p1=($(A)-(C)$), \n1={atan(\y1/\x1)}, \p2=($(B)-(C)$), \n2={atan(\y2/\x2)} in ($(C) +({0.5*(\n1+\n2)-180}:0.45)$) 
coordinate(X) circle (1pt);

\draw[latex-,shorten <=1pt] let \p1=($(A)-(C)$), \n1={atan(\y1/\x1)}, 
\p2=($(B)-(C)$), \n2={\n1+atan(\y2/\x2)} in (X)
to[out={0.5*\n2-180},in=-90,looseness=2] 
++ (-12pt,18pt) node[above]{$90^\circ-\theta$};
\end{tikzpicture}
\end{document}

enter image description here

If you really want a hook, you may want to load the arrows.meta library.

\documentclass{amsart}
\usepackage{amsmath}

\usepackage{tikz}
\usetikzlibrary{calc,intersections,arrows.meta}

\begin{document}

\begin{tikzpicture}

%The circle circumscribing \triangle{ABC} is drawn. O is the center of the circle.
%\angle{ABO} and \angle{ACB} are complimentary angles.
\coordinate (O) at (0,0);
\draw (O) circle (1.75);
\draw[fill] (O) circle (1.5pt);
%
\path (190:1.75) coordinate (A) (120:1.75) coordinate (B) (70:1.75) coordinate (C);
\draw (A) -- (B) -- (C) -- cycle;
%
\draw[dashed] (O) -- (A);
\draw[dashed] (O) -- (B);
%


%The mark indicating the measure of \angle{ABO} is drawn. It is labeled \theta.
\draw[draw=blue] let \p1=($(A)-(B)$), \n1={atan(\y1/\x1)} in ($(B)!2.5mm!(O)$) arc (-60:{\n1-180}:0.25);
\draw[draw=blue] let \p1=($(A)-(B)$), \n1={atan(\y1/\x1)} in node[anchor={0.5*((\n1-180)-60)+180}, inner sep=0, font=\tiny] at ($(B) +({0.5*((\n1-180)-60)}:0.3)$){$\theta$};


%The mark indicating the measure of \angle{ABO} is drawn. It is labeled \theta.
\draw[draw=blue] let \p1=($(A)-(C)$), \n1={atan(\y1/\x1)}, \p2=($(B)-(C)$), \n2={atan(\y2/\x2)} in ($(C)!3.5mm!(B)$) arc ({\n2-180}:{\n1-180}:0.35);
\draw[fill=green] let \p1=($(A)-(C)$), \n1={atan(\y1/\x1)}, \p2=($(B)-(C)$), \n2={atan(\y2/\x2)} in ($(C) +({0.5*(\n1+\n2)-180}:0.45)$) 
coordinate(X) circle (1pt);
\draw[{Hooks[]}-,shorten <=1pt] (X) to[out=90,in=-90] ++ (3pt,18pt)
node[above]{$90^\circ-\theta$};

\end{tikzpicture}

\end{document}

enter image description here

And for completeness: there is an arguably simpler way to draw the angle arcs, namely with the angles library.

\documentclass{amsart}
\usepackage{amsmath}

\usepackage{tikz}
\usetikzlibrary{angles,quotes,plotmarks}

\begin{document}

\begin{tikzpicture}

%The circle circumscribing \triangle{ABC} is drawn. O is the center of the circle.
%\angle{ABO} and \angle{ACB} are complimentary angles.
\coordinate (O) at (0,0);
\draw (O) circle (1.75);
\draw[fill] (O) circle (1.5pt);
%
\path (190:1.75) coordinate (A) (120:1.75) coordinate (B) (70:1.75) coordinate (C);
\draw (A) -- (B) -- (C) -- cycle;
%
\draw[dashed] (O) -- (A);
\draw[dashed] (O) -- (B);
%

\path (A) -- (B) -- (O)
pic [angle radius=2.5mm,font=\tiny,draw,
angle eccentricity=2,"$\theta$"] {angle = A--B--O};

\path (B) -- (C) -- (A)
pic [angle radius=2.5mm,draw=black,
angle eccentricity=2,"{\pgfuseplotmark{*}}" 
{green,name=X,pin=100:{\tiny$90^\circ-\theta$}}] {angle = B--C--A};

\end{tikzpicture}
\end{document}

enter image description here

6
  • The first diagram is close to what I want. See the second diagram from J Leon V.. Can I use something like the following code?
    – user74973
    Commented Aug 1, 2018 at 12:18
  • \draw[latex-,shorten <=1pt] let \p1=($(A)-(C)$), \n1={atan(\y1/\x1)}, \p2=($(B)-(C)$), \n2={atan(\y2/\x2)} in (X) to[out={0.5*(\n1+\n2)-180},in=-90] ++ (3pt,18pt);
    – user74973
    Commented Aug 1, 2018 at 12:19
  • @user74973 I added your nice own proposal to what is now "my" answer ;-)
    – user121799
    Commented Aug 1, 2018 at 13:04
  • Yes, that is the diagram that I wanted. Thanks.
    – user74973
    Commented Aug 1, 2018 at 15:35
  • 1
    @user74973 Good question. I guess it has to do that it is quite a hack to allow some sort of variable names like \n1, TeX usually does not allow numbers in macro names, and the parser tries to parse \n1+\n2 as \n{1+\n2}, which gives rubbish.
    – user121799
    Commented Aug 1, 2018 at 15:38
7

An option using tkz-euclide

RESULT: enter image description here

MWE:

\documentclass[border=2mm]{standalone}
\usepackage{xcolor}
\usepackage{amsmath}
\usepackage{tkz-euclide}
\usetikzlibrary{arrows.meta}
\usetkzobj{all}
\begin{document}
    \begin{tikzpicture}
        % Set limits.
        \tkzInit[xmin=-4,xmax=11,ymax=5, ymin=-5]
        \tkzGrid[sub,color=blue!10!,subxstep=.5,subystep=.5]
        \tkzClip
        %Define principal points.
        \tkzDefPoint(0,0){O}
        \tkzDefShiftPoint[O](70:3){A}
        \tkzDefShiftPoint[O](120:3){B}
        \tkzDefShiftPoint[O](190:3){C}

        %Define principal points.
        \tkzDefPoint(7,0){O'}
        \tkzDefShiftPoint[O'](50:3){A'}
        \tkzDefShiftPoint[O'](120:3){B'}
        \tkzDefShiftPoint[O'](190:3){C'}

        %Draw the circle
        \tkzDrawCircle[R,blue](O,3cm)
        \tkzDrawCircle[R,blue](O',3cm)

        % Draw angles
        \tkzMarkAngle[fill=blue!25,mkpos=.2, size=0.5](C,B,O)
        \tkzMarkAngle[fill=green!25,mkpos=.2, size=0.5](B,A,C)

        \tkzMarkAngle[fill=blue!25,mkpos=.2, size=0.5](C',B',O')
        \tkzMarkAngle[fill=green!25,mkpos=.2, size=0.5](B',A',C')

        % Draw all segments.
        \tkzDrawSegments[thick,dashed](O,C O,B)
        \tkzDrawSegments[thick](C,A B,A B,C)

        \tkzDrawSegments[thick,dashed](O',C' O',B')
        \tkzDrawSegments[thick](C',A' B',A' B',C')

        % Draw specific points.
        \tkzDrawPoints[fill=white,size=7pt](A,B,C)
        \tkzDrawPoints[fill=black,size=12pt](O)

%       \tkzDrawPoints[fill=red,size=10pt](A',B',C')
        \tkzDrawPoints[fill=black,size=12pt](O')

        % Label points
        \tkzLabelPoints[color=blue,opacity=.7,above](A,B) 
        \tkzLabelPoints[color=blue,opacity=.7,left](C)
        \tkzLabelPoints[color=blue,opacity=.7,below =5pt](O)

        % Label angles.
        \tkzLabelAngle[pos = .7](C,B,O){$\theta$}
        \tkzLabelAngle[pos =-1.2, rotate=25](B,A,C){$90-\theta$}

        \tkzLabelAngle[pos = .8](C',B',O'){$\theta$}
%           \tkzLabelAngle[pos =-1.2, rotate=25](B',A',C'){$\theta-90$}

        \draw[thick, Stealth-] (A')++(190:14.pt) to [in=-90,out=190] ++(-1,1.2) node[anchor=south] {$90-\theta$};
        % You can mark the segments
        \tkzMarkSegments[mark=||,pos=0.6](B,O C,O)
    \end{tikzpicture}
\end{document}
3
  • +1. Very very nice also your work.
    – Sebastiano
    Commented Aug 1, 2018 at 8:14
  • I want a diagram like your second diagram ... but using only TikZ code.
    – user74973
    Commented Aug 1, 2018 at 11:38
  • The macros in tkz-euclide in the background are tikz code.
    – J Leon V.
    Commented Aug 1, 2018 at 15:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .