2

I'm working to produce something that looks like this graphic:

enter image description here

This shows my "hen's scratching" notes from the class I'm in. I've made some progress however, I'm wondering how to tell the tkz-euclide package how to place the calculated point of the equilateral triangle in the "correct" direction. Here is my example code and what it produces.

\documentclass[letterpaper,10pt]{article}
\usepackage{tikz}
\usepackage{tkz-euclide}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture} [scale=0.5]
\coordinate (A) at (0,0);
\coordinate (B) at (3,0);
\coordinate (C) at (3,4);
\draw (A) -- (B) -- (C) -- cycle;
\tkzDefEquilateral(A,C)\tkzGetPoint{D};
\tkzDrawPolygon(A,C,D);
\tkzDefEquilateral(B,C)\tkzGetPoint{E};
\tkzDrawPolygon(B,C,E);
\tkzDefEquilateral(A,B)\tkzGetPoint{F};
\tkzDrawPolygon(A,B,F);
\end{tikzpicture}
\end{figure}
\end{document}

FirstAttempt

So, as you can see, the equilateral triangles are being produced and anchored where I'd like them. However, two of them don't point in the correct direction. How can I fix that?

BTW: I went down the path of using tkz-euclide because I think using these packages will provide me the correct stepping stones to make the circumcircles, and other paraphernalia that's in this drawing from the class handout. If there's a better option, I'm open to it.

4

Just swap the order of the vertices in \tkzDefEquilateral, i.e. \tkzDefEquilateral(C,B) instead of \tkzDefEquilateral(B,C).

enter image description here

\documentclass[letterpaper,10pt]{article}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture} [scale=0.5]
\coordinate (A) at (0,0);
\coordinate (B) at (3,0);
\coordinate (C) at (3,4);
\draw (A) -- (B) -- (C) -- cycle;
\tkzDefEquilateral(A,C)\tkzGetPoint{D};
\tkzDrawPolygon(A,C,D);
\tkzDefEquilateral(C,B)\tkzGetPoint{E};
\tkzDrawPolygon(B,C,E);
\tkzDefEquilateral(B,A)\tkzGetPoint{F};
\tkzDrawPolygon(A,B,F);
\end{tikzpicture}
\end{figure}
\end{document}
  • Thanks. By the way, is there a good, English, manual for tkz-euclide? I googled a bit last night before posting but everything I found said it is written in French. – Andrew Falanga Nov 30 '16 at 15:57
  • @AndrewFalanga I'm only aware of the French one. – Torbjørn T. Nov 30 '16 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.