1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
\input{preamble-standalone.ltx}
\begin{document}
% Ex. No. 112 (Section 18.4.1 : The idea is to inscribe two squares in a semi-circle.)
\begin{tikzpicture}[scale=.75]
\tkzInit[ymax=8,xmax=8]
\tkzClip[space=.25] \tkzDefPoint(0,0){A}
\tkzDefPoint(8,0){B} \tkzDefPoint(4,0){I}
\tkzDefSquare(A,B) \tkzGetPoints{C}{D}
\tkzInterLC(I,C)(I,B) \tkzGetPoints{E'}{E}
\tkzInterLC(I,D)(I,B) \tkzGetPoints{F'}{F}
\tkzDefPointsBy[projection=onto A--B](E,F){H,G}
\tkzDefPointsBy[symmetry = center H](I){J}
\tkzDefSquare(H,J) \tkzGetPoints{K}{L}
\tkzDrawSector[fill=yellow](I,B)(A)
\tkzFillPolygon[color=red!40](H,E,F,G)
\tkzFillPolygon[color=blue!40](H,J,K,L)
\tkzDrawPolySeg[color=red](H,E,F,G)
\tkzDrawPolySeg[color=red](J,K,L)
\tkzDrawPoints(E,G,H,F,J,K,L)
\end{tikzpicture}
\end{document}
|