tikz.dev / tkz-euclide Manual

tkz-euclide

Examples

51 Some interesting examples

51.1 Square root of the integers
Compiled output

Compiled output

\begin{tikzpicture}
\tkzDefPoint(0,0){O}
\tkzDefPoint(1,0){a0}
\tkzDrawSegment(O,a0)
\foreach \i [count=\j] in {0,...,16}{%
\tkzDefPointWith[orthogonal normed](a\i,O)
\tkzGetPoint{a\j}
\pgfmathsetmacro{\c}{5*\i}
\tkzDrawPolySeg[fill=teal!\c](a\i,a\j,O)}
\end{tikzpicture}
51.2 About right triangles
Compiled output

Compiled output

\begin{tikzpicture}[scale=.5]
\tkzDefPoint["$A$" left](2,1){A}
\tkzDefPoint["$B$" right](6,4){B}
\tkzDefPointWith[orthogonal,K=-1](B,A)
\tkzDrawLine[add = .5 and .5](B,tkzPointResult)
\tkzInterLC[R](B,tkzPointResult)(A,8)
\tkzGetPoints{J}{C}
\tkzDrawSegment(A,B)
\tkzDrawPoints(A,B,C)
\tkzCompass(A,C)
\tkzMarkRightAngle(A,B,C)
\tkzDrawLine[color=gray,style=dashed](A,C)
\tkzLabelPoint[above](C){$C$}
\end{tikzpicture}
51.3 Archimedes
Compiled output

Compiled output

\begin{tikzpicture}[scale=1]
\tkzDefPoint(0,0){A}\tkzDefPoint(6,0){D}
\tkzDefPoint(8,0){B}\tkzDefPoint(4,0){I}
\tkzDefLine[orthogonal=through D](A,D)
\tkzInterLC[R](D,tkzPointResult)(I,4) \tkzGetSecondPoint{C}
\tkzDefLine[orthogonal=through C](I,C) \tkzGetPoint{c}
\tkzDefLine[orthogonal=through B](A,B) \tkzGetPoint{b}
\tkzInterLL(C,c)(B,b) \tkzGetPoint{T}
\tkzInterLL(A,T)(C,D) \tkzGetPoint{P}
\tkzDrawArc(I,B)(A)
\tkzDrawSegments(A,B A,T C,D I,C) \tkzDrawSegment[new](I,C)
\tkzDrawLine[add = 1 and 0](C,T) \tkzDrawLine[add = 0 and 1](B,T)
\tkzMarkRightAngle(I,C,T)
\tkzDrawPoints(A,B,I,D,C,T)
\tkzLabelPoints(A,B,I,D) \tkzLabelPoints[above right](C,T)
\tkzMarkSegment[pos=.25,mark=s|](C,D) \tkzMarkSegment[pos=.75,mark=s|](C,D)
\end{tikzpicture}
51.3.1 Square and rectangle of same area; Golden section
Compiled output

Compiled output

\begin{tikzpicture}[scale=.75]
\tkzDefPoint(0,0){D} \tkzDefPoint(8,0){A}
\tkzDefSquare(D,A) \tkzGetPoints{B}{C}
\tkzDefMidPoint(D,A) \tkzGetPoint{E}
\tkzInterLC(D,A)(E,B)\tkzGetSecondPoint{F}
\tkzInterLC[near](B,A)(A,F)\tkzGetFirstPoint{G}
\tkzDefSquare(A,F)\tkzGetFirstPoint{H}
\tkzInterLL(C,D)(H,G)\tkzGetPoint{I}
\tkzFillPolygon[teal!10](I,G,B,C)
\tkzFillPolygon[teal!10](A,F,H,G)
\tkzDrawArc[angles](E,B)(0,120)
\tkzDrawSemiCircle(A,F)
\tkzDrawSegments(A,F E,B H,I F,H)
\tkzDrawPolygons(A,B,C,D)
\tkzDrawPoints(A,...,I)
\tkzLabelPoints[below right](A,E,D,F,I)
\tkzLabelPoints[above right](C,B,G,H)
\end{tikzpicture}
51.3.2 Steiner Line and Simson Line
Compiled output

Compiled output

\begin{tikzpicture}[scale=.75,rotate=-20]
\tkzDefPoint(0,0){B}
\tkzDefPoint(2,4){A} \tkzDefPoint(7,0){C}
\tkzDefCircle[circum](A,B,C)
\tkzGetPoint{O}
\tkzDrawCircle(O,A)
\tkzCalcLength(O,A)
\tkzGetLength{rOA}
\tkzDefShiftPoint[O](40:\rOA){M}
\tkzDefShiftPoint[O](60:\rOA){N}
\tkzDefTriangleCenter[orthic](A,B,C)
\tkzGetPoint{H}
\tkzDefSpcTriangle[orthic,name=H](A,B,C){a,b,c}
\tkzDefPointsBy[reflection=over A--B](M,N){P,P'}
\tkzDefPointsBy[reflection=over A--C](M,N){Q,Q'}
\tkzDefPointsBy[reflection=over C--B](M,N){R,R'}
\tkzDefMidPoint(M,P)\tkzGetPoint{I}
\tkzDefMidPoint(M,Q)\tkzGetPoint{J}
\tkzDefMidPoint(M,R)\tkzGetPoint{K}
\tkzDrawSegments[new](P,R M,P M,Q M,R N,P'
N,Q' N,R' P',R' I,K)
\tkzDrawPolygons(A,B,C)
\tkzDrawPoints(A,B,C,H,M,N,P,Q,R,P',Q',R',I,J,K)
\tkzLabelPoints(A,B,C,H,M,N,P,Q,R,P',Q',R',I,J,K)
\end{tikzpicture}
51.4 Lune of Hippocrates
Compiled output

Compiled output

\begin{tikzpicture}
\tkzInit[xmin=-2,xmax=5,ymin=-1,ymax=6]
\tkzClip % allows you to define a bounding box
% large enough
\tkzDefPoint(0,0){A}\tkzDefPoint(4,0){B}
\tkzDefSquare(A,B)
\tkzGetFirstPoint{C}
\tkzDrawPolygon[fill=green!5](A,B,C)
\begin{scope}
\tkzClipCircle[out](B,A)
\tkzDefMidPoint(C,A) \tkzGetPoint{M}
\tkzDrawSemiCircle[fill=teal!5](M,C)
\end{scope}
\tkzDrawArc[delta=0](B,C)(A)
\end{tikzpicture}
51.5 Lunes of Hasan Ibn al-Haytham
Compiled output

Compiled output

\begin{tikzpicture}[scale=.5,rotate=180]
\tkzInit[xmin=-1,xmax=11,ymin=-4,ymax=7]
\tkzClip
\tkzDefPoints{0/0/A,8/0/B}
\tkzDefTriangle[pythagore,swap](A,B)
\tkzGetPoint{C}
\tkzDrawPolygon[fill=green!5](A,B,C)
\tkzDefMidPoint(C,A) \tkzGetPoint{I}
\begin{scope}
\tkzClipCircle[out](I,A)
\tkzDefMidPoint(B,A) \tkzGetPoint{x}
\tkzDrawSemiCircle[fill=teal!5](x,A)
\tkzDefMidPoint(B,C) \tkzGetPoint{y}
\tkzDrawSemiCircle[fill=teal!5](y,B)
\end{scope}
\tkzSetUpCompass[/tkzcompass/delta=0]
\tkzDefMidPoint(C,A) \tkzGetPoint{z}
\tkzDrawSemiCircle(z,A)
\end{tikzpicture}
51.6 About clipping circles
Compiled output

Compiled output

\begin{tikzpicture}
\tkzInit[xmin=0,xmax=6,ymin=0,ymax=6]
\tkzClip
\tkzDefPoints{0/0/A, 6/0/B}
\tkzDefSquare(A,B) \tkzGetPoints{C}{D}
\tkzDefMidPoint(A,B) \tkzGetPoint{M}
\tkzDefMidPoint(A,D) \tkzGetPoint{N}
\tkzDefMidPoint(B,C) \tkzGetPoint{O}
\tkzDefMidPoint(C,D) \tkzGetPoint{P}
\begin{scope}
\tkzClipCircle[out](M,B) \tkzClipCircle[out](P,D)
\tkzFillPolygon[teal!20](M,N,P,O)
\end{scope}
\begin{scope}
\tkzClipCircle[out](N,A) \tkzClipCircle[out](O,C)
\tkzFillPolygon[teal!20](M,N,P,O)
\end{scope}
\begin{scope}
\tkzClipCircle(P,C) \tkzClipCircle(N,A)
\tkzFillPolygon[teal!20](N,P,D)
\end{scope}
\begin{scope}
\tkzClipCircle(O,C) \tkzClipCircle(P,C)
\tkzFillPolygon[teal!20](P,C,O)
\end{scope}
\begin{scope}
\tkzClipCircle(M,B) \tkzClipCircle(O,B)
\tkzFillPolygon[teal!20](O,B,M)
\end{scope}
\begin{scope}
\tkzClipCircle(N,A) \tkzClipCircle(M,A)
\tkzFillPolygon[teal!20](A,M,N)
\end{scope}
\tkzDrawSemiCircles(M,B N,A O,C P,D)
\tkzDrawPolygons(A,B,C,D M,N,P,O)
\end{tikzpicture}
51.7 Similar isosceles triangles
Compiled output

The following is from the excellent site Descartes et les Mathématiques. I did not modify the text; I only programmed the figures.

http://debart.pagesperso-orange.fr/seconde/triangle.html

Bibliography:

  • Géométrie au Bac - Tangente, special issue no. 8 - Exercise 11, page 11

  • Elisabeth Busser and Gilles Cohen: 200 nouveaux problèmes du "Monde" - POLE 2007 (200 new problems of "Le Monde")

  • Affaire de logique n° 364 - Le Monde February 17, 2004

Two statements were proposed, one by the magazine Tangente and the other by Le Monde.

Editor of the magazine "Tangente": Two similar isosceles triangles \(AXB\) and \(BYC\) are constructed with main vertices \(X\) and \(Y\), such that \(A\), \(B\) and \(C\) are aligned and that these triangles are "indirect". Let \(\alpha\) be the vertex angle \(\widehat{AXB}\) = \(\widehat{BYC}\). We then construct a third isosceles triangle \(XZY\), similar to the first two, with main vertex \(Z\) and "indirect". Prove that the point \(Z\) lies on the straight line \((AC)\).

Editor of "Le Monde": We construct two similar isosceles triangles \(AXB\) and \(BYC\) with principal vertices \(X\) and \(Y\), such that \(A\), \(B\) and \(C\) are aligned and that these triangles are "indirect". Let \(\alpha\) be the vertex angle \(\widehat{AXB}\) = \(\widehat{BYC}\). The point \(Z\) of the segment \([AC]\) is equidistant from the two vertices \(X\) and \(Y\).
At what angle does it see these two vertices?

The constructions and their codes are on the next two pages, but you can search before looking. In both cases, the programming follows my reasoning (I think...).

51.8 Revised version of "Tangente"

Compiled output

\begin{tikzpicture}[scale=.8,rotate=60]
\tkzDefPoint(6,0){X} \tkzDefPoint(3,3){Y}
\tkzDefShiftPoint[X](-110:6){A} \tkzDefShiftPoint[X](-70:6){B}
\tkzDefShiftPoint[Y](-110:4.2){A'} \tkzDefShiftPoint[Y](-70:4.2){B'}
\tkzDefPointBy[translation= from A' to B ](Y) \tkzGetPoint{Y}
\tkzDefPointBy[translation= from A' to B ](B') \tkzGetPoint{C}
\tkzInterLL(A,B)(X,Y) \tkzGetPoint{O}
\tkzDefMidPoint(X,Y) \tkzGetPoint{I}
\tkzDefPointWith[orthogonal](I,Y)
\tkzInterLL(I,tkzPointResult)(A,B) \tkzGetPoint{Z}
\tkzDefCircle[circum](X,Y,B) \tkzGetPoint{O}
\tkzDrawCircle(O,X)
\tkzDrawLines[add = 0 and 1.5](A,C) \tkzDrawLines[add = 0 and 3](X,Y)
\tkzDrawSegments(A,X B,X B,Y C,Y) \tkzDrawSegments[color=red](X,Z Y,Z)
\tkzDrawPoints(A,B,C,X,Y,O,Z)
\tkzLabelPoints(A,B,C,Z) \tkzLabelPoints[above right](X,Y,O)
\end{tikzpicture}
51.9 "Le Monde" version

Compiled output

\begin{tikzpicture}[scale=1.25]
\tkzDefPoint(0,0){A}
\tkzDefPoint(3,0){B}
\tkzDefPoint(9,0){C}
\tkzDefPoint(1.5,2){X}
\tkzDefPoint(6,4){Y}
\tkzDefCircle[circum](X,Y,B) \tkzGetPoint{O}
\tkzDefMidPoint(X,Y) \tkzGetPoint{I}
\tkzDefPointWith[orthogonal](I,Y) \tkzGetPoint{i}
\tkzDrawLines[add = 2 and 1,color=orange](I,i)
\tkzInterLL(I,i)(A,B) \tkzGetPoint{Z}
\tkzInterLC(I,i)(O,B) \tkzGetFirstPoint{M}
\tkzDefPointWith[orthogonal](B,Z) \tkzGetPoint{b}
\tkzDrawCircle(O,B)
\tkzDrawLines[add = 0 and 2,color=orange](B,b)
\tkzDrawSegments(A,X B,X B,Y C,Y A,C X,Y)
\tkzDrawSegments[color=red](X,Z Y,Z)
\tkzDrawPoints(A,B,C,X,Y,Z,M,I)
\tkzLabelPoints(A,B,C,Z)
\tkzLabelPoints[above right](X,Y,M,I)
\end{tikzpicture}
51.10 Triangle altitudes
Compiled output

Compiled output

\begin{tikzpicture}
\tkzDefPoint(0,0){C} \tkzDefPoint(7,0){B}
\tkzDefPoint(5,6){A}
\tkzDefMidPoint(C,B) \tkzGetPoint{I}
\tkzInterLC(A,C)(I,B)
\tkzGetFirstPoint{B'}
\tkzInterLC(A,B)(I,B)
\tkzGetSecondPoint{C'}
\tkzInterLL(B,B')(C,C') \tkzGetPoint{H}
\tkzInterLL(A,H)(C,B) \tkzGetPoint{A'}
\tkzDefCircle[circum](A,B',C') \tkzGetPoint{O}
\tkzDrawArc(I,B)(C)
\tkzDrawPolygon(A,B,C)
\tkzDrawCircle[color=red](O,A)
\tkzDrawSegments[color=orange](B,B' C,C' A,A')
\tkzMarkRightAngles(C,B',B B,C',C C,A',A)
\tkzDrawPoints(A,B,C,A',B',C',H)
\tkzLabelPoints[above right](A,B',C',H)
\tkzLabelPoints[below right](B,C,A')
\end{tikzpicture}
51.11 Altitudes - other construction

Compiled output

\begin{tikzpicture}
\tkzDefPoint(0,0){A} \tkzDefPoint(8,0){B}
\tkzDefPoint(5,6){C}
\tkzDefMidPoint(A,B)\tkzGetPoint{O}
\tkzDefPointBy[projection=onto A--B](C) \tkzGetPoint{P}
\tkzInterLC[common=A](C,A)(O,A)
\tkzGetFirstPoint{M}
\tkzInterLC(C,B)(O,A)
\tkzGetSecondPoint{N}
\tkzInterLL(B,M)(A,N)\tkzGetPoint{I}
\tkzDefCircle[diameter](A,B)\tkzGetPoint{x}
\tkzDefCircle[diameter](I,C)\tkzGetPoint{y}
\tkzDrawCircles(x,A y,C)
\tkzDrawSegments(C,A C,B A,B B,M A,N)
\tkzMarkRightAngles[fill=brown!20](A,M,B A,N,B A,P,C)
\tkzDrawSegment[style=dashed,color=orange](C,P)
\tkzLabelPoints(O,A,B,P)
\tkzLabelPoint[left](M){$M$}
\tkzLabelPoint[right](N){$N$}
\tkzLabelPoint[above](C){$C$}
\tkzLabelPoint[above right](I){$I$}
\tkzDrawPoints[color=red](M,N,P,I)
\tkzDrawPoints[color=brown](O,A,B,C)
\end{tikzpicture}
51.12 Three circles in an equilateral triangle
Compiled output

Compiled output

\begin{tikzpicture}[scale=.8]
\tkzDefPoints{0/0/A,8/0/B,0/4/a,8/4/b,8/8/c}
\tkzDefTriangle[equilateral](A,B) \tkzGetPoint{C}
\tkzDefMidPoint(A,B) \tkzGetPoint{M}
\tkzDefMidPoint(B,C) \tkzGetPoint{N}
\tkzDefMidPoint(A,C) \tkzGetPoint{P}
\tkzInterLL(A,N)(M,a) \tkzGetPoint{Ia}
\tkzDefPointBy[projection = onto A--B](Ia)
\tkzGetPoint{ha}
\tkzInterLL(B,P)(M,b) \tkzGetPoint{Ib}
\tkzDefPointBy[projection = onto A--B](Ib)
\tkzGetPoint{hb}
\tkzInterLL(A,c)(M,C) \tkzGetPoint{Ic}
\tkzDefPointBy[projection = onto A--C](Ic)
\tkzGetPoint{hc}
\tkzInterLL(A,Ia)(B,Ib) \tkzGetPoint{G}
\tkzDefSquare(A,B) \tkzGetPoints{D}{E}
\tkzDrawPolygon(A,B,C)
\tkzClipBB
\tkzDrawSemiCircles[gray,dashed](M,B A,M
A,B B,A G,Ia)
\tkzDrawCircles[gray](Ia,ha Ib,hb Ic,hc)
\tkzDrawPolySeg(A,E,D,B)
\tkzDrawPoints(A,B,C,G,Ia,Ib,Ic)
\tkzDrawSegments[gray,dashed](C,M A,N B,P
M,a M,b A,a a,b b,B A,D Ia,ha)
\end{tikzpicture}
51.13 Law of sines
Compiled output

Compiled output

\begin{tikzpicture}
\tkzDefPoints{0/0/A,5/1/B,2/6/C}
\tkzDefTriangleCenter[circum](A,B,C)
\tkzGetPoint{O}
\tkzDefPointBy[symmetry= center O](B)
\tkzGetPoint{D}
\tkzDrawPolygon[color=brown](A,B,C)
\tkzDrawCircle(O,A)
\tkzDrawPoints(A,B,C,D,O)
\tkzDrawSegments[dashed](B,D A,D)
\tkzLabelPoint[left](D){$D$}
\tkzLabelPoint[below](A){$A$}
\tkzLabelPoint[above](C){$C$}
\tkzLabelPoint[right](B){$B$}
\tkzLabelPoint[below](O){$O$}
\tkzLabelSegment(B,C){$a$}
\tkzLabelSegment[left](A,C){$b$}
\tkzLabelSegment(A,B){$c$}
\end{tikzpicture}

In the triangle \(ABC\):

Compiled output

\[\widehat{C} = \widehat{D}\]

Compiled output

Then

\[ \frac{c}{\sin C} = 2R\]

51.14 Flower of Life
Compiled output

One of the beautiful arrangements of circles found at the Temple of Osiris at Abydos, Egypt (Rawles 1997).
Weisstein, Eric W. "Flower of Life." From MathWorld–A Wolfram Web Resource.
http://mathworld.wolfram.com/FlowerofLife.html

Compiled output

\begin{tikzpicture}[scale=.75]
\tkzSetUpLine[line width=2pt,color=teal!80!black]
\tkzSetUpCompass[line width=2pt,color=teal!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}
51.15 Pentagon in a circle
Compiled output

Compiled output

\begin{tikzpicture}[scale=.75]
\tkzDefPoint(0,0){O}
\tkzDefPoint(5,0){A}
\tkzDefPoint(0,5){B}
\tkzDefPoint(-5,0){C}
\tkzDefPoint(0,-5){D}
\tkzDefMidPoint(A,O) \tkzGetPoint{I}
\tkzInterLC(I,B)(I,A) \tkzGetPoints{F}{E}
\tkzInterCC(O,C)(B,E) \tkzGetPoints{D3}{D2}
\tkzInterCC(O,C)(B,F) \tkzGetPoints{D4}{D1}
\tkzDrawArc[angles](B,E)(180,360)
\tkzDrawArc[angles](B,F)(220,340)
\tkzDrawLine[add=.5 and .5](B,I)
\tkzDrawCircle(O,A)
\tkzDefCircle[diameter](O,A) \tkzGetPoint{x}
\tkzDrawCircle(x,A)
\tkzDrawSegments(B,D C,A)
\tkzDrawPolygon[new](D,D1,D2,D3,D4)
\tkzDrawPoints(A,...,D,O)
\tkzDrawPoints[new](E,F,I,D1,D2,D4,D3)
\tkzLabelPoints[below left](A,...,D,O)
\tkzLabelPoints[new,below right](I,E,F,D1,D2,D4,D3)
\end{tikzpicture}
51.16 Pentagon in a square
Compiled output

Compiled output

\begin{tikzpicture}[scale=.75]
\tkzDefPoints{0/0/O,-5/-5/A,5/-5/B}
\tkzDefSquare(A,B) \tkzGetPoints{C}{D}
\tkzDefMidPoint(A,B) \tkzGetPoint{F}
\tkzDefMidPoint(C,D) \tkzGetPoint{E}
\tkzDefMidPoint(B,C) \tkzGetPoint{G}
\tkzDefMidPoint(A,D) \tkzGetPoint{K}
\tkzInterLC[near](C,D)(E,B) \tkzGetFirstPoint{T}
\tkzDefMidPoint(D,T) \tkzGetPoint{I}
\tkzInterCC[with nodes](O,D,I)(E,D,I) \tkzGetSecondPoint{H}
\tkzInterLC(O,H)(O,E) \tkzGetSecondPoint{M}
\tkzInterCC(O,E)(E,M) \tkzGetFirstPoint{Q}
\tkzInterCC[with nodes](O,O,E)(Q,E,M) \tkzGetFirstPoint{P}
\tkzInterCC[with nodes](O,O,E)(P,E,M) \tkzGetFirstPoint{N}
\tkzCompasss(O,H E,H)
\tkzDrawArc(E,B)(T)
\tkzDrawPolygons[purple](A,B,C,D M,E,Q,P,N)
\tkzDrawCircle(O,E)
\tkzDrawSegments(T,I O,H E,H E,F G,K)
\tkzDrawPoints(T,M,Q,P,N,I)
\tkzLabelPoints(A,B,O,N,P,Q,M,H)
\tkzLabelPoints[above right](C,D,E,I,T)
\end{tikzpicture}
51.17 Inscribed hexagon
Compiled output
51.17.1 Inscribed hexagon: version 1

Compiled output

\begin{tikzpicture}[scale=.5]
\pgfmathsetmacro{\c}{6}
\tkzDefPoints{0/0/A,\c/0/B}
\tkzDefTriangle[equilateral](A,B)\tkzGetPoint{C}
\tkzDefTriangleCenter[centroid](A,B,C)
\tkzGetPoint{I}
\tkzDefPointBy[homothety=center A ratio 1./3](B)
\tkzGetPoint{c1}
\tkzInterLC(B,C)(I,c1) \tkzGetPoints{a1}{a2}
\tkzInterLC(A,C)(I,c1) \tkzGetPoints{b1}{b2}
\tkzInterLC(A,B)(I,c1) \tkzGetPoints{c1}{c2}
\tkzDrawPolygon(A,B,C)
\tkzDrawCircle[thin,orange](I,c1)
\tkzDrawPolygon[red,thick](a2,a1,b2,b1,c2,c1)
\end{tikzpicture}
51.17.2 Inscribed hexagon: version 2

Compiled output

\begin{tikzpicture}[scale=.5]
\pgfmathsetmacro{\c}{6}
\tkzDefPoints{0/0/A,\c/0/B}
\tkzDefTriangle[equilateral](A,B)\tkzGetPoint{C}
\tkzDefTriangleCenter[centroid](A,B,C)
\tkzGetPoint{I}
\tkzDefPointsBy[rotation= center I
angle 60](A,B,C){a,b,c}
\tkzDrawPolygon[fill=teal!20,opacity=.5](A,B,C)
\tkzDrawPolygon[fill=purple!20,opacity=.5](a,b,c)
\end{tikzpicture}
51.18 Power of a point with respect to a circle
Compiled output

Compiled output

\begin{tikzpicture}
\pgfmathsetmacro{\r}{2}%
\pgfmathsetmacro{\xO}{6}%
\pgfmathsetmacro{\xE}{\xO-\r}%
\tkzDefPoints{0/0/M,\xO/0/O,\xE/0/E}
\tkzDefCircle[diameter](M,O)
\tkzGetPoint{I}
\tkzInterCC(I,O)(O,E) \tkzGetPoints{T}{T'}
\tkzDefShiftPoint[O](45:2){B}
\tkzInterLC(M,B)(O,E) \tkzGetPoints{A}{B}
\tkzDrawCircle(O,E)
\tkzDrawSemiCircle[dashed](I,O)
\tkzDrawLine(M,O)
\tkzDrawLines(M,T O,T M,B)
\tkzDrawPoints(A,B,T)
\tkzLabelPoints[above](A,B,O,M,T)
\end{tikzpicture}
51.19 Radical axis of two non-concentric circles
Compiled output

Compiled output

\begin{tikzpicture}
\tkzDefPoints{0/0/A,4/2/B,2/3/K}
\tkzDefCircle[R](A,1)\tkzGetPoint{a}
\tkzDefCircle[R](B,2)\tkzGetPoint{b}
\tkzDefCircle[R](K,3)\tkzGetPoint{k}
\tkzDrawCircles(A,a B,b)
\tkzDrawCircle[dashed,new](K,k)
\tkzInterCC(A,a)(K,k) \tkzGetPoints{a}{a'}
\tkzInterCC(B,b)(K,k) \tkzGetPoints{b}{b'}
\tkzDrawLines[new,add=2 and 2](a,a')
\tkzDrawLines[new,add=1 and 1](b,b')
\tkzInterLL(a,a')(b,b') \tkzGetPoint{X}
\tkzDefPointBy[projection= onto A--B](X) \tkzGetPoint{H}
\tkzDrawPoints(A,B,H,X,a,b,a',b')
\tkzDrawLine(A,B)
\tkzDrawLine[add= 1 and 2,new](X,H)
\tkzLabelPoints(A,B,H,X,a,b,a',b')
\end{tikzpicture}
51.20 External homothetic center
Compiled output

Compiled output

\begin{tikzpicture}
\tkzDefPoints{0/0/A,4/2/B,2/3/K}
\tkzDefCircle[R](A,1)\tkzGetPoint{a}
\tkzDefCircle[R](B,2)\tkzGetPoint{b}
\tkzDrawCircles(A,a B,b)
\tkzDrawLine(A,B)
\tkzDefShiftPoint[A](60:1){M}
\tkzDefShiftPoint[B](60:2){M'}
\tkzInterLL(A,B)(M,M') \tkzGetPoint{O}
\tkzDefLine[tangent from = O](B,M') \tkzGetPoints{X}{T'}
\tkzDefLine[tangent from = O](A,M) \tkzGetPoints{X}{T}
\tkzDrawPoints(A,B,O,T,T',M,M')
\tkzDrawLines[new](O,B O,T' O,M')
\tkzDrawSegments[new](A,M B,M')
\tkzLabelPoints(A,B,O,T,T',M,M')
\end{tikzpicture}
51.21 Tangent lines to two circles
Compiled output

Compiled output

\begin{tikzpicture}
\pgfmathsetmacro{\r}{1}%
\pgfmathsetmacro{\R}{2}%
\pgfmathsetmacro{\rt}{\R-\r}%
\tkzDefPoints{0/0/A,4/2/B,2/3/K}
\tkzDefMidPoint(A,B) \tkzGetPoint{I}
\tkzInterLC[R](A,B)(B,\rt) \tkzGetPoints{E}{F}
\tkzInterCC(I,B)(B,F) \tkzGetPoints{a}{a'}
\tkzInterLC[R](B,a)(B,\R) \tkzGetPoints{X'}{T'}
\tkzDefLine[tangent at=T'](B) \tkzGetPoint{h}
\tkzInterLL(T',h)(A,B) \tkzGetPoint{O}
\tkzInterLC[R](O,T')(A,\r) \tkzGetPoints{T}{T}
\tkzDefCircle[R](A,\r) \tkzGetPoint{a}
\tkzDefCircle[R](B,\R) \tkzGetPoint{b}
\tkzDefCircle[R](B,\rt) \tkzGetPoint{c}
\tkzDrawCircles(A,a)
\tkzDrawCircles[orange](B,b B,c)
\tkzDrawCircle[orange,dashed](I,B)
\tkzDrawPoints(O,A,B,a,a',E,F,T',T)
\tkzDrawLines(O,B A,a B,T' A,T)
\tkzDrawLines[add= 1 and 8](T',h)
\tkzLabelPoints(O,A,B,a,a',E,F,T,T')
\end{tikzpicture}
51.22 Tangent lines to two circles with radical axis
Compiled output

Compiled output

\begin{tikzpicture}
\tkzDefPoints{0/0/A,4/2/B,2/3/K}
\tkzDefCircle[R](A,1) \tkzGetPoint{a}
\tkzDefCircle[R](B,3) \tkzGetPoint{b}
\tkzInterCC[R](A,1)(K,3) \tkzGetPoints{a}{a'}
\tkzInterCC[R](B,3)(K,3) \tkzGetPoints{b}{b'}
\tkzInterLL(a,a')(b,b') \tkzGetPoint{X}
\tkzDefPointBy[projection= onto A--B](X) \tkzGetPoint{H}
\tkzGetPoint{C}
\tkzInterLC[R](A,B)(B,3) \tkzGetPoints{b1}{E}
\tkzInterLC[R](A,B)(A,1) \tkzGetPoints{D}{a2}
\tkzDefMidPoint(D,E) \tkzGetPoint{I}
\tkzDrawCircle[orange](I,D)
\tkzInterLC(X,H)(I,D) \tkzGetPoints{M}{M'}
\tkzInterLC(M,D)(A,D) \tkzGetPoints{P}{P'}
\tkzInterLC(M,E)(B,E) \tkzGetPoints{Q'}{Q}
\tkzInterLL(P,Q)(A,B) \tkzGetPoint{O}
\tkzDrawCircles(A,a B,b)
\tkzDrawSegments[orange](A,P I,M B,Q)
\tkzDrawPoints(A,B,D,E,M,I,O,P,Q,X,H)
\tkzDrawLines(O,E M,D M,E O,Q)
\tkzDrawLine[add= 3 and 4,orange](X,H)
\tkzLabelPoints(A,B,D,E,M,I,O,P,Q,X,H)
\end{tikzpicture}
51.23 Midpoint of a segment with a compass
Compiled output

Compiled output

\begin{tikzpicture}
\tkzDefPoint(0,0){A}
\tkzDefRandPointOn[circle= center A radius 4] \tkzGetPoint{B}
\tkzDefPointBy[rotation= center A angle 180](B) \tkzGetPoint{C}
\tkzInterCC(A,B)(B,A) \tkzGetPoints{I}{I'}
\tkzInterCC(A,I)(I,A) \tkzGetPoints{J}{B}
\tkzInterCC(B,A)(C,B) \tkzGetPoints{D}{E}
\tkzInterCC(D,B)(E,B) \tkzGetPoints{M}{M'}
\tkzSetUpArc[color=orange,style=solid,delta=10]
\tkzDrawArc(C,D)(E)
\tkzDrawArc(B,E)(D)
\tkzDrawCircle[color=teal,line width=.2pt](A,B)
\tkzDrawArc(D,B)(M)
\tkzDrawArc(E,M)(B)
\tkzCompasss[color=orange,style=solid](B,I I,J J,C)
\tkzDrawPoints(A,B,C,D,E,M)
\tkzLabelPoints(A,B,M)
\end{tikzpicture}
51.24 Definition of a circle, _Apollonius_
Compiled output

Explanation

A circle is the set of points of a plane that are equidistant from a given point \(O\). The distance \(r\) from the center is called the radius, and the point \(O\) is called the center. It is the simplest definition but it is not the only one. Apollonius of Perga gives another definition: The set of all points whose distances from two fixed points are in a constant ratio is a circle.

With tkz-euclide it is easy to illustrate the last definition.

Compiled output

\begin{tikzpicture}[scale=1.5]
% Firstly we defined two fixed point.
% The figure depends of these points and the ratio K
\tkzDefPoint(0,0){A}
\tkzDefPoint(4,0){B}
% tkz-euclide.sty knows about the apollonius's circle
% with K=2 we search some points like I such as IA=2 x IB
\tkzDefCircle[apollonius,K=2](A,B) \tkzGetPoints{K1}{k}
\tkzDefPointOnCircle[through= center K1 angle 30 point k]
\tkzGetPoint{I}
\tkzDefPointOnCircle[through= center K1 angle 280 point k]
\tkzGetPoint{J}
\tkzDrawSegments[new](A,I I,B A,J J,B)
\tkzDrawCircle[color = teal,fill=teal!20,opacity=.4](K1,k)
\tkzDrawPoints(A,B,K1,I,J)
\tkzDrawSegment(A,B)
\tkzLabelPoints[below,font=\scriptsize](A,B,K1,I,J)
\end{tikzpicture}
51.25 Application of Inversion: Pappus chain
Compiled output

Compiled output

\begin{tikzpicture}[ultra thin]
\pgfmathsetmacro{\xB}{6}%
\pgfmathsetmacro{\xC}{9}%
\pgfmathsetmacro{\xD}{(\xC*\xC)/\xB}%
\pgfmathsetmacro{\xJ}{(\xC+\xD)/2}%
\pgfmathsetmacro{\r}{\xD-\xJ}%
\pgfmathsetmacro{\nc}{16}%
\tkzDefPoints{0/0/A,\xB/0/B,\xC/0/C,\xD/0/D}
\tkzDefCircle[diameter](A,C) \tkzGetPoint{x}
\tkzDrawCircle[fill=teal!30](x,C)
\tkzDefCircle[diameter](A,B) \tkzGetPoint{y}
\tkzDrawCircle[fill=teal!30](y,B)
\foreach \i in {-\nc,...,0,...,\nc}
{\tkzDefPoint(\xJ,2*\r*\i){J}
\tkzDefPoint(\xJ,2*\r*\i-\r){H}
\tkzDefCircleBy[inversion = center A through C](J,H)
\tkzDrawCircle[fill=teal](tkzFirstPointResult,tkzSecondPointResult)}
\end{tikzpicture}
51.26 Archimedes, Book of Lemmas, Proposition 1
Compiled output

Compiled output

\begin{tikzpicture}[scale=.75]
\tkzDefPoints{0/0/O_1,0/1/O_2,0/3/A}
\tkzDefPoint(15:3){F}
\tkzDefPointBy[symmetry=center O_1](F) \tkzGetPoint{E}
\tkzDefLine[parallel=through O_2](E,F) \tkzGetPoint{x}
\tkzInterLC(x,O_2)(O_2,A) \tkzGetPoints{D}{C}
\tkzDrawCircles(O_1,A O_2,A)
\tkzDrawSegments[orange](O_1,A E,F C,D)
\tkzDrawSegments[purple](A,E A,F)
\tkzDrawPoints(A,O_1,O_2,E,F,x,C,D)
\tkzLabelPoints(A,O_1,O_2,E,F,x,C,D)
\end{tikzpicture}

\((CD) \parallel (EF)\) and \((AO_1)\) intersects these two lines, so \(\widehat{AO_2C} = \widehat{AO_1E}\).

Since the triangles \(AO_2C\) and \(AO_1E\) are isosceles, their base angles are equal: \(\widehat{ACO_2} = \widehat{AEO_1} = \widehat{CAO_2} = \widehat{EAO_1}\). Thus \(A\), \(C\) and \(E\) are aligned.

51.27 Archimedes, Book of Lemmas, Proposition 6
Compiled output

Compiled output

\begin{tikzpicture}
\tkzDefPoints{0/0/A,12/0/C}
\tkzDefGoldenRatio(A,C) \tkzGetPoint{B}
\tkzDefMidPoint(A,C) \tkzGetPoint{O}
\tkzDefMidPoint(A,B) \tkzGetPoint{O_1}
\tkzDefMidPoint(B,C) \tkzGetPoint{O_2}
\tkzDefExtSimilitudeCenter(O_1,A)(O_2,B) \tkzGetPoint{M_0}
\tkzDefIntSimilitudeCenter(O,A)(O_1,A) \tkzGetPoint{M_1}
\tkzDefIntSimilitudeCenter(O,C)(O_2,C) \tkzGetPoint{M_2}
\tkzInterCC(O_1,A)(M_2,C) \tkzGetFirstPoint{E}
\tkzInterCC(O_2,C)(M_1,A) \tkzGetSecondPoint{F}
\tkzInterCC(O,A)(M_0,B) \tkzGetFirstPoint{D}
\tkzInterLL(O_1,E)(O_2,F) \tkzGetPoint{O_3}
\tkzDefCircle[circum](E,F,B) \tkzGetPoint{0_4}
\tkzInterLC(A,D)(O_1,A) \tkzGetFirstPoint{I}
\tkzInterLC(C,D)(O_2,B) \tkzGetSecondPoint{K}
\tkzInterLC[common=D](A,D)(O_3,D) \tkzGetFirstPoint{G}
\tkzInterLC[common=D](C,D)(O_3,D) \tkzGetFirstPoint{H}
\tkzInterLL(C,G)(B,K) \tkzGetPoint{M}
\tkzInterLL(A,H)(B,I) \tkzGetPoint{L}
\tkzInterLL(L,G)(A,C) \tkzGetPoint{N}
\tkzInterLL(M,H)(A,C) \tkzGetPoint{P}
\tkzDrawCircles[red,thin](O_3,F)
\tkzDrawCircles[new,thin](0_4,B)
\tkzDrawSemiCircles[teal](O,C O_1,B O_2,C)
\tkzDrawSemiCircles[green](M_2,C)
\tkzDrawSemiCircles[green,swap](M_1,A)
\tkzDrawSegment(A,C)
\tkzDrawSegments[new](O_1,O_3 O_2,O_3)
\tkzDrawSegments[new,very thin](B,H C,G A,H G,N H,P)
\tkzDrawSegments[new,very thin](B,D A,D C,D G,H I,B K,B B,G)
\tkzDrawPoints(A,B,C,M_1,M_2,E,O_3,F,D,0_4,O_1,O_2,I,K,G,H,L,P,N,M)
\tkzLabelPoints[font=\scriptsize](A,B,C,M_1,M_2,F,O_1,O_2,I,K,G,H,L,M,N)
\tkzLabelPoints[font=\scriptsize,right](E,O_3,D,0_4,P)
\end{tikzpicture}

Let \(GH\) be the diameter of the circle which is parallel to \(AC\), and let the circle touch the semicircles on \(AC\), \(AB\), \(BC\) in \(D\), \(E\), \(F\) respectively.

Then, by Prop. 1, \(A\), \(G\) and \(D\) are aligned, as well as \(D\), \(H\) and \(C\).
For the same reason, \(A\), \(E\) and \(H\) are aligned, \(C\), \(F\) and \(G\) are aligned, and so are \(B\), \(E\), \(G\) and \(B\), \(F\), \(H\).

Let \((AD)\) meet the semicircle on \([AC]\) at \(I\), and let \((BD)\) meet the semicircle on \([BC]\) in \(K\). Join \(CI\) and \(CK\), meeting \(AE\) and \(BF\) in \(L\) and \(M\), and let \(GL\) and \(HM\), extended, meet \(AB\) in \(N\) and \(P\) respectively.

Now, in the triangle \(AGB\), the perpendiculars from \(A\), \(C\) on the opposite sides meet in \(L\). Therefore by the properties of triangles, \((GN)\) is perpendicular to \((AC)\). Similarly \((HP)\) is perpendicular to \((BC)\).
Again, since the angles at \(I\), \(K\), \(D\) are right, \((CK)\) is parallel to \((AD)\), and \((CI)\) to \((BD)\).

Therefore

\[\frac{AB}{BC} = \frac{AL}{LH} = \frac{AN}{NP} \quad\text{and} \quad \frac{BC}{AB} = \frac{CM}{MG} = \frac{PC}{NP} \]

hence

\[ \frac{AN}{NP} = \frac{NP}{PC} \quad\text{so} \quad {NP}^2 = AN \times PC \]

Now suppose that \(B\) divides \([AC]\) in the golden ratio, that is:

\[\phi = \frac{AB}{BC} = \frac{AC}{AB} \quad\text{then} \quad AN = \phi NP \text{and}\quad NP = \phi PC \]

We have

\[ AC = AN + NP + PC\quad \text{either} \quad AB + BC = = AN + NP + PC \quad \text{or} \quad (\phi + 1) BC = AN + NP + PC \]

we get

\[ (\phi + 1) BC = \phi NP + NP + PC =(\phi + 1)NP + PC = \phi(\phi + 1)PC + PC = {\phi}^2 + \phi + 1)PC \]

as

\[ {\phi}^2 = \phi + 1 \quad \text{then} \quad (\phi + 1) BC = 2(\phi + 1) PC \quad\text{i.e.}\quad BC = 2 PC \]

That is, \(p\) is the midpoint of the segment \(BC\).

Part of the proof from https://www.cut-the-knot.org

51.28 "The" circle of Apollonius
Compiled output

Explanation

The purpose of the first examples was to show how simply these propositions can be recreated. With TikZ you need calculations and trigonometry, while with tkz-euclide you only need to build simple objects.

But don’t forget that TikZ is behind tkz-euclide, and far above it: I am only creating an interface between TikZ and the users of my package.

The last example is very complex; it shows everything that can be done with tkz-euclide.

Compiled output

\begin{tikzpicture}[scale=.6]
\tkzDefPoints{0/0/A,6/0/B,0.8/4/C}
\tkzDefTriangleCenter[euler](A,B,C) \tkzGetPoint{N}
\tkzDefTriangleCenter[circum](A,B,C) \tkzGetPoint{O}
\tkzDefTriangleCenter[lemoine](A,B,C) \tkzGetPoint{K}
\tkzDefTriangleCenter[ortho](A,B,C) \tkzGetPoint{H}
\tkzDefSpcTriangle[excentral,name=J](A,B,C){a,b,c}
\tkzDefSpcTriangle[centroid,name=M](A,B,C){a,b,c}
\tkzDefCircle[in](Ma,Mb,Mc) \tkzGetPoint{Sp} % Sp Spieker center
\tkzDefProjExcenter[name=J](A,B,C)(a,b,c){Y,Z,X}
\tkzDefLine[parallel=through Za](A,B) \tkzGetPoint{Xc}
\tkzInterLL(Za,Xc)(C,B) \tkzGetPoint{C'}
\tkzDefLine[parallel=through Zc](B,C) \tkzGetPoint{Ya}
\tkzInterLL(Zc,Ya)(A,B) \tkzGetPoint{A'}
\tkzDefPointBy[reflection= over Ja--Jc](C')\tkzGetPoint{Ab}
\tkzDefPointBy[reflection= over Ja--Jc](A')\tkzGetPoint{Cb}
\tkzInterLL(K,O)(N,Sp) \tkzGetPoint{Q}
\tkzInterLC(A,B)(Q,Cb) \tkzGetFirstPoint{Ba}
\tkzInterLC(A,C)(Q,Cb) \tkzGetPoints{Ac}{Ca}
\tkzInterLC(B,C')(Q,Cb) \tkzGetFirstPoint{Bc}
\tkzInterLC[next to=Ja](Ja,Q)(Q,Cb) \tkzGetFirstPoint{F'a}
\tkzInterLC[next to=Jc](Jc,Q)(Q,Cb) \tkzGetFirstPoint{F'c}
\tkzInterLC[next to=Jb](Jb,Q)(Q,Cb) \tkzGetFirstPoint{F'b}
\tkzInterLC[common=F'a](Sp,F'a)(Ja,F'a) \tkzGetFirstPoint{Fa}
\tkzInterLC[common=F'b](Sp,F'b)(Jb,F'b) \tkzGetFirstPoint{Fb}
\tkzInterLC[common=F'c](Sp,F'c)(Jc,F'c) \tkzGetFirstPoint{Fc}
\tkzInterLC(Mc,Sp)(Q,Cb) \tkzGetFirstPoint{A''}
\tkzDefCircle[euler](A,B,C) \tkzGetPoints{E}{e}
\tkzDefCircle[ex](C,A,B) \tkzGetPoints{Ea}{a}
\tkzDefCircle[ex](A,B,C) \tkzGetPoints{Eb}{b}
\tkzDefCircle[ex](B,C,A) \tkzGetPoints{Ec}{c}
% Calculations are done, now you can draw, mark and label
\tkzDrawCircles(Q,Cb E,e)%
\tkzDrawCircles(Eb,b Ea,a Ec,c)
\tkzDrawPolygon(A,B,C)
\tkzDrawSegments[dashed](A,A' C,C' A',Zc Za,C' B,Cb B,Ab A,Ca)
\tkzDrawSegments[dashed](C,Ac Ja,Xa Jb,Yb Jc,Zc)
\begin{scope}
\tkzClipCircle(Q,Cb) % We limit the drawing of the lines
\tkzDrawLine[add=5 and 12,orange](K,O)
\tkzDrawLine[add=12 and 28,red!50!black](N,Sp)
\end{scope}
\tkzDrawPoints(A,B,C,K,Ja,Jb,Jc,Q,N,O,Sp,Mc,Xa,Xb,Yb,Yc,Za,Zc)
\tkzDrawPoints(A',C',A'',Ab,Cb,Bc,Ca,Ac,Ba,Fa,Fb,Fc,F'a,F'b,F'c)
\tkzLabelPoints(Ja,Jb,Jc,Q,Xa,Xb,Za,Zc,Ab,Cb,Bc,Ca,Ac,Ba,F'b)
\tkzLabelPoints[above](O,K,F'a,Fa,A'')
\tkzLabelPoints[below](B,F'c,Yc,N,Sp,Fc,Mc)
\tkzLabelPoints[left](A',C',Fb)
\tkzLabelPoints[right](C)
\tkzLabelPoints[below right](A)
\tkzLabelPoints[above right](Yb)
\tkzDrawSegments(Fc,F'c Fb,F'b Fa,F'a)
\tkzDrawSegments[color=green!50!black](Mc,N Mc,A'' A'',Q)
\tkzDrawSegments[color=red,dashed](Ac,Ab Ca,Cb Ba,Bc Ja,Jc A',Cb C',Ab)
\tkzDrawSegments[color=red](Cb,Ab Bc,Ac Ba,Ca A',C')
\tkzMarkSegments[color=red,mark=|](Cb,Ab Bc,Ac Ba,Ca)
\tkzMarkRightAngles(Jc,Zc,A Ja,Xa,B Jb,Yb,C)
\tkzDrawSegments[green,dashed](A,F'a B,F'b C,F'c)
\end{tikzpicture}