summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-others.tex
blob: 0548bbaf6ae578003ec0bd88f1c9aacd45f45c9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
\section{Different authors}

\subsection{Code from Andrew Swan}

\begin{tkzexample}[latex=7cm]
\begin{tikzpicture}[scale=1.25]
\def\radius{4}
\def\angle{40}
\pgfmathsetmacro{\htan}{tan(\angle)}
\tkzDefPoint(0,0){A} \tkzDefPoint(0,\radius){F}
\tkzDefPoint(\radius,0){B}
\tkzDefPointBy[rotation= center A angle \angle](B)
\tkzGetPoint{C}
\tkzDefLine[perpendicular=through B,K=1](A,B)
\tkzGetPoint{b}
\tkzInterLL(A,C)(B,b) \tkzGetPoint{D}
\tkzDefLine[perpendicular=through C,K=-1](A,B)
\tkzGetPoint{c}
\tkzInterLL(C,c)(A,B) \tkzGetPoint{E}
\tkzDrawSector[fill=blue,opacity=0.1](A,B)(C)
\tkzDrawArc[thin](A,B)(F)
\tkzMarkAngle(B,A,C)
\tkzLabelAngle[pos=0.8](B,A,C){$x$}
\tkzDrawPolygon(A,B,D)
\tkzDrawSegments(C,B)
\tkzDrawSegments[dashed,thin](C,E)
\tkzLabelPoints[below left](A)
\tkzLabelPoints[below right](B)
\tkzLabelPoints[above](C)
\tkzLabelPoints[above right](D)
\begin{scope}[/pgf/decoration/raise=5pt]
\draw [decorate,decoration={brace,mirror,
   amplitude=10pt},xshift=0pt,yshift=-4pt]
(A) -- (B) node [black,midway,yshift=-20pt]
{\footnotesize $1$};
\draw [decorate,decoration={brace,amplitude=10pt},
       xshift=4pt,yshift=0pt]
(D) -- (B) node [black,midway,xshift=27pt]
{\footnotesize $\tan x$};
\draw [decorate,decoration={brace,amplitude=10pt},
       xshift=4pt,yshift=0pt]
(E) -- (C) node [black,midway,xshift=-27pt]
{\footnotesize $\sin x$};
\end{scope}
\end{tikzpicture}
\end{tkzexample}


\subsection{Example: Dimitris Kapeta}

You need in this example to use \tkzname{mkpos=.2} with \tkzcname{tkzMarkAngle} because the measure of $ \widehat{CAM}$ is too small.
Another possiblity is to use \tkzcname{tkzFillAngle}.


\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=1]
  \tkzDefPoint(0,0){O}
  \tkzDefPoint(2.5,0){N}
  \tkzDefPoint(-4.2,0.5){M}
  \tkzDefPointBy[rotation=center O angle 30](N)
  \tkzGetPoint{B}
  \tkzDefPointBy[rotation=center O angle -50](N)
  \tkzGetPoint{A}
  \tkzInterLC[common=B](M,B)(O,B) \tkzGetFirstPoint{C}
  \tkzInterLC[common=A](M,A)(O,A) \tkzGetFirstPoint{A'}
  \tkzMarkAngle[mkpos=.2, size=0.5](A,C,B)
  \tkzMarkAngle[mkpos=.2, size=0.5](A,M,C)
  \tkzDrawSegments(A,C M,A M,B A,B)
  \tkzDrawCircle(O,N)
  \tkzLabelCircle[above left](O,N)(120){%
                 $\mathcal{C}$}
  \begin{scope}[xfp]
    \tkzMarkAngle[mkpos=.2, size=1.2](C,A,M)
  \end{scope}

  \tkzDrawPoints(O, A, B, M, B, C)
  \tkzLabelPoints[right](O,A,B)
  \tkzLabelPoints[above left](M,C)
  \tkzLabelPoint[below left](A'){$A'$}
\end{tikzpicture}
\end{tkzexample}


\subsection{Example :  John Kitzmiller }
Prove that $\dfrac{AC}{CE}=\dfrac{BD}{DF}$.

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}.

\begin{tkzexample}[vbox,small]
\begin{tikzpicture}[scale=1.5,decoration={markings,
  mark=at position 3cm with {\arrow[scale=2]{>}}}]
  \tkzDefPoints{0/0/E, 6/0/F, 0/1.8/P, 6/1.8/Q, 0/3/R, 6/3/S}
  \tkzDrawLines[postaction={decorate}](E,F P,Q R,S)
  \tkzDefPoints{3.5/3/A, 5/3/B}
  \tkzDrawSegments(E,A F,B)
  \tkzInterLL(E,A)(P,Q) \tkzGetPoint{C}
  \tkzInterLL(B,F)(P,Q) \tkzGetPoint{D}
  \tkzLabelPoints[above right](A,B)
  \tkzLabelPoints[below](E,F)
  \tkzLabelPoints[above left](C)
  \tkzDrawSegments[style=dashed](A,F)
  \tkzInterLL(A,F)(P,Q) \tkzGetPoint{G}
  \tkzLabelPoints[above right](D,G)
  \tkzDrawSegments[color=teal, line width=3pt, opacity=0.4](A,C A,G)
  \tkzDrawSegments[color=magenta, line width=3pt, opacity=0.4](C,E G,F)
  \tkzDrawSegments[color=teal, line width=3pt, opacity=0.4](B,D)
  \tkzDrawSegments[color=magenta, line width=3pt, opacity=0.4](D,F)
\end{tikzpicture}
\end{tkzexample}


\subsection{Example 1: from Indonesia}

\begin{tkzexample}[vbox,small]
\begin{tikzpicture}[scale=3]
   \tkzDefPoints{0/0/A,2/0/B}
   \tkzDefSquare(A,B) \tkzGetPoints{C}{D}
   \tkzDefPointBy[rotation=center D angle 45](C)\tkzGetPoint{G}
   \tkzDefSquare(G,D)\tkzGetPoints{E}{F}
   \tkzInterLL(B,C)(E,F)\tkzGetPoint{H}
   \tkzFillPolygon[gray!10](D,E,H,C,D)
   \tkzDrawPolygon(A,...,D)\tkzDrawPolygon(D,...,G)
   \tkzDrawSegment(B,E)
   \tkzMarkSegments[mark=|,size=3pt,color=gray](A,B B,C C,D D,A E,F F,G G,D D,E)
   \tkzMarkSegments[mark=||,size=3pt,color=gray](B,E E,H)
   \tkzLabelPoints[left](A,D)
   \tkzLabelPoints[right](B,C,F,H)
   \tkzLabelPoints[above](G)\tkzLabelPoints[below](E)
   \tkzMarkRightAngles(D,A,B D,G,F)
\end{tikzpicture}
\end{tkzexample}

\subsection{Example 2: from Indonesia}
\begin{tkzexample}[vbox,overhang,small]
  \begin{tikzpicture}[pol/.style={fill=brown!40,opacity=.2},
      seg/.style={tkzdotted,color=gray}, hidden pt/.style={fill=gray!40},
       mra/.style={color=gray!70,tkzdotted,/tkzrightangle/size=.2},scale=2]
  \tkzDefPoints{0/0/A,2.5/0/B,1.33/0.75/D,0/2.5/E,2.5/2.5/F}
  \tkzDefLine[parallel=through D](A,B)  \tkzGetPoint{I1}
  \tkzDefLine[parallel=through B](A,D)  \tkzGetPoint{I2}
  \tkzInterLL(D,I1)(B,I2)               \tkzGetPoint{C}
  \tkzDefLine[parallel=through E](A,D)  \tkzGetPoint{I3}
  \tkzDefLine[parallel=through D](A,E)  \tkzGetPoint{I4}
  \tkzInterLL(E,I3)(D,I4)               \tkzGetPoint{H}
  \tkzDefLine[parallel=through F](E,H)  \tkzGetPoint{I5}
  \tkzDefLine[parallel=through H](E,F)  \tkzGetPoint{I6}
  \tkzInterLL(F,I5)(H,I6)               \tkzGetPoint{G}
  \tkzDefMidPoint(G,H) \tkzGetPoint{P}  \tkzDefMidPoint(G,C) \tkzGetPoint{Q}
  \tkzDefMidPoint(B,C) \tkzGetPoint{R}  \tkzDefMidPoint(A,B) \tkzGetPoint{S}
  \tkzDefMidPoint(A,E) \tkzGetPoint{T}  \tkzDefMidPoint(E,H) \tkzGetPoint{U}
  \tkzDefMidPoint(A,D) \tkzGetPoint{M}  \tkzDefMidPoint(D,C) \tkzGetPoint{N}
  \tkzInterLL(B,D)(S,R)\tkzGetPoint{L} \tkzInterLL(H,F)(U,P) \tkzGetPoint{K}
  \tkzDefLine[parallel=through K](D,H)  \tkzGetPoint{I7}
  \tkzInterLL(K,I7)(B,D)                \tkzGetPoint{O}
  \tkzFillPolygon[pol](P,Q,R,S,T,U)
  \tkzDrawSegments[seg](K,O K,L P,Q R,S T,U C,D H,D A,D M,N B,D)
  \tkzDrawSegments(E,H B,C G,F G,H G,C Q,R S,T U,P H,F)
  \tkzDrawPolygon(A,B,F,E)
  \tkzDrawPoints(A,B,C,E,F,G,H,P,Q,R,S,T,U,K) \tkzDrawPoints[hidden pt](M,N,O,D)
  \tkzMarkRightAngle[mra](L,O,K)
  \tkzMarkSegments[mark=|,size=1pt,thick,color=gray](A,S B,S B,R C,R
                    Q,C Q,G G,P H,P E,U H,U E,T A,T)
  \tkzLabelAngle[pos=.3](K,L,O){$\alpha$}
  \tkzLabelPoints[below](O,A,S,B)    \tkzLabelPoints[above](H,P,G)
  \tkzLabelPoints[left](T,E)         \tkzLabelPoints[right](C,Q)
  \tkzLabelPoints[above left](U,D,M) \tkzLabelPoints[above right](L,N)
  \tkzLabelPoints[below right](F,R)  \tkzLabelPoints[below left](K)
\end{tikzpicture}
\end{tkzexample}
\newpage

\subsection{Illustration of  the Morley theorem by Nicolas François}
\begin{tkzexample}[vbox,small]
  \begin{tikzpicture}
    \tkzInit[ymin=-3,ymax=5,xmin=-5,xmax=7]
    \tkzClip
    \tkzDefPoints{-2.5/-2/A,2/4/B,5/-1/C}
    \tkzFindAngle(C,A,B) \tkzGetAngle{anglea}
    \tkzDefPointBy[rotation=center A angle 1*\anglea/3](C) \tkzGetPoint{TA1}
    \tkzDefPointBy[rotation=center A angle 2*\anglea/3](C) \tkzGetPoint{TA2}
    \tkzFindAngle(A,B,C) \tkzGetAngle{angleb}
    \tkzDefPointBy[rotation=center B angle 1*\angleb/3](A) \tkzGetPoint{TB1}
    \tkzDefPointBy[rotation=center B angle 2*\angleb/3](A) \tkzGetPoint{TB2}
    \tkzFindAngle(B,C,A) \tkzGetAngle{anglec}
    \tkzDefPointBy[rotation=center C angle 1*\anglec/3](B) \tkzGetPoint{TC1}
    \tkzDefPointBy[rotation=center C angle 2*\anglec/3](B) \tkzGetPoint{TC2}
    \tkzInterLL(A,TA1)(B,TB2) \tkzGetPoint{U1}
    \tkzInterLL(A,TA2)(B,TB1) \tkzGetPoint{V1}
    \tkzInterLL(B,TB1)(C,TC2) \tkzGetPoint{U2}
    \tkzInterLL(B,TB2)(C,TC1) \tkzGetPoint{V2}
    \tkzInterLL(C,TC1)(A,TA2) \tkzGetPoint{U3}
    \tkzInterLL(C,TC2)(A,TA1) \tkzGetPoint{V3}
    \tkzDrawPolygons(A,B,C U1,U2,U3 V1,V2,V3)
    \tkzDrawLines[add=2 and 2,very thin,dashed](A,TA1 B,TB1 C,TC1 A,TA2 B,TB2 C,TC2)
    \tkzDrawPoints(U1,U2,U3,V1,V2,V3)
    \tkzLabelPoint[left](V1){$s_a$} \tkzLabelPoint[right](V2){$s_b$}
    \tkzLabelPoint[below](V3){$s_c$} \tkzLabelPoint[above left](A){$A$}
    \tkzLabelPoints[above right](B,C) \tkzLabelPoint(U1){$t_a$}
    \tkzLabelPoint[below left](U2){$t_b$} \tkzLabelPoint[above](U3){$t_c$}
  \end{tikzpicture}
  \end{tkzexample}

\newpage
\subsection{Gou gu theorem / Pythagorean Theorem by  Zhao Shuang}
\begin{tikzpicture}
\node [mybox,title={Gou gu theorem / Pythagorean Theorem by  Zhao Shuang}] (box){%
\begin{minipage}{0.90\textwidth}
  {\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.
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”
Below the figure used to illustrate the proof of the “Gou gu theorem.”  (code from Nan Geng)
}} 
\end{minipage}
};
\end{tikzpicture}
  
\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=.8]
  \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){A'}
  \tkzInterCC[R](A, 5)(A', 3)
  \tkzGetSecondPoint{B}
  \tkzDefSquare(A,B)   \tkzGetPoints{C}{D}
  \tkzCalcLength(A,A') \tkzGetLength{lA}
  \tkzCalcLength(A',B) \tkzGetLength{lB}
  \pgfmathparse{\lA-\lB}
  \tkzInterLC[R](A,A')(A',\pgfmathresult)
  \tkzGetFirstPoint{D'}
  \tkzDefSquare(D',A')\tkzGetPoints{B'}{C'}
  \tkzDefLine[orthogonal=through D](D,D') 
   \tkzGetPoint{d}
  \tkzDefLine[orthogonal=through A](A,A')
   \tkzGetPoint{a}
  \tkzDefLine[orthogonal=through C](C,C') 
   \tkzGetPoint{c}  
  \tkzInterLL(D,d)(C,c) \tkzGetPoint{E}
  \tkzInterLL(D,d)(A,a) \tkzGetPoint{F}
  \tkzDefSquare(E,F)\tkzGetPoints{G}{H}
  \tkzDrawPolygons[fill=teal!10](A,B,A' B,C,B'
     C,D,C' A,D',D)  
  \tkzDrawPolygons(A,B,C,D E,F,G,H)
  \tkzDrawPolygon[fill=green!10](A',B',C',D')
  \tkzDrawSegment[dim={$a$,-10pt,}](D,C')
  \tkzDrawSegment[dim={$b$,-10pt,}](C,C')
  \tkzDrawSegment[dim={$c$,-10pt,}](C,D)
  \tkzDrawPoints[size=2](A,B,C,D,A',B',C',D')
  \tkzLabelPoints[left](A)
  \tkzLabelPoints[below](B)
  \tkzLabelPoints[right](C)
  \tkzLabelPoints[above](D)
  \tkzLabelPoints[right](A')
  \tkzLabelPoints[below right](B')
  \tkzLabelPoints[below left](C') 
  \tkzLabelPoints[below](D')
 \end{tikzpicture}
\end{tkzexample}

\newpage
\subsection{Reuleaux-Triangle}
\begin{tikzpicture}
\node [mybox,title={Reuleaux-triangle by  Stefan Kottwitz}] (box){%
\begin{minipage}{0.90\textwidth}
  {\emph{A well-known classic field of mathematics is geometry.
You may know Euclidean geometry from school, with constructions
by compass and ruler. Math teachers may be very interested in
drawing geometry constructions and explanations. Underlying
constructions can help us with general drawings where we would
need intersections and tangents of lines and circles, even if
it does not look like geometry.
So, here, we will remember school geometry drawings.
We will use the tkz-euclide package, which works on top of TikZ.
We will construct an equilateral triangle.
Then we extend it to get a Reuleaux triangle, and add annotations.
The code is fully explained in the LaTeX Cookbook, Chapter 10,
Advanced Mathematics, Drawing geometry pictures.
 Stefan Kottwitz
}} 
\end{minipage}
};
\end{tikzpicture}

\begin{tkzexample}[vbox,small]
  \begin{tikzpicture}
    \tkzDefPoint(0,0){A} \tkzDefPoint(4,1){B}
    \tkzInterCC(A,B)(B,A) \tkzGetPoints{C}{D}
    \tkzInterLC(A,B)(B,A) \tkzGetPoints{F}{E}
    \tkzDrawCircles[dashed](A,B B,A)
    \tkzDrawPolygons(A,B,C A,E,D)
    \tkzCompasss[color=red, very thick](A,C B,C A,D B,D)
    \begin{scope}
      \tkzSetUpArc[thick,delta=0]
      \tkzDrawArc[fill=blue!10](A,B)(C)
      \tkzDrawArc[fill=blue!10](B,C)(A)
      \tkzDrawArc[fill=blue!10](C,A)(B)
    \end{scope}
    \tkzMarkAngles(D,A,E A,E,D)
    \tkzFillAngles[fill=yellow,opacity=0.5](D,A,E A,E,D) 
    \tkzMarkRightAngle[size=0.65,fill=red!20,opacity=0.2](A,D,E) 
    \tkzLabelAngle[pos=0.7](D,A,E){$\alpha$}
    \tkzLabelAngle[pos=0.8](A,E,D){$\beta$}
    \tkzLabelAngle[pos=0.5,xshift=-1.4mm](A,D,D){$90^\circ$}
    \begin{scope}[font=\small]
      \tkzLabelSegment[below=0.6cm,align=center](A,B){Reuleaux\\triangle}
      \tkzLabelSegment[above right,sloped](A,E){hypotenuse}
      \tkzLabelSegment[below,sloped](D,E){opposite}
      \tkzLabelSegment[below,sloped](A,D){adjacent}
      \tkzLabelSegment[below right=4cm](A,E){Thales circle}
    \end{scope}
    \tkzLabelPoints[below left](A)
    \tkzLabelPoints(B,D)
    \tkzLabelPoint[above](C){$C$}
    \tkzLabelPoints(E)
    \tkzDrawPoints(A,...,E)

  \end{tikzpicture}
\end{tkzexample}




\endinput