Three worked Studio TikZ diagrams

By Wildan Bagus Wicaksono · Homepage

Read each problem alongside its figure and TikZ. Use the links below the illustrations to drag the original points in Studio. The construction steps follow the gallery.

Studio TikZ examples

Here are three diagrams I use when teaching olympiad geometry. Read the TikZ alongside each figure, or open the construction in Studio and drag its points.

LaTeX packages

Place these two lines before \begin{document}. The dvipsnames option supplies the named colours used in these diagrams.

\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}

Examples 1 and 3 use \usetikzlibrary{angles} for the angle arcs. The line is included in each code sample.

1. A reflection and two cyclic quadrilaterals

Let $M$ lie on $\overline{AC}$ in triangle $ABC$. Reflect $M$ across $BC$ to obtain $N$. Line $AN$ meets $\overline{BC}$ at $O$, and $A,B,M,O$ are concyclic. If $\angle ABN=56^\circ$, find $\angle CMN$.

Two circles through A and B, a blue 56-degree angle at B, and a dashed red reflection segment MN.
The solid green circle passes through $A,B,M,O$, and the dotted blue circle passes through $A,B,C,N$. The blue arc at $B$ marks $56^\circ$. The dashed segment $MN$ and the arc at $M$ are brick red.

TikZ code

\usetikzlibrary{angles}
\begin{center}
\begin{tikzpicture}[scale=1, font=\small]
    \coordinate (A) at (0, 0);
    \path (A) ++(-0.36, -0.29) node[inner sep=0pt] {$A$};
    \coordinate (B) at (1, 5);
    \path (B) ++(-0.055, 0.32) node[inner sep=0pt] {$B$};
    \coordinate (M) at (2, 0);
    \path (M) ++(0.025, -0.35) node[inner sep=0pt] {$M$};
    \coordinate (C) at (3.65855, 0);
    \path (C) ++(0.33, -0.25) node[inner sep=0pt] {$C$};
    \coordinate (N) at (4.58599, 1.375);
    \path (N) ++(0.32, 0.05) node[inner sep=0pt] {$N$};
    \coordinate (O) at (3.1555, 0.9461);
    \path (O) ++(-0.37, 0.18) node[inner sep=0pt] {$O$};

    \draw[semithick, PineGreen] (1, 2.4) circle (2.6);
    \draw[semithick, MidnightBlue, opacity=0.8, dotted] (1.82927, 2.23415) circle (2.8875);
    \draw[semithick] (A)--(B);
    \draw[semithick] (B)--(C);
    \draw[semithick] (C)--(A);
    \draw[thin] (A)--(N);
    \draw[thin] (B)--(M);
    \draw[thin] (B)--(N);
    \draw[thin] (N)--(C);
    \draw[semithick, BrickRed, dashed] (M)--(N);
    \draw[thick] (M)--(O);
    \pic[draw=MidnightBlue, thick, angle radius=0.39cm] {angle=A--B--N};
    \node[inner sep=0pt, text=MidnightBlue] at (0.49, 4.38) {$56^{\circ}$};
    \pic[draw=BrickRed, thick, angle radius=0.39cm] {angle=C--M--N};

    % Keep printed point radius at 1.5pt when scale changes.
    \pgfgettransformentries{\studioXX}{\studioYX}{\studioXY}{\studioYY}{\studioDX}{\studioDY}
    \pgfmathsetlengthmacro{\studioRadiusTitik}{1.5pt/veclen(\studioXX,\studioYX)}
    \foreach \s in {A,B,M,C,N,O}
        \filldraw (\s) circle (\studioRadiusTitik);
\end{tikzpicture}
\end{center}

Drag the points in example 1 in Studio

2. Three circles on the medians

Let $G$ be the centroid of triangle $ABC$. Let $D,E,F$ be the midpoints of $BC,CA,AB$, respectively, and $D_1,E_1,F_1$ the midpoints of $AG,BG,CG$. Prove that the circumcircles of $D_1EF$, $DE_1F$ and $DEF_1$ have a common point.

The three medians of ABC and three circles through H near AB.
The circumcircle of $D_1EF$ is blue, that of $DE_1F$ is green, and the dashed red circle passes through $D,E,F_1$. Their common point is marked $H$.

TikZ code

\begin{center}
\begin{tikzpicture}[scale=1, font=\small]
    \coordinate (A) at (0, 0);
    \path (A) ++(-0.008, -0.3) node[inner sep=0pt] {$A$};
    \coordinate (B) at (9, 0);
    \path (B) ++(0.06, -0.303) node[inner sep=0pt] {$B$};
    \coordinate (C) at (7.24, 8.24);
    \path (C) ++(0.008, 0.33) node[inner sep=0pt] {$C$};
    \coordinate (D) at (8.12, 4.12);
    \path (D) ++(0.287, 0.04) node[inner sep=0pt] {$D$};
    \coordinate (E) at (3.62, 4.12);
    \path (E) ++(-0.223, 0.215) node[inner sep=0pt] {$E$};
    \coordinate (F) at (4.5, 0);
    \path (F) ++(-0.009, -0.3) node[inner sep=0pt] {$F$};
    \coordinate (G) at (5.41333, 2.74667);
    \path (G) ++(0.123, -0.495) node[inner sep=0pt] {$G$};
    \coordinate (D1) at (2.70667, 1.37333);
    \path (D1) ++(-0.184, -0.454) node[inner sep=0pt] {$D_{1}$};
    \coordinate (E1) at (7.20667, 1.37333);
    \path (E1) ++(0.266, -0.658) node[inner sep=0pt] {$E_{1}$};
    \coordinate (F1) at (6.32667, 5.49333);
    \path (F1) ++(0.415, 0.221) node[inner sep=0pt] {$F_{1}$};
    \coordinate (H) at (6.28748, 0.5786);
    \path (H) ++(0.116, -0.287) node[inner sep=0pt] {$H$};

    \draw[semithick, MidnightBlue] (4.77139, 2.21195) circle (2.22853);
    \draw[semithick, PineGreen] (4.22861, 3.8888) circle (3.89825);
    \draw[semithick, BrickRed, dashed] (5.87, 3.03945) circle (2.49601);
    \draw[thick] (A)--(B);
    \draw[thick] (B)--(C);
    \draw[thick] (C)--(A);
    \draw[thick] (A)--(D);
    \draw[thick] (B)--(E);
    \draw[thick] (C)--(F);
    \draw[thin] (D)--(E);
    \draw[thin] (E)--(H);
    \draw[thin] (H)--(D);
    \draw[thick] (D1)--(H);
    \draw[thick] (H)--(F);

    % Keep printed point radius at 1.5pt when scale changes.
    \pgfgettransformentries{\studioXX}{\studioYX}{\studioXY}{\studioYY}{\studioDX}{\studioDY}
    \pgfmathsetlengthmacro{\studioRadiusTitik}{1.5pt/veclen(\studioXX,\studioYX)}
    \foreach \s in {A,B,C,D,E,F,G,D1,E1,F1,H}
        \filldraw (\s) circle (\studioRadiusTitik);
\end{tikzpicture}
\end{center}

Drag the points in example 2 in Studio

3. A tangent and two medians

Let $\ell$ be the tangent at $C$ to the circumcircle of a non-isosceles triangle $ABC$. Let $D$ and $E$ be the midpoints of $BC$ and $CA$. Lines $AD$ and $BE$ meet $\ell$ at $A_1$ and $B_1$. Line $AB_1$ meets the circumcircle again at $X$, and $BA_1$ meets it again at $Y$. Prove that $X,Y,D,E$ are concyclic.

A blue-shaded triangle, a red tangent at C, two green circles, and three purple angle marks.
A blue fill at 14% opacity marks triangle $ABC$. The brick-red line is tangent to the blue circumcircle at $C$. The two auxiliary circles are green. Purple arcs mark the three angles being compared.

TikZ code

\usetikzlibrary{angles}
\begin{center}
\begin{tikzpicture}[scale=0.8, font=\small]
    \fill[fill=MidnightBlue, fill opacity=0.14] (0, 0)--(0, 5)--(-6, 4)--cycle;
    \coordinate (A) at (0, 0);
    \path (A) ++(0.09, -0.512) node[inner sep=0pt] {$A$};
    \coordinate (B) at (0, 5);
    \path (B) ++(0.368, 0.368) node[inner sep=0pt] {$B$};
    \coordinate (C) at (-6, 4);
    \path (C) ++(-0.52, 0) node[inner sep=0pt] {$C$};
    \coordinate (D) at (-3, 4.5);
    \path (D) ++(-0.373, -0.444) node[inner sep=0pt] {$D$};
    \coordinate (E) at (-3, 2);
    \path (E) ++(0.168, -0.628) node[inner sep=0pt] {$E$};
    \coordinate (A1) at (-4.65672, 6.98507);
    \path (A1) ++(-0.502, 0.135) node[inner sep=0pt] {$A_{1}$};
    \coordinate (B1) at (-10.09091, -5.09091);
    \path (B1) ++(-0.52, 0) node[inner sep=0pt] {$B_{1}$};
    \coordinate (T) at (-3, 10.66667);
    \path (T) ++(0, 0.52) node[inner sep=0pt] {$T$};
    \coordinate (P) at (-3.94872, 5.92308);
    \path (P) ++(-0.715, 0.04) node[inner sep=0pt] {$P$};
    \coordinate (Q) at (-5.16667, -0.16667);
    \path (Q) ++(0.051, -0.578) node[inner sep=0pt] {$Q$};
    \coordinate (X) at (-2.24054, -1.13036);
    \path (X) ++(0, -0.52) node[inner sep=0pt] {$X$};
    \coordinate (Y) at (-2.70955, 6.15503);
    \path (Y) ++(0.368, 0.368) node[inner sep=0pt] {$Y$};

    \draw[thick, MidnightBlue] (-2.66667, 2.5) circle (3.65529);
    \draw[thick, PineGreen, dotted] (-6.41667, 3.25) circle (3.63815);
    \draw[thick, PineGreen] (-4.33333, 3.25) circle (1.82764);
    \draw[thick] (A)--(B);
    \draw[thick] (B)--(C);
    \draw[thick] (C)--(A);
    \draw[thick] (A)--(A1);
    \draw[thick] (B)--(B1);
    \draw[thick, BrickRed] (B1)--(T);
    \draw[thin, dashed] (X)--(T);
    \draw[thin, dashed] (T)--(Q);
    \draw[thick] (E)--(T);
    \draw[thick] (B1)--(A);
    \draw[thick] (B)--(A1);
    \draw[thin, opacity=0.45] (Q)--(P);
    \pic[draw=RoyalPurple, semithick, angle radius=0.39cm] {angle=E--Q--P};
    \pic[draw=RoyalPurple, semithick, angle radius=0.39cm] {angle=E--D--A};
    \pic[draw=RoyalPurple, semithick, angle radius=0.39cm] {angle=B--A--D};

    % Keep printed point radius at 1.5pt when scale changes.
    \pgfgettransformentries{\studioXX}{\studioYX}{\studioXY}{\studioYY}{\studioDX}{\studioDY}
    \pgfmathsetlengthmacro{\studioRadiusTitik}{1.5pt/veclen(\studioXX,\studioYX)}
    \foreach \s in {A,B,C,D,E,A1,B1,T,P,Q,X,Y}
        \filldraw (\s) circle (\studioRadiusTitik);
\end{tikzpicture}
\end{center}

Drag the points in example 3 in Studio

Read the construction steps for all three diagrams

Construct the reflection diagram

  1. Choose Point and click two blank spots to create $A$ and $B$. Make a counterclockwise $56^\circ$ arc centred at $B$, starting at $A$. Choose Point again. Click the other endpoint of the arc for $T$, then click the arc between $A$ and $T$ to place $M$.
  2. Mark the midpoint $H$ of $MT$. Draw $BH$ and $AM$, and call their intersection $C$. Choose Polygon, click $A$, $B$ and $C$, then press Enter to close the triangle. Since $BM=BT$, line $BC$ is the perpendicular bisector of $MT$.
  3. Choose Reflection, click $M$, then click line $BC$ to obtain $N$, coincident with $T$. Intersect $AN$ with $BC$ at $O$. Draw a solid PineGreen circle through $A,B,M$ and a dotted MidnightBlue circle through $A,B,C$.
  4. Add $BM,BN,CN$, a dashed BrickRed segment $MN$, and a heavier segment $MO$. With Angle, mark $\angle ABN$ with an automatic measure and $\angle CMN$ with a red arc. Hide the auxiliary arc, lines, $T$ and $H$. Drag $M$ along its arc and check that the measure at $B$ stays at $56^\circ$.

Download the editable project · Download the TikZ

Construct the three circles on the medians

  1. Choose Polygon, click $A$, $B$ and $C$, then click $A$ again to close the triangle. Mark the midpoints $D,E,F$ of $BC,CA,AB$. Draw medians $AD,BE,CF$. Intersect the first two to obtain $G$.
  2. Mark the midpoints $D_1,E_1,F_1$ of $AG,BG,CG$. Draw the three-point circles through $(D_1,E,F)$, $(D,E_1,F)$ and $(D,E,F_1)$.
  3. The first two circles meet at $F$ and $H$. In the downloadable construction, $H$ is the reflection of $F$ across the line of their centres. This keeps the intended intersection as the triangle changes. Hide the centres and the mirror line.
  4. Add $DE,EH,HD,D_1H,HF$. Move the labels a little where several lines cross. Try the translucent label background if space is tight. Drag $C$ and observe $H$ on the third circle.

Download the editable project · Download the TikZ

Construct the tangent and the medians

  1. Use Polygon to draw $ABC$ and press Enter after the third vertex. Fill $ABC$ with MidnightBlue at 14% opacity, then draw its blue circumcircle. Construct the midpoints $D$ of $BC$ and $E$ of $CA$. Draw the full lines $AD$ and $BE$.
  2. Construct the tangent $\ell$ at $C$. Intersect it with $AD$, $BE$ and $DE$ to obtain $A_1$, $B_1$ and $T$. Use a BrickRed segment from $B_1$ to $T$ to show the tangent.
  3. Intersect $AB_1$ and $BA_1$ again with the circumcircle to find $X$ and $Y$. Use $AD$ and $BE$ similarly for their second intersections $P$ and $Q$.
  4. Draw a dotted PineGreen circle through $D,E,P$ and a solid one through $C,D,E$. Draw $XT,TQ$ dashed and $QP$ thin. Use Angle to mark $\angle EQP$, $\angle EDA$ and $\angle BAD$ in RoyalPurple.

Vary the triangle’s fill opacity and inspect the corresponding fill opacity=0.14 in the initial TikZ. In the object list, reveal the hidden circle through $D,E,X$. Move a triangle vertex and observe $Y$ on this circle. Fit the diagram to see its whole circumference.

Download the editable project · Download the TikZ

Back to the user guide