2

This is my first question and this is the first time I am using LaTeX! I know most of the basic symbols and commands, \usepackage{} or \frac{3}{4} and I am using WinEdt as my text editor.

I am looking at a paper called tkz-euclide which contains information about how to draw geometrical figures using the tikz package(in french) and I want to be able to make figures like in the paper and I installed the tikz package. How do I do it? {tkz-euclide}

Here's the problem:

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[scale=.6]
\tkzSetUpLine[line width=2pt,color=orange!80!black]
\tkzSetUpCompass[line width=2pt,color=orange!80!black]
\tkzDefPoint(0,0){O} \tkzDefPoint(2.25,0){A}
\tkzDrawCircle(O,A)
\foreach \i in {0,...,5}{
\tkzDefPointBy[rotation= center O angle 30+60*\i](A) \tkzGetPoint{a\i}
\tkzDefPointBy[rotation= center {a\i} angle 120](O) \tkzGetPoint{b\i}
\tkzDefPointBy[rotation= center {a\i} angle 180](O) \tkzGetPoint{c\i}
\tkzDefPointBy[rotation= center {c\i} angle 120](a\i) \tkzGetPoint{d\i}
\tkzDefPointBy[rotation= center {c\i} angle 60](d\i) \tkzGetPoint{f\i}
\tkzDefPointBy[rotation= center {d\i} angle 60](b\i) \tkzGetPoint{e\i}
\tkzDefPointBy[rotation= center {f\i} angle 60](d\i) \tkzGetPoint{g\i}
\tkzDefPointBy[rotation= center {d\i} angle 60](e\i) \tkzGetPoint{h\i}
\tkzDefPointBy[rotation= center {e\i} angle 180](b\i) \tkzGetPoint{k\i}
\tkzDrawCircle(a\i,O) \tkzDrawCircle(b\i,a\i)
\tkzDrawCircle(c\i,a\i)
\tkzDrawArc[rotate](f\i,d\i)(-120)
\tkzDrawArc[rotate](e\i,d\i)(180)
\tkzDrawArc[rotate](d\i,f\i)(180)
\tkzDrawArc[rotate](g\i,f\i)(60)
\tkzDrawArc[rotate](h\i,d\i)(60)
\tkzDrawArc[rotate](k\i,e\i)(60) }
\tkzClipCircle(O,f0)
\end{tikzpicture}
\end{document} 

This is the result:

! Undefined control sequence.
l.6 \tkzSetUpLine
                 [line width=2pt,color=orange!80!black]
? 

Process has been terminated ...

This is what it's supposed to look like:Flower

  • 1
    Welcome! You need to load the tikz-euclide package to access its commands. – user121799 Oct 20 '18 at 1:26
  • How do you load the tikz-euclide package? – CuriousEinstein Oct 20 '18 at 1:32
  • 2
    Welcome to TeX.SE! \usepackage{tkz-euclide}. – manooooh Oct 20 '18 at 1:36
2

This works. You also need to say \usetkzobj{all}, which is hard to figure out if you do not speak French.

\documentclass{article}
\usepackage{tkz-euclide}
\usetkzobj{all}

\begin{document}
\begin{tikzpicture}[scale=.6]
\tkzSetUpLine[line width=2pt,color=orange!80!black]
\tkzSetUpCompass[line width=2pt,color=orange!80!black]
\tkzDefPoint(0,0){O} \tkzDefPoint(2.25,0){A}
\tkzDrawCircle(O,A)
\foreach \i in {0,...,5}{
\tkzDefPointBy[rotation= center O angle 30+60*\i](A) \tkzGetPoint{a\i}
\tkzDefPointBy[rotation= center {a\i} angle 120](O) \tkzGetPoint{b\i}
\tkzDefPointBy[rotation= center {a\i} angle 180](O) \tkzGetPoint{c\i}
\tkzDefPointBy[rotation= center {c\i} angle 120](a\i) \tkzGetPoint{d\i}
\tkzDefPointBy[rotation= center {c\i} angle 60](d\i) \tkzGetPoint{f\i}
\tkzDefPointBy[rotation= center {d\i} angle 60](b\i) \tkzGetPoint{e\i}
\tkzDefPointBy[rotation= center {f\i} angle 60](d\i) \tkzGetPoint{g\i}
\tkzDefPointBy[rotation= center {d\i} angle 60](e\i) \tkzGetPoint{h\i}
\tkzDefPointBy[rotation= center {e\i} angle 180](b\i) \tkzGetPoint{k\i}
\tkzDrawCircle(a\i,O) \tkzDrawCircle(b\i,a\i)
\tkzDrawCircle(c\i,a\i)
\tkzDrawArc[rotate](f\i,d\i)(-120)
\tkzDrawArc[rotate](e\i,d\i)(180)
\tkzDrawArc[rotate](d\i,f\i)(180)
\tkzDrawArc[rotate](g\i,f\i)(60)
\tkzDrawArc[rotate](h\i,d\i)(60)
\tkzDrawArc[rotate](k\i,e\i)(60) }
\tkzClipCircle(O,f0)
\end{tikzpicture}
\end{document} 

enter image description here

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.