Debian Codegraph @

texmf-dist/doc/latex/tkz-euclide/TKZdoc-euclide-others.tex

raw
1 \section{Different authors}
2
3 \subsection{Code from Andrew Swan}
4
5 \begin{tkzexample}[latex=7cm]
6 \begin{tikzpicture}[scale=1.25]
7 \def\radius{4}
8 \def\angle{40}
9 \pgfmathsetmacro{\htan}{tan(\angle)}
10 \tkzDefPoint(0,0){A} \tkzDefPoint(0,\radius){F}
11 \tkzDefPoint(\radius,0){B}
12 \tkzDefPointBy[rotation= center A angle \angle](B)
13 \tkzGetPoint{C}
14 \tkzDefLine[perpendicular=through B,K=1](A,B)
15 \tkzGetPoint{b}
16 \tkzInterLL(A,C)(B,b) \tkzGetPoint{D}
17 \tkzDefLine[perpendicular=through C,K=-1](A,B)
18 \tkzGetPoint{c}
19 \tkzInterLL(C,c)(A,B) \tkzGetPoint{E}
20 \tkzDrawSector[fill=blue,opacity=0.1](A,B)(C)
21 \tkzDrawArc[thin](A,B)(F)
22 \tkzMarkAngle(B,A,C)
23 \tkzLabelAngle[pos=0.8](B,A,C){$x$}
24 \tkzDrawPolygon(A,B,D)
25 \tkzDrawSegments(C,B)
26 \tkzDrawSegments[dashed,thin](C,E)
27 \tkzLabelPoints[below left](A)
28 \tkzLabelPoints[below right](B)
29 \tkzLabelPoints[above](C)
30 \tkzLabelPoints[above right](D)
31 \begin{scope}[/pgf/decoration/raise=5pt]
32 \draw [decorate,decoration={brace,mirror,
33 amplitude=10pt},xshift=0pt,yshift=-4pt]
34 (A) -- (B) node [black,midway,yshift=-20pt]
35 {\footnotesize $1$};
36 \draw [decorate,decoration={brace,amplitude=10pt},
37 xshift=4pt,yshift=0pt]
38 (D) -- (B) node [black,midway,xshift=27pt]
39 {\footnotesize $\tan x$};
40 \draw [decorate,decoration={brace,amplitude=10pt},
41 xshift=4pt,yshift=0pt]
42 (E) -- (C) node [black,midway,xshift=-27pt]
43 {\footnotesize $\sin x$};
44 \end{scope}
45 \end{tikzpicture}
46 \end{tkzexample}
47
48
49 \subsection{Example: Dimitris Kapeta}
50
51 You need in this example to use \tkzname{mkpos=.2} with \tkzcname{tkzMarkAngle} because the measure of $ \widehat{CAM}$ is too small.
52 Another possiblity is to use \tkzcname{tkzFillAngle}.
53
54
55 \begin{tkzexample}[latex=7cm,small]
56 \begin{tikzpicture}[scale=1]
57 \tkzDefPoint(0,0){O}
58 \tkzDefPoint(2.5,0){N}
59 \tkzDefPoint(-4.2,0.5){M}
60 \tkzDefPointBy[rotation=center O angle 30](N)
61 \tkzGetPoint{B}
62 \tkzDefPointBy[rotation=center O angle -50](N)
63 \tkzGetPoint{A}
64 \tkzInterLC[common=B](M,B)(O,B) \tkzGetFirstPoint{C}
65 \tkzInterLC[common=A](M,A)(O,A) \tkzGetFirstPoint{A'}
66 \tkzMarkAngle[mkpos=.2, size=0.5](A,C,B)
67 \tkzMarkAngle[mkpos=.2, size=0.5](A,M,C)
68 \tkzDrawSegments(A,C M,A M,B A,B)
69 \tkzDrawCircle(O,N)
70 \tkzLabelCircle[above left](O,N)(120){%
71 $\mathcal{C}$}
72 \begin{scope}[veclen]
73 \tkzMarkAngle[mkpos=.2, size=1.2](C,A,M)
74 \end{scope}
75 \tkzDrawPoints(O, A, B, M, B, C)
76 \tkzLabelPoints[right](O,A,B)
77 \tkzLabelPoints[above left](M,C)
78 \tkzLabelPoint[below left](A'){$A'$}
79 \end{tikzpicture}
80 \end{tkzexample}
81
82
83 \subsection{Example : John Kitzmiller }
84 Prove that $\dfrac{AC}{CE}=\dfrac{BD}{DF}$.
85
86 Another interesting example from John, you can see how to use some extra options like\\\ \tkzname{decoration} and \tkzname{postaction} from \TIKZ\ with \tkzname{tkz-euclide}.
87
88 \begin{tkzexample}[vbox,small]
89 \begin{tikzpicture}[scale=1.5,decoration={markings,
90 mark=at position 3cm with {\arrow[scale=2]{>}}}]
91 \tkzDefPoints{0/0/E, 6/0/F, 0/1.8/P, 6/1.8/Q, 0/3/R, 6/3/S}
92 \tkzDrawLines[postaction={decorate}](E,F P,Q R,S)
93 \tkzDefPoints{3.5/3/A, 5/3/B}
94 \tkzDrawSegments(E,A F,B)
95 \tkzInterLL(E,A)(P,Q) \tkzGetPoint{C}
96 \tkzInterLL(B,F)(P,Q) \tkzGetPoint{D}
97 \tkzLabelPoints[above right](A,B)
98 \tkzLabelPoints[below](E,F)
99 \tkzLabelPoints[above left](C)
100 \tkzDrawSegments[style=dashed](A,F)
101 \tkzInterLL(A,F)(P,Q) \tkzGetPoint{G}
102 \tkzLabelPoints[above right](D,G)
103 \tkzDrawSegments[color=teal, line width=3pt, opacity=0.4](A,C A,G)
104 \tkzDrawSegments[color=magenta, line width=3pt, opacity=0.4](C,E G,F)
105 \tkzDrawSegments[color=teal, line width=3pt, opacity=0.4](B,D)
106 \tkzDrawSegments[color=magenta, line width=3pt, opacity=0.4](D,F)
107 \end{tikzpicture}
108 \end{tkzexample}
109
110
111 \subsection{Example 1: from Indonesia}
112
113 \begin{tkzexample}[vbox,small]
114 \begin{tikzpicture}[scale=3]
115 \tkzDefPoints{0/0/A,2/0/B}
116 \tkzDefSquare(A,B) \tkzGetPoints{C}{D}
117 \tkzDefPointBy[rotation=center D angle 45](C)\tkzGetPoint{G}
118 \tkzDefSquare(G,D)\tkzGetPoints{E}{F}
119 \tkzInterLL(B,C)(E,F)\tkzGetPoint{H}
120 \tkzFillPolygon[gray!10](D,E,H,C,D)
121 \tkzDrawPolygon(A,...,D)\tkzDrawPolygon(D,...,G)
122 \tkzDrawSegment(B,E)
123 \tkzMarkSegments[mark=|,size=3pt,color=gray](A,B B,C C,D D,A E,F F,G G,D D,E)
124 \tkzMarkSegments[mark=||,size=3pt,color=gray](B,E E,H)
125 \tkzLabelPoints[left](A,D)
126 \tkzLabelPoints[right](B,C,F,H)
127 \tkzLabelPoints[above](G)\tkzLabelPoints[below](E)
128 \tkzMarkRightAngles(D,A,B D,G,F)
129 \end{tikzpicture}
130 \end{tkzexample}
131
132 \subsection{Example 2: from Indonesia}
133 \begin{tkzexample}[vbox,overhang,small]
134 \begin{tikzpicture}[pol/.style={fill=brown!40,opacity=.2},
135 seg/.style={tkzdotted,color=gray}, hidden pt/.style={fill=gray!40},
136 mra/.style={color=gray!70,tkzdotted,/tkzrightangle/size=.2},scale=2]
137 \tkzDefPoints{0/0/A,2.5/0/B,1.33/0.75/D,0/2.5/E,2.5/2.5/F}
138 \tkzDefLine[parallel=through D](A,B) \tkzGetPoint{I1}
139 \tkzDefLine[parallel=through B](A,D) \tkzGetPoint{I2}
140 \tkzInterLL(D,I1)(B,I2) \tkzGetPoint{C}
141 \tkzDefLine[parallel=through E](A,D) \tkzGetPoint{I3}
142 \tkzDefLine[parallel=through D](A,E) \tkzGetPoint{I4}
143 \tkzInterLL(E,I3)(D,I4) \tkzGetPoint{H}
144 \tkzDefLine[parallel=through F](E,H) \tkzGetPoint{I5}
145 \tkzDefLine[parallel=through H](E,F) \tkzGetPoint{I6}
146 \tkzInterLL(F,I5)(H,I6) \tkzGetPoint{G}
147 \tkzDefMidPoint(G,H) \tkzGetPoint{P} \tkzDefMidPoint(G,C) \tkzGetPoint{Q}
148 \tkzDefMidPoint(B,C) \tkzGetPoint{R} \tkzDefMidPoint(A,B) \tkzGetPoint{S}
149 \tkzDefMidPoint(A,E) \tkzGetPoint{T} \tkzDefMidPoint(E,H) \tkzGetPoint{U}
150 \tkzDefMidPoint(A,D) \tkzGetPoint{M} \tkzDefMidPoint(D,C) \tkzGetPoint{N}
151 \tkzInterLL(B,D)(S,R)\tkzGetPoint{L} \tkzInterLL(H,F)(U,P) \tkzGetPoint{K}
152 \tkzDefLine[parallel=through K](D,H) \tkzGetPoint{I7}
153 \tkzInterLL(K,I7)(B,D) \tkzGetPoint{O}
154 \tkzFillPolygon[pol](P,Q,R,S,T,U)
155 \tkzDrawSegments[seg](K,O K,L P,Q R,S T,U C,D H,D A,D M,N B,D)
156 \tkzDrawSegments(E,H B,C G,F G,H G,C Q,R S,T U,P H,F)
157 \tkzDrawPolygon(A,B,F,E)
158 \tkzDrawPoints(A,B,C,E,F,G,H,P,Q,R,S,T,U,K) \tkzDrawPoints[hidden pt](M,N,O,D)
159 \tkzMarkRightAngle[mra](L,O,K)
160 \tkzMarkSegments[mark=|,size=1pt,thick,color=gray](A,S B,S B,R C,R
161 Q,C Q,G G,P H,P E,U H,U E,T A,T)
162 \tkzLabelAngle[pos=.3](K,L,O){$\alpha$}
163 \tkzLabelPoints[below](O,A,S,B) \tkzLabelPoints[above](H,P,G)
164 \tkzLabelPoints[left](T,E) \tkzLabelPoints[right](C,Q)
165 \tkzLabelPoints[above left](U,D,M) \tkzLabelPoints[above right](L,N)
166 \tkzLabelPoints[below right](F,R) \tkzLabelPoints[below left](K)
167 \end{tikzpicture}
168 \end{tkzexample}
169 \newpage
170
171 \subsection{Illustration of the Morley theorem by Nicolas François}
172 \begin{tkzexample}[vbox,small]
173 \begin{tikzpicture}
174 \tkzInit[ymin=-3,ymax=5,xmin=-5,xmax=7]
175 \tkzClip
176 \tkzDefPoints{-2.5/-2/A,2/4/B,5/-1/C}
177 \tkzFindAngle(C,A,B) \tkzGetAngle{anglea}
178 \tkzDefPointBy[rotation=center A angle 1*\anglea/3](C) \tkzGetPoint{TA1}
179 \tkzDefPointBy[rotation=center A angle 2*\anglea/3](C) \tkzGetPoint{TA2}
180 \tkzFindAngle(A,B,C) \tkzGetAngle{angleb}
181 \tkzDefPointBy[rotation=center B angle 1*\angleb/3](A) \tkzGetPoint{TB1}
182 \tkzDefPointBy[rotation=center B angle 2*\angleb/3](A) \tkzGetPoint{TB2}
183 \tkzFindAngle(B,C,A) \tkzGetAngle{anglec}
184 \tkzDefPointBy[rotation=center C angle 1*\anglec/3](B) \tkzGetPoint{TC1}
185 \tkzDefPointBy[rotation=center C angle 2*\anglec/3](B) \tkzGetPoint{TC2}
186 \tkzInterLL(A,TA1)(B,TB2) \tkzGetPoint{U1}
187 \tkzInterLL(A,TA2)(B,TB1) \tkzGetPoint{V1}
188 \tkzInterLL(B,TB1)(C,TC2) \tkzGetPoint{U2}
189 \tkzInterLL(B,TB2)(C,TC1) \tkzGetPoint{V2}
190 \tkzInterLL(C,TC1)(A,TA2) \tkzGetPoint{U3}
191 \tkzInterLL(C,TC2)(A,TA1) \tkzGetPoint{V3}
192 \tkzDrawPolygons(A,B,C U1,U2,U3 V1,V2,V3)
193 \tkzDrawLines[add=2 and 2,very thin,dashed](A,TA1 B,TB1 C,TC1 A,TA2 B,TB2 C,TC2)
194 \tkzDrawPoints(U1,U2,U3,V1,V2,V3)
195 \tkzLabelPoint[left](V1){$s_a$} \tkzLabelPoint[right](V2){$s_b$}
196 \tkzLabelPoint[below](V3){$s_c$} \tkzLabelPoint[above left](A){$A$}
197 \tkzLabelPoints[above right](B,C) \tkzLabelPoint(U1){$t_a$}
198 \tkzLabelPoint[below left](U2){$t_b$} \tkzLabelPoint[above](U3){$t_c$}
199 \end{tikzpicture}
200 \end{tkzexample}
201
202 \newpage
203 \subsection{Gou gu theorem / Pythagorean Theorem by Zhao Shuang}
204 \begin{tikzpicture}
205 \node [mybox,title={Gou gu theorem / Pythagorean Theorem by Zhao Shuang}] (box){%
206 \begin{minipage}{0.90\textwidth}
207 {\emph{Pythagoras was not the first person who discovered this theorem around the world. Ancient China discovered this theorem much earlier than him. So there is another name for the Pythagorean theorem in China, the Gou-Gu theorem.
208 Zhao Shuang was an ancient Chinese mathematician. He rediscovered the “Gou gu therorem”, which is actually the Chinese version of the “Pythagorean theorem”. Zhao Shuang used a method called the “cutting and compensation principle”, he created a picture of “Pythagorean Round Square”
209 Below the figure used to illustrate the proof of the “Gou gu theorem.” (code from Nan Geng)
210 }}
211 \end{minipage}
212 };
213 \end{tikzpicture}
214
215 \begin{tkzexample}[latex=7cm,small]
216 \begin{tikzpicture}[scale=.8]
217 \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){A'}
218 \tkzInterCC[R](A, 5)(A', 3)
219 \tkzGetSecondPoint{B}
220 \tkzDefSquare(A,B) \tkzGetPoints{C}{D}
221 \tkzCalcLength(A,A') \tkzGetLength{lA}
222 \tkzCalcLength(A',B) \tkzGetLength{lB}
223 \pgfmathparse{\lA-\lB}
224 \tkzInterLC[R](A,A')(A',\pgfmathresult)
225 \tkzGetFirstPoint{D'}
226 \tkzDefSquare(D',A')\tkzGetPoints{B'}{C'}
227 \tkzDefLine[orthogonal=through D](D,D')
228 \tkzGetPoint{d}
229 \tkzDefLine[orthogonal=through A](A,A')
230 \tkzGetPoint{a}
231 \tkzDefLine[orthogonal=through C](C,C')
232 \tkzGetPoint{c}
233 \tkzInterLL(D,d)(C,c) \tkzGetPoint{E}
234 \tkzInterLL(D,d)(A,a) \tkzGetPoint{F}
235 \tkzDefSquare(E,F)\tkzGetPoints{G}{H}
236 \tkzDrawPolygons[fill=teal!10](A,B,A' B,C,B'
237 C,D,C' A,D',D)
238 \tkzDrawPolygons(A,B,C,D E,F,G,H)
239 \tkzDrawPolygon[fill=green!10](A',B',C',D')
240 \tkzDrawSegment[dim={$a$,-10pt,}](D,C')
241 \tkzDrawSegment[dim={$b$,-10pt,}](C,C')
242 \tkzDrawSegment[dim={$c$,-10pt,}](C,D)
243 \tkzDrawPoints[size=2](A,B,C,D,A',B',C',D')
244 \tkzLabelPoints[left](A)
245 \tkzLabelPoints[below](B)
246 \tkzLabelPoints[right](C)
247 \tkzLabelPoints[above](D)
248 \tkzLabelPoints[right](A')
249 \tkzLabelPoints[below right](B')
250 \tkzLabelPoints[below left](C')
251 \tkzLabelPoints[below](D')
252 \end{tikzpicture}
253 \end{tkzexample}
254
255 \newpage
256 \subsection{Reuleaux-Triangle}
257 \begin{tikzpicture}
258 \node [mybox,title={Reuleaux-triangle by Stefan Kottwitz}] (box){%
259 \begin{minipage}{0.90\textwidth}
260 {\emph{A well-known classic field of mathematics is geometry.
261 You may know Euclidean geometry from school, with constructions
262 by compass and ruler. Math teachers may be very interested in
263 drawing geometry constructions and explanations. Underlying
264 constructions can help us with general drawings where we would
265 need intersections and tangents of lines and circles, even if
266 it does not look like geometry.
267 So, here, we will remember school geometry drawings.
268 We will use the tkz-euclide package, which works on top of TikZ.
269 We will construct an equilateral triangle.
270 Then we extend it to get a Reuleaux triangle, and add annotations.
271 The code is fully explained in the LaTeX Cookbook, Chapter 10,
272 Advanced Mathematics, Drawing geometry pictures.
273 Stefan Kottwitz
274 }}
275 \end{minipage}
276 };
277 \end{tikzpicture}
278
279 \begin{tkzexample}[vbox,small]
280 \begin{tikzpicture}
281 \tkzDefPoint(0,0){A} \tkzDefPoint(4,1){B}
282 \tkzInterCC(A,B)(B,A) \tkzGetPoints{C}{D}
283 \tkzInterLC(A,B)(B,A) \tkzGetPoints{F}{E}
284 \tkzDrawCircles[dashed](A,B B,A)
285 \tkzDrawPolygons(A,B,C A,E,D)
286 \tkzCompasss[color=red, very thick](A,C B,C A,D B,D)
287 \begin{scope}
288 \tkzSetUpArc[thick,delta=0]
289 \tkzDrawArc[fill=blue!10](A,B)(C)
290 \tkzDrawArc[fill=blue!10](B,C)(A)
291 \tkzDrawArc[fill=blue!10](C,A)(B)
292 \end{scope}
293 \tkzMarkAngles(D,A,E A,E,D)
294 \tkzFillAngles[fill=yellow,opacity=0.5](D,A,E A,E,D)
295 \tkzMarkRightAngle[size=0.65,fill=red!20,opacity=0.2](A,D,E)
296 \tkzLabelAngle[pos=0.7](D,A,E){$\alpha$}
297 \tkzLabelAngle[pos=0.8](A,E,D){$\beta$}
298 \tkzLabelAngle[pos=0.5,xshift=-1.4mm](A,D,D){$90^\circ$}
299 \begin{scope}[font=\small]
300 \tkzLabelSegment[below=0.6cm,align=center](A,B){Reuleaux\\triangle}
301 \tkzLabelSegment[above right,sloped](A,E){hypotenuse}
302 \tkzLabelSegment[below,sloped](D,E){opposite}
303 \tkzLabelSegment[below,sloped](A,D){adjacent}
304 \tkzLabelSegment[below right=4cm](A,E){Thales circle}
305 \end{scope}
306 \tkzLabelPoints[below left](A)
307 \tkzLabelPoints(B,D)
308 \tkzLabelPoint[above](C){$C$}
309 \tkzLabelPoints(E)
310 \tkzDrawPoints(A,...,E)
311
312 \end{tikzpicture}
313 \end{tkzexample}
314
315
316
317
318 \endinput