Debian Codegraph @

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

raw
1 Now that the fixed points are defined, we can with their references using macros from the package or macros that you will create get new points. The calculations may not be apparent but they are usually done by the package.
2 You may need to use some mathematical constants, here is the list of constants defined by the package.
3
4
5 \section{Auxiliary tools}
6 \subsection{Constants}
7
8 \tkzname{\tkznameofpack} knows some constants, here is the list:
9 \begin{tkzltxexample}[]
10 \def\tkzPhi{1.618034}
11 \def\tkzInvPhi{0.618034}
12 \def\tkzSqrtPhi{1.27202}
13 \def\tkzSqrTwo{1.414213}
14 \def\tkzSqrThree{1.7320508}
15 \def\tkzSqrFive{2.2360679}
16 \def\tkzSqrTwobyTwo{0.7071065}
17 \def\tkzPi{3.1415926}
18 \def\tkzEuler{2.71828182}
19 \end{tkzltxexample}
20
21 \subsection{New point by calculation }
22
23 When a macro of \tkzname{tkznameofpack} creates a new point, it is stored internally with the reference \tkzname{tkzPointResult}. You can assign your own reference to it. This is done with the macro \tkzcname{tkzGetPoint}. A new reference is created, your choice of reference must be placed between braces.
24
25 \begin{NewMacroBox}{tkzGetPoint}{\marg{ref}}%
26 If the result is in \tkzname{tkzPointResult}, you can access it with \tkzcname{tkzGetPoint}.
27
28 \medskip
29 \begin{tabular}{lll}%
30 \toprule
31 arguments & default & example \\
32 \midrule
33 \TAline{ref}{no default}{ \tkzcname{tkzGetPoint\{M\} } see the next example}
34 \end{tabular}
35 \end{NewMacroBox}
36
37 Sometimes you need to get two points. It's possible with
38
39 \begin{NewMacroBox}{tkzGetPoints}{\marg{ref1}\marg{ref2}}%
40 The result is in \tkzname{tkzPointFirstResult} and \tkzname{tkzPointSecondResult}.
41
42 \medskip
43 \begin{tabular}{lll}%
44 \toprule
45 arguments & default & example \\
46 \midrule
47 \TAline{\{ref1,ref2\}}{no default}{ \tkzcname{tkzGetPoints\{M,N\} } It's the case with \tkzcname{tkzInterCC}}
48 \end{tabular}
49 \end{NewMacroBox}
50
51 If you need only the first or the second point you can also use :
52
53 \begin{NewMacroBox}{tkzGetFirstPoint}{\marg{ref1}}%
54
55 \medskip
56 \begin{tabular}{lll}%
57 \toprule
58 arguments & default & example \\
59 \midrule
60 \TAline{ref1}{no default}{ \tkzcname{tkzGetFirstPoint\{M\} }}
61 \end{tabular}
62 \end{NewMacroBox}
63
64 \begin{NewMacroBox}{tkzGetSecondPoint}{\marg{ref2}}%
65
66 \medskip
67 \begin{tabular}{lll}%
68 \toprule
69 arguments & default & example \\
70 \midrule
71 \TAline{ref2}{no default}{ \tkzcname{tkzGetSecondPoint\{M\} }}
72 \end{tabular}
73 \end{NewMacroBox}
74
75 Sometimes the results consist of a point and a dimension. You get the point with \tkzcname{tkzGetPoint} and the dimension with \tkzcname{tkzGetLength}.
76
77 \begin{NewMacroBox}{tkzGetLength}{\marg{name of a macro}}%
78
79 \medskip
80 \begin{tabular}{lll}%
81 \toprule
82 arguments & default & example \\
83 \midrule
84 \TAline{name of a macro}{no default}{ \tkzcname{tkzGetLength\{rAB\} \tkzcname{rAB} gives the length in cm}}
85 \end{tabular}
86 \end{NewMacroBox}
87
88 %\tkzcname{tkzCalcLength}(A,B) After \tkzcname{tkzGetLength\{dAB\}} \tkzcname{dAB} gives $AB$ in cm}
89
90
91 \section{Special points}
92 Here are some special points.
93 %<--------------------------------------------------------------------------->
94 \subsection{Middle of a segment \tkzcname{tkzDefMidPoint}}
95 It is a question of determining the middle of a segment.
96
97 \begin{NewMacroBox}{tkzDefMidPoint}{\parg{pt1,pt2}}%
98 The result is in \tkzname{tkzPointResult}. We can access it with \tkzcname{tkzGetPoint}.
99
100 \medskip
101 \begin{tabular}{lll}%
102 \toprule
103 arguments & default & definition \\
104 \midrule
105 \TAline{(pt1,pt2)}{no default}{pt1 and pt2 are two points}
106 \end{tabular}
107 \end{NewMacroBox}
108
109 \subsubsection{Use of \tkzcname{tkzDefMidPoint}}
110 Review the use of \tkzcname{tkzDefPoint}.
111 \begin{tkzexample}[latex=7cm,small]
112 \begin{tikzpicture}[scale=1]
113 \tkzDefPoint(2,3){A}
114 \tkzDefPoint(6,2){B}
115 \tkzDefMidPoint(A,B)
116 \tkzGetPoint{M}
117 \tkzDrawSegment(A,B)
118 \tkzDrawPoints(A,B,M)
119 \tkzLabelPoints[below](A,B,M)
120 \end{tikzpicture}
121 \end{tkzexample}
122
123 \subsection{\tkzname{Golden ratio} \tkzcname{tkzDefGoldenRatio}}
124 From Wikipedia : In mathematics, two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Expressed algebraically, for quantities $a$, $b$ such as $a > b > 0$; $a+b$ is to $a$ as $a$ is to $b$.
125
126 $ \frac{a+b}{a} = \frac{a}{b} = \phi = \frac{1 + \sqrt{5}}{2}$
127
128
129 One of the two solutions to the equation $x^2 - x - 1 = 0$
130 is the golden ratio $\phi$, $\phi = \frac{1 + \sqrt{5}}{2}$.
131
132 \begin{NewMacroBox}{tkzDefGoldenRatio}{\parg{pt1,pt2}}%
133 \begin{tabular}{lll}%
134 arguments & default & example \\
135 \midrule
136 \TAline{(pt1,pt2)}{no default}{\tkzcname{tkzDefGoldenRatio(A,C)} \tkzcname{tkzGetPoint}\{B\}}
137 \bottomrule
138 \end{tabular}
139
140 \medskip
141 $AB=a$, $BC=b$ and $\dfrac{AC}{AB} = \dfrac{AB}{BC} =\phi$
142 \end{NewMacroBox}
143
144 \subsubsection{Use the golden ratio to divide a line segment}
145 \begin{tkzexample}[latex=7cm,small]
146 \begin{tikzpicture}
147 \tkzDefPoints{0/0/A,6/0/C}
148 \tkzDefMidPoint(A,C) \tkzGetPoint{I}
149 %\tkzDefPointWith[linear,K=\tkzInvPhi](A,C)
150 \tkzDefGoldenRatio(A,C) \tkzGetPoint{B}
151 \tkzDrawSegments(A,C)
152 \tkzDrawPoints(A,B,C)
153 \tkzLabelPoints(A,B,C)
154 \end{tikzpicture}
155 \end{tkzexample}
156
157 \subsubsection{Golden arbelos}
158 \begin{tkzexample}[latex=7cm,small]
159 \begin{tikzpicture}[scale=.6]
160 \tkzDefPoints{0/0/A,10/0/B}
161 \tkzDefGoldenRatio(A,B) \tkzGetPoint{C}
162 \tkzDefMidPoint(A,B) \tkzGetPoint{O_1}
163 \tkzDefMidPoint(A,C) \tkzGetPoint{O_2}
164 \tkzDefMidPoint(C,B) \tkzGetPoint{O_3}
165 \tkzDrawSemiCircles[fill=purple!15](O_1,B)
166 \tkzDrawSemiCircles[fill=teal!15](O_2,C O_3,B)
167 \end{tikzpicture}
168 \end{tkzexample}
169
170 It is also possible to use the following macro.
171 \subsection{\tkzname{Barycentric coordinates} with \tkzcname{tkzDefBarycentricPoint}}
172
173 $pt_1$, $pt_2$, \dots, $pt_n$ being $n$ points, they define $n$ vectors $\overrightarrow{v_1}$, $\overrightarrow{v_2}$, \dots, $\overrightarrow{v_n}$ with the origin of the referential as the common endpoint. $\alpha_1$, $\alpha_2$,
174 \dots $\alpha_n$ are $n$ numbers, the vector obtained by:
175 \begin{align*}
176 \frac{\alpha_1 \overrightarrow{v_1} + \alpha_2 \overrightarrow{v_2} + \cdots + \alpha_n \overrightarrow{v_n}}{\alpha_1
177 + \alpha_2 + \cdots + \alpha_n}
178 \end{align*}
179 defines a single point.
180
181 \begin{NewMacroBox}{tkzDefBarycentricPoint}{\parg{pt1=$\alpha_1$,pt2=$\alpha_2$,\dots}}%
182 \begin{tabular}{lll}%
183 arguments & default & definition \\
184 \midrule
185 \TAline{(pt1=$\alpha_1$,pt2=$\alpha_2$,\dots)}{no default}{Each point has a assigned weight}
186 \bottomrule
187 \end{tabular}
188
189 \medskip
190 \emph{You need at least two points. Result in \tkzname{tkzPointResult}.}
191 \end{NewMacroBox}
192
193
194 \subsubsection{with two points}
195 In the following example, we obtain the barycenter of points $A$ and $B$ with coefficients $1$ and $2$, in other words:
196 \[
197 \overrightarrow{AI}= \frac{2}{3}\overrightarrow{AB}
198 \]
199
200 \begin{tkzexample}[latex=7cm,small]
201 \begin{tikzpicture}
202 \tkzDefPoint(2,3){A}
203 \tkzDefShiftPointCoord[2,3](30:4){B}
204 \tkzDefBarycentricPoint(A=1,B=2)
205 \tkzGetPoint{G}
206 \tkzDrawLine(A,B)
207 \tkzDrawPoints(A,B,G)
208 \tkzLabelPoints(A,B,G)
209 \end{tikzpicture}
210 \end{tkzexample}
211
212 \subsubsection{with three points}
213 This time $M$ is simply the center of gravity of the triangle.
214
215 For reasons of simplification and homogeneity, there is also \tkzcname{tkzCentroid}.
216 \begin{tkzexample}[latex=7cm,small]
217 \begin{tikzpicture}[scale=.8]
218 \tkzDefPoints{2/1/A,5/3/B,0/6/C}
219 \tkzDefBarycentricPoint(A=1,B=1,C=1)
220 \tkzGetPoint{G}
221 \tkzDefMidPoint(A,B) \tkzGetPoint{C'}
222 \tkzDefMidPoint(A,C) \tkzGetPoint{B'}
223 \tkzDefMidPoint(C,B) \tkzGetPoint{A'}
224 \tkzDrawPolygon(A,B,C)
225 \tkzDrawLines[add=0 and 1,new](A,G B,G C,G)
226 \tkzDrawPoints[new](A',B',C',G)
227 \tkzDrawPoints(A,B,C)
228 \tkzLabelPoint[above right](G){$G$}
229 \tkzAutoLabelPoints[center=G](A,B,C)
230 \tkzLabelPoints[above right](A')
231 \tkzLabelPoints[below](B',C')
232 \end{tikzpicture}
233 \end{tkzexample}
234
235
236 \subsection{\tkzname{Internal and external Similitude Center}}
237 The centers of the two homotheties in which two circles correspond are called external and internal centers of similitude. You can use \tkzcname{tkzDefIntSimilitudeCenter} and \tkzcname{tkzDefExtSimilitudeCenter} but the next macro is better.
238
239 \begin{NewMacroBox}{tkzDefSimilitudeCenter}{\oarg{options}\parg{O,A}\parg{O',B}}%
240
241 \begin{tabular}{lll}%
242 arguments & example & explanation \\
243 \midrule
244 \TAline{\parg{pt1,pt2}\parg{pt3,pt4}}{$(O,A)(O',B)$} {$r=OA,r'=O'B$}
245 \end{tabular}
246
247 \medskip
248 \begin{tabular}{lll}%
249 \toprule
250 options & default & definition \\
251 \midrule
252 \TOline{ext}{ext}{external center}
253 \TOline{int}{ext}{internal center}
254 \end{tabular}
255 \end{NewMacroBox}
256
257 \subsubsection{Internal and external with \tkzname{node}}
258 \begin{tkzexample}[latex=7.5cm,small]
259 \begin{tikzpicture}[scale=.7]
260 \tkzDefPoints{0/0/O,4/-5/A,3/0/B,5/-5/C}
261 \tkzDefSimilitudeCenter[int](O,B)(A,C)
262 \tkzGetPoint{I}
263 \tkzDefSimilitudeCenter[ext](O,B)(A,C)
264 \tkzGetPoint{J}
265 \tkzDefLine[tangent from = I](O,B)
266 \tkzGetPoints{D}{E}
267 \tkzDefLine[tangent from = I](A,C)
268 \tkzGetPoints{D'}{E'}
269 \tkzDefLine[tangent from = J](O,B)
270 \tkzGetPoints{F}{G}
271 \tkzDefLine[tangent from = J](A,C)
272 \tkzGetPoints{F'}{G'}
273 \tkzDrawCircles(O,B A,C)
274 \tkzDrawSegments[add = .5 and .5,new](D,D' E,E')
275 \tkzDrawSegments[add= 0 and 0.25,new](J,F J,G)
276 \tkzDrawPoints(O,A,I,J,D,E,F,G,D',E',F',G')
277 \end{tikzpicture}
278 \end{tkzexample}
279
280 \subsubsection{D'Alembert Theorem} % (fold)
281 \label{ssub:d_alembert_theorem}
282
283 \begin{tkzexample}[latex=7cm,small]
284 \begin{tikzpicture}[scale=.6,rotate=90]
285 \tkzDefPoints{0/0/A,3/0/a,7/-1/B,5.5/-1/b}
286 \tkzDefPoints{5/-4/C,4.25/-4/c}
287 \tkzDrawCircles(A,a B,b C,c)
288 \tkzDefExtSimilitudeCenter(A,a)(B,b) \tkzGetPoint{I}
289 \tkzDefExtSimilitudeCenter(A,a)(C,c) \tkzGetPoint{J}
290 \tkzDefExtSimilitudeCenter(C,c)(B,b) \tkzGetPoint{K}
291 \tkzDefIntSimilitudeCenter(A,a)(B,b) \tkzGetPoint{I'}
292 \tkzDefIntSimilitudeCenter(A,a)(C,c) \tkzGetPoint{J'}
293 \tkzDefIntSimilitudeCenter(C,c)(B,b) \tkzGetPoint{K'}
294 \tkzDrawPoints(A,B,C,I,J,K,I',J',K')
295 \tkzDrawSegments[new](I,K A,I A,J B,I B,K C,J C,K)
296 \tkzDrawSegments[new](I,J' I',J I',K)
297 \end{tikzpicture}
298 \end{tkzexample}
299
300 % subsubsection d_alembert_theorem (end)
301
302 You can use \tkzcname{tkzDefBarycentricPoint} to find a homothetic center
303
304 |\tkzDefBarycentricPoint(O=\r,A=\R) \tkzGetPoint{I}| \\
305 |\tkzDefBarycentricPoint(O={-\r},A=\R) \tkzGetPoint{J}|
306
307 \subsubsection{Example with \tkzname{node}}
308 \begin{tkzexample}[latex=7cm,small]
309 \begin{tikzpicture}[rotate=60,scale=.5]
310 \tkzDefPoints{0/0/A,5/0/C}
311 \tkzDefGoldenRatio(A,C) \tkzGetPoint{B}
312 \tkzDefSimilitudeCenter(A,B)(C,B)\tkzGetPoint{J}
313 \tkzDefTangent[from = J](A,B) \tkzGetPoints{F}{G}
314 \tkzDefTangent[from = J](C,B) \tkzGetPoints{F'}{G'}
315 \tkzDrawCircles(A,B C,B)
316 \tkzDrawSegments[add= 0 and 0.25,cyan](J,F J,G)
317 \tkzDrawPoints(A,J,F,G,F',G')
318 \end{tikzpicture}
319 \end{tkzexample}
320 \newpage
321 %<---------------------------------------------------------------------->
322 \subsection{ \tkzname{Harmonic division} with \tkzcname{tkzDefHarmonic}}
323 %<---------------------------------------------------------------------->
324
325 \begin{NewMacroBox}{tkzDefHarmonic}{\oarg{options}\parg{pt1,pt2,pt3} or \parg{pt1,pt2,k}}%
326
327 \begin{tabular}{lll}%
328 options & default & definition \\
329 \midrule
330 \TOline{both}{both}{\parg{A,B,2} we look for C and D such that $(A,B;C,D) = -1$ and CA=2CB }
331 \TOline{ext}{both}{\parg{A,B,C} we look for D such that $(A,B;C,D) = -1$}
332 \TOline{int}{both}{\parg{A,B,D} we look for C such that $(A,B;C,D) = -1$}
333 \end{tabular}
334 \end{NewMacroBox}
335
336 \subsubsection{options \tkzname{ext} and \tkzname{int}}
337 \begin{tkzexample}[vbox,small]
338 \begin{tikzpicture}
339 \tkzDefPoints{0/0/A,6/0/B,4/0/C}
340 \tkzDefHarmonic[ext](A,B,C) \tkzGetPoint{J}
341 \tkzDefHarmonic[int](A,B,J) \tkzGetPoint{I}
342 \tkzDrawPoints(A,B,I,J)
343 \tkzDrawLine[add=.5 and 1](A,B)
344 \tkzLabelPoints(A,B,I,J)
345 \end{tikzpicture}
346 \end{tkzexample}
347
348 \subsubsection{Bisector and harmonic division} % (fold)
349 \label{ssub:bisector_and_harmonic_division}
350
351 \begin{tkzexample}[vbox,small]
352 \begin{tikzpicture}[scale=1.25]
353 \tkzDefPoints{0/0/A,4/0/C,5/3/X}
354 \tkzDefLine[bisector](A,X,C) \tkzGetPoint{x}
355 \tkzInterLL(X,x)(A,C) \tkzGetPoint{B}
356 \tkzDefHarmonic[ext](A,C,B) \tkzGetPoint{D}
357 \tkzDrawPolygon(A,X,C)
358 \tkzDrawSegments(X,B C,D D,X)
359 \tkzDrawPoints(A,B,C,D,X)
360 \tkzMarkAngles[mark=s|](A,X,B B,X,C)
361 \tkzMarkRightAngle[size=.4,
362 fill=gray!20,
363 opacity=.3](B,X,D)
364 \tkzLabelPoints(A,B,C,D)
365 \tkzLabelPoints[above right](X)
366 \end{tikzpicture}
367 \end{tkzexample}
368
369
370 % subsubsection bisector_and_harmonic_division (end)
371 \subsubsection{option \tkzname{both} }
372 \tkzname{both} is the default option
373 \begin{tkzexample}[vbox,small]
374 \begin{tikzpicture}
375 \tkzDefPoints{0/0/A,6/0/B}
376 \tkzDefHarmonic(A,B,{1/2})\tkzGetPoints{I}{J}
377 \tkzDrawPoints(A,B,I,J)
378 \tkzDrawLine[add=1 and .5](A,B)
379 \tkzLabelPoints(A,B,I,J)
380 \end{tikzpicture}
381 \end{tkzexample}
382
383 %<---------------------------------------------------------------------->
384 \subsection{\tkzname{Equidistant points} with \tkzcname{tkzDefEquiPoints} }
385 %<---------------------------------------------------------------------->
386
387 \begin{NewMacroBox}{tkzDefEquiPoints}{\oarg{local options}\parg{pt1,pt2}}%
388 \begin{tabular}{lll}%
389 arguments & default & definition \\
390 \midrule
391 \TAline{(pt1,pt2)}{no default}{unordered list of two items}
392 \end{tabular}
393
394 \begin{tabular}{lll}%
395 options & default & definition \\
396 \midrule
397 \TOline{dist} {2 (cm)} {half the distance between the two points}
398 \TOline{from=pt} {no default} {reference point}
399 \TOline{show} {false} {if true displays compass traces}
400 \TOline{/compass/delta} {0} {compass trace size }
401 \end{tabular}
402
403 \medskip
404 \emph{This macro makes it possible to obtain two points on a straight line equidistant from a given point.}
405 \end{NewMacroBox}
406
407
408 \subsubsection{Using \tkzcname{tkzDefEquiPoints} with options}
409 \begin{tkzexample}[latex=7cm,small]
410 \begin{tikzpicture}
411 \tkzSetUpCompass[color=purple,line width=1pt]
412 \tkzDefPoints{0/1/A,5/2/B,3/4/C}
413 \tkzDefEquiPoints[from=C,dist=1,show,
414 /tkzcompass/delta=20](A,B)
415 \tkzGetPoints{E}{H}
416 \tkzDrawLines[color=blue](C,E C,H A,B)
417 \tkzDrawPoints[color=blue](A,B,C)
418 \tkzDrawPoints[color=red](E,H)
419 \tkzLabelPoints(E,H)
420 \tkzLabelPoints[color=blue](A,B,C)
421 \end{tikzpicture}
422 \end{tkzexample}
423 %<---------------------------------------------------------------------->
424 % Middle of an arc >
425 %<---------------------------------------------------------------------->
426 \subsection{Middle of an arc}
427 \begin{NewMacroBox}{tkzDefMidArc}{\parg{pt1,pt2,pt3}}%
428 \begin{tabular}{lll}%
429 arguments & default & definition \\
430 \midrule
431 \TAline{$pt1,pt2,pt3$}{no default}{$pt1$ is the center, $\widearc{pt2pt3}$ the arc}
432 \end{tabular}
433 \end{NewMacroBox}
434
435 \begin{tkzexample}[vbox,small]
436 \begin{tikzpicture}[scale=1]
437 \tkzDefPoints{0/0/A,10/0/B}
438 \tkzDefGoldenRatio(A,B) \tkzGetPoint{C}
439 \tkzDefMidPoint(A,B) \tkzGetPoint{O_1}
440 \tkzDefMidPoint(A,C) \tkzGetPoint{O_2}
441 \tkzDefMidPoint(C,B) \tkzGetPoint{O_3}
442 \tkzDefMidArc(O_3,B,C) \tkzGetPoint{P}
443 \tkzDefMidArc(O_2,C,A) \tkzGetPoint{Q}
444 \tkzDefMidArc(O_1,B,A) \tkzGetPoint{L}
445 \tkzDefPointBy[rotation=center C angle 90](B) \tkzGetPoint{c}
446 \tkzInterCC[common=B](P,B)(O_1,B) \tkzGetFirstPoint{P_1}
447 \tkzInterCC[common=C](P,C)(O_2,C) \tkzGetFirstPoint{P_2}
448 \tkzInterCC[common=C](Q,C)(O_3,C) \tkzGetFirstPoint{P_3}
449 \tkzInterLC[near](c,C)(O_1,A) \tkzGetFirstPoint{D}
450 \tkzInterLL(A,P_1)(C,D) \tkzGetPoint{P_1'}
451 \tkzDefPointBy[inversion = center A through D](P_2) \tkzGetPoint{P_2'}
452 \tkzDefCircle[circum](P_3,P_2,P_1) \tkzGetPoint{O_4}
453 \tkzInterLL(B,Q)(A,P) \tkzGetPoint{S}
454 \tkzDefMidPoint(P_2',P_1') \tkzGetPoint{o}
455 \tkzDefPointBy[inversion = center A through D](S) \tkzGetPoint{S'}
456 \tkzDrawArc[cyan,delta=0](Q,A)(P_1)
457 \tkzDrawArc[cyan,delta=0](P,P_1)(B)
458 \tkzDrawSemiCircles[teal](O_1,B O_2,C O_3,B)
459 \tkzDrawCircles[new](o,P O_4,P_1)
460 \tkzDrawSegments(A,B)
461 \tkzDrawSegments[cyan](A,P_1 A,S' A,P_2')
462 \tkzDrawSegments[purple](B,L C,P_2' B,Q B,L S',P_1')
463 \tkzDrawLines[add=0 and .8](B,P_2')
464 \tkzDrawLines[add=0 and .4](C,D)
465 \tkzDrawPoints(A,B,C,P,Q,P_3,P_2,P_1,P_1',D,P_2',L,S,S')
466 \tkzLabelPoints(A,B,C,P_3)
467 \tkzLabelPoints[above](P,Q,P_1)
468 \tkzLabelPoints[above right](P_2,P_2',D,S')
469 \tkzLabelPoints[above left](L,S)
470 \tkzLabelPoints[below left](P_1')
471 \end{tikzpicture}
472 \end{tkzexample}
473
474 %<---------------------------------------------------------------------->
475 % Point on a line >
476 %<---------------------------------------------------------------------->
477
478 \section{Point on line or circle}
479 \subsection{Point on a line with \tkzcname{tkzDefPointOnLine}}
480
481 \begin{NewMacroBox}{tkzDefPointOnLine}{\oarg{local options}\parg{A,B}}%
482 \begin{tabular}{lll}%
483 arguments & default & definition \\
484 \midrule
485 \TAline{pt1,pt2} {no default} {Two points to define a line}
486 \bottomrule
487 \end{tabular}
488
489 \medskip
490 \begin{tabular}{lll}%
491 options & default & definition \\
492 \midrule
493 \TOline{pos=nb} {}{nb is a decimal }
494 \end{tabular}
495 \end{NewMacroBox}
496
497 \subsubsection{Use of option \tkzname{pos}}
498 \begin{tkzexample}[latex=7cm,small]
499 \begin{tikzpicture}
500 \tkzDefPoints{0/0/A,3/0/B}
501 \tkzDefPointOnLine[pos=1.2](A,B)\tkzGetPoint{P}
502 \tkzDefPointOnLine[pos=-0.2](A,B)\tkzGetPoint{R}
503 \tkzDefPointOnLine[pos=0.5](A,B) \tkzGetPoint{S}
504 \tkzDrawLine[new](A,B)
505 \tkzDrawPoints(A,B,P)
506 \tkzLabelPoints(A,B)
507 \tkzLabelPoint[above](P){pos=$1.2$}
508 \tkzLabelPoint[above](R){pos=$-.2$}
509 \tkzLabelPoint[above](S){pos=$.5$}
510 \tkzDrawPoints(A,B,P,R,S)
511 \tkzLabelPoints(A,B)
512 \end{tikzpicture}
513 \end{tkzexample}
514
515 \subsection{Point on a circle with \tkzcname{tkzDefPointOnCircle}}
516 The order of the arguments has changed: now it is center, angle and point or radius.
517 I have added two options for working with radians which are \tkzname{through in rad} and \tkzname{R in rad}.
518
519 \begin{NewMacroBox}{tkzDefPointOnCircle}{\oarg{local options}}%
520 \begin{tabular}{lll}%
521 options & default & examples definition \\
522 \midrule
523 \TOline{through} {}{through = center K1 angle 30 point B]}
524 \TOline{R} {}{R = center K1 angle 30 radius \tkzcname{rAp}}
525 \TOline{through in rad} {}{through in rad= center K1 angle pi/4 point B]}
526 \TOline{R in rad} {}{R in rad = center K1 angle pi/6 radius \tkzcname{rAp}}
527 \end{tabular}
528
529 \medskip
530 \emph{The new order for arguments are : center, angle and point or radius.}
531 \end{NewMacroBox}
532
533 \subsubsection{Altshiller's Theorem}
534 The two lines joining the points of intersection of two orthogonal circles to a point on one of the circles met the other circle in two diametricaly oposite points. Altshiller p 176
535
536 \begin{tkzexample}[latex=6cm,small]
537 \begin{tikzpicture}[scale=.4]
538 \tkzDefPoints{0/0/P,5/0/Q,3/2/I}
539 \tkzDefCircle[orthogonal from=P](Q,I)
540 \tkzGetFirstPoint{E}
541 \tkzDrawCircles(P,E Q,E)
542 \tkzInterCC[common=E](P,E)(Q,E) \tkzGetFirstPoint{F}
543 \tkzDefPointOnCircle[through = center P angle 80 point E]
544 \tkzGetPoint{A}
545 \tkzInterLC[common=E](A,E)(Q,E) \tkzGetFirstPoint{C}
546 \tkzInterLL(A,F)(C,Q) \tkzGetPoint{D}
547 \tkzDrawLines[add=0 and .75](P,Q)
548 \tkzDrawLines[add=0 and 2](A,E)
549 \tkzDrawSegments(P,E E,F F,C A,F C,D)
550 \tkzDrawPoints(P,Q,E,F,A,C,D)
551 \tkzLabelPoints(P,Q,F,C,D)
552 \tkzLabelPoints[above](E,A)
553 \end{tikzpicture}
554 \end{tkzexample}
555
556 \subsubsection{Use of \tkzcname{tkzDefPointOnCircle}}
557
558 \begin{tkzexample}[latex=6cm,small]
559 \begin{tikzpicture}
560 \tkzDefPoints{0/0/A,4/0/B,0.8/3/C}
561 \tkzDefPointOnCircle[R = center B angle 90 radius 1]
562 \tkzGetPoint{I}
563 \tkzDefCircle[circum](A,B,C)
564 \tkzGetPoints{G}{g}
565 \tkzDefPointOnCircle[through = center G angle 30 point g]
566 \tkzGetPoint{J}
567 \tkzDefCircle[R](B,1) \tkzGetPoint{b}
568 \tkzDrawCircle[teal](B,b)
569 \tkzDrawCircle(G,J)
570 \tkzDrawPoints(A,B,C,G,I,J)
571 \tkzAutoLabelPoints[center=G](A,B,C,J)
572 \tkzLabelPoints[below](G,I)
573 \end{tikzpicture}
574 \end{tkzexample}
575
576 \newpage
577 \section{Special points relating to a triangle}
578
579 \subsection{Triangle center: \tkzcname{tkzDefTriangleCenter}}
580
581 \begin{NewMacroBox}{tkzDefTriangleCenter}{\oarg{local options}\parg{A,B,C}}%
582 \tkzHandBomb\ This macro allows you to define the center of a triangle.. Be careful, the arguments are lists of three points. This macro is used in conjunction with \tkzcname{tkzGetPoint} to get the center you are looking for.
583
584 You can use \tkzname{tkzPointResult} if it is not necessary to keep the results.
585
586 \medskip
587 \begin{tabular}{lll}%
588 \toprule
589 arguments & default & example \\
590 \midrule
591 \TAline{(pt1,pt2,pt3)}{no default}{ \tkzcname{tkzDefTriangleCenter[ortho](B,C,A)}}
592 \midrule
593 options & default & definition \\
594 \midrule
595 \TOline{ortho} {circum}{intersection of the altitudes}
596 \TOline{orthic} {circum}{\dots}
597 \TOline{centroid} {circum}{intersection of the medians}
598 \TOline{median} {circum}{ \dots }
599 \TOline{circum}{circum}{circle center circumscribed}
600 \TOline{in} {circum}{center of the circle inscribed in a triangle }
601 \TOline{in} {circum}{intersection of the bisectors}
602 \TOline{ex} {circum}{center of a circle exinscribed to a triangle }
603 \TOline{euler}{circum}{center of Euler's circle }
604 \TOline{gergonne}{circum}{defined with the Contact triangle}
605 \TOline{symmedian} {circum}{Lemoine's point or symmedian center or Grebe's point }
606 \TOline{lemoine} {circum}{ \dots}
607 \TOline{grebe} {circum}{ \dots}
608 \TOline{spieker} {circum}{Spieker circle center}
609 \TOline{nagel}{circum}{Nagel Center}
610 \TOline{mittenpunkt} {circum}{Or middlespoint}
611 \TOline{feuerbach}{circum}{Feuerbach Point}
612
613 \end{tabular}
614 \end{NewMacroBox}
615
616 \subsubsection{Option \tkzname{ortho} or \tkzname{orthic}}
617 The intersection $H$ of the three altitudes of a triangle is called the orthocenter.
618
619 \begin{tkzexample}[latex=6cm,small]
620 \begin{tikzpicture}
621 \tkzDefPoint(0,0){A}
622 \tkzDefPoint(5,1){B}
623 \tkzDefPoint(1,4){C}
624 \tkzDefTriangleCenter[ortho](B,C,A)
625 \tkzGetPoint{H}
626 \tkzDefSpcTriangle[orthic,name=H](A,B,C){a,b,c}
627 \tkzDrawPolygon(A,B,C)
628 \tkzDrawSegments[new](A,Ha B,Hb C,Hc)
629 \tkzDrawPoints(A,B,C,H)
630 \tkzLabelPoint(H){$H$}
631 \tkzLabelPoints[below](A,B)
632 \tkzLabelPoints[above](C)
633 \tkzMarkRightAngles(A,Ha,B B,Hb,C C,Hc,A)
634 \end{tikzpicture}
635 \end{tkzexample}
636
637 \subsubsection{Option \tkzname{centroid}}
638 \begin{tkzexample}[latex=6cm,small]
639 \begin{tikzpicture}[scale=.75]
640 \tkzDefPoints{0/0/A,5/0/B,1/4/C}
641 \tkzDefTriangleCenter[centroid](A,B,C)
642 \tkzGetPoint{G}
643 \tkzDrawPolygon(A,B,C)
644 \tkzDrawLines[add = 0 and 2/3,new](A,G B,G C,G)
645 \tkzDrawPoints(A,B,C,G)
646 \tkzLabelPoint(G){$G$}
647 \end{tikzpicture}
648 \end{tkzexample}
649
650 \subsubsection{Option \tkzname{circum}}
651 \begin{tkzexample}[latex=6cm,small]
652 \begin{tikzpicture}
653 \tkzDefPoints{0/1/A,3/2/B,1/4/C}
654 \tkzDefTriangleCenter[circum](A,B,C)
655 \tkzGetPoint{O}
656 \tkzDrawPolygon(A,B,C)
657 \tkzDrawCircle(O,A)
658 \tkzDrawPoints(A,B,C,O)
659 \tkzLabelPoint(O){$O$}
660 \end{tikzpicture}
661 \end{tkzexample}
662
663 \subsubsection{Option \tkzname{in}}
664 In geometry, the incircle or inscribed circle of a triangle is the largest circle contained in the triangle; it touches (is tangent to) the three sides. The center of the incircle is a triangle center called the triangle's incenter.
665 The center of the incircle, called the incenter, can be found as the intersection of the three internal angle bisectors. The center of an excircle is the intersection of the internal bisector of one angle (at vertex $A$, for example) and the external bisectors of the other two. The center of this excircle is called the excenter relative to the vertex $A$, or the excenter of $A$. Because the internal bisector of an angle is perpendicular to its external bisector, it follows that the center of the incircle together with the three excircle centers form an orthocentric system.\\
666 (Article on \href{https://en.wikipedia.org/wiki/Incircle_and_excircles_of_a_triangle}{Wikipedia})
667
668 \medskip
669 We get the center of the inscribed circle of the triangle. The result is of course in \tkzname{tkzPointResult}. We can retrieve it with \tkzcname{tkzGetPoint}.
670
671 \begin{tkzexample}[latex=7cm,small]
672 \begin{tikzpicture}
673 \tkzDefPoints{0/0/A,6/0/B,0.8/4/C}
674 \tkzDefTriangleCenter[in](A,B,C)
675 \tkzGetPoint{I}
676 \tkzDrawLines(A,B B,C C,A)
677 \tkzDefCircle[in](A,B,C) \tkzGetPoints{I}{i}
678 \tkzDrawCircle(I,i)
679 \tkzDrawPoint[red](I)
680 \tkzDrawPoints(A,B,C)
681 \tkzLabelPoint(I){$I$}
682 \end{tikzpicture}
683 \end{tkzexample}
684
685 \subsubsection{Option \tkzname{ex}}
686 An excircle or escribed circle of the triangle is a circle lying outside the triangle, tangent to one of its sides and tangent to the extensions of the other two. Every triangle has three distinct excircles, each tangent to one of the triangle's sides.\\
687 (Article on \href{https://en.wikipedia.org/wiki/Incircle_and_excircles_of_a_triangle}{Wikipedia})
688
689
690 We get the center of an inscribed circle of the triangle. The result is of course in \tkzname{tkzPointResult}. We can retrieve it with \tkzcname{tkzGetPoint}.
691
692 \begin{tkzexample}[latex=7cm,small]
693 \begin{tikzpicture}[scale=.5]
694 \tkzDefPoints{0/1/A,3/2/B,1/4/C}
695 \tkzDefTriangleCenter[ex](B,C,A)
696 \tkzGetPoint{J_c}
697 \tkzDefPointBy[projection=onto A--B](J_c)
698 \tkzGetPoint{Tc}
699 \tkzDrawPolygon(A,B,C)
700 \tkzDrawCircle[new](J_c,Tc)
701 \tkzDrawLines[add=1.5 and 0](A,C B,C)
702 \tkzDrawPoints(A,B,C,J_c)
703 \tkzLabelPoints(J_c)
704 \end{tikzpicture}
705 \end{tkzexample}
706
707 \subsubsection{Option \tkzname{euler}}
708 This macro allows to obtain the center of the circle of the nine points or euler's circle or Feuerbach's circle. The nine-point circle, also called Euler's circle or the Feuerbach circle, is the circle that passes through the perpendicular feet $H_A$, $H_B$, and $H_C$ dropped from the vertices of any reference triangle $ABC$ on the sides opposite them. Euler showed in 1765 that it also passes through the midpoints $M_A$, $M_B$, $M_C$ of the sides of $ABC$. By Feuerbach's theorem, the nine-point circle also passes through the midpoints $E_A$, $E_B$, and $E_C$ of the segments that join the vertices and the orthocenter $H$. These points are commonly referred to as the Euler points.\\ (\url{https://mathworld.wolfram.com/Nine-PointCircle.html})
709
710 \begin{tkzexample}[latex=6cm,small]
711 \begin{tikzpicture}[scale=1.2,rotate=90]
712 \tkzDefPoints{0/0/A,6/0/B,0.8/4/C}
713 \tkzDefSpcTriangle[medial,name=M](A,B,C){_A,_B,_C}
714 \tkzDefTriangleCenter[euler](A,B,C)\tkzGetPoint{N}
715 % I= N nine points
716 \tkzDefTriangleCenter[ortho](A,B,C)\tkzGetPoint{H}
717 \tkzDefMidPoint(A,H) \tkzGetPoint{E_A}
718 \tkzDefMidPoint(C,H) \tkzGetPoint{E_C}
719 \tkzDefMidPoint(B,H) \tkzGetPoint{E_B}
720 \tkzDefSpcTriangle[ortho,name=H](A,B,C){_A,_B,_C}
721 \tkzDrawPolygon(A,B,C)
722 \tkzDrawCircle[new](N,E_A)
723 \tkzDrawSegments[new](A,H_A B,H_B C,H_C)
724 \tkzDrawPoints(A,B,C,N,H)
725 \tkzDrawPoints[new](M_A,M_B,M_C)
726 \tkzDrawPoints( H_A,H_B,H_C)
727 \tkzDrawPoints[green](E_A,E_B,E_C)
728 \tkzAutoLabelPoints[center=N,
729 font=\scriptsize](A,B,C,M_A,M_B,M_C,H_A,H_B,H_C,%
730 E_A,E_B,E_C)
731 \tkzLabelPoints[font=\scriptsize](H,N)
732 \tkzMarkSegments[mark=s|,size=3pt,
733 color=blue,line width=1pt](B,E_B E_B,H)
734 \end{tikzpicture}
735 \end{tkzexample}
736
737
738 \subsubsection{Option \tkzname{symmedian}}
739
740 The point of concurrence $K$ of the symmedians, sometimes also called the Lemoine point (in England and France) or the Grebe point (in Germany).\\
741 \href{https://mathworld.wolfram.com/SymmedianPoint.html}{Weisstein, Eric W. "Symmedian Point." From MathWorld--A Wolfram Web Resource.}
742
743 \begin{tkzexample}[latex=7cm,small]
744 \begin{tikzpicture}
745 \tkzDefPoint(0,0){A}
746 \tkzDefPoint(5,0){B}
747 \tkzDefPoint(1,4){C}
748 \tkzDefTriangleCenter[symmedian](A,B,C)
749 \tkzGetPoint{K}
750 \tkzDefTriangleCenter[median](A,B,C)
751 \tkzGetPoint{G}
752 \tkzDefTriangleCenter[in](A,B,C)\tkzGetPoint{I}
753 \tkzDefSpcTriangle[centroid,name=M](A,B,C){a,b,c}
754 \tkzDefSpcTriangle[incentral,name=I](A,B,C){a,b,c}
755 \tkzDrawPolygon(A,B,C)
756 \tkzDrawLines[add = 0 and 2/3,new](A,K B,K C,K)
757 \tkzDrawSegments[color=cyan](A,Ma B,Mb C,Mc)
758 \tkzDrawSegments[color=green](A,Ia B,Ib C,Ic)
759 \tkzDrawPoints(A,B,C,K,G,I)
760 \tkzLabelPoints[font=\scriptsize](A,B,K,G,I)
761 \tkzLabelPoints[above,font=\scriptsize](C)
762 \end{tikzpicture}
763 \end{tkzexample}
764
765 \subsubsection{Option \tkzname{spieker}}
766 The Spieker center is the center $Sp$ of the Spieker circle, i.e., the incenter of the medial triangle of a reference triangle.\\
767 \href{https://mathworld.wolfram.com/SpiekerCenter.html}{Weisstein, Eric W. "Spieker Center." From MathWorld--A Wolfram Web Resource. }
768
769 \begin{tkzexample}[latex=8cm,small]
770 \begin{tikzpicture}
771 \tkzDefPoints{0/0/A,6/0/B,5/5/C}
772 \tkzDefSpcTriangle[medial](A,B,C){Ma,Mb,Mc}
773 \tkzDefTriangleCenter[centroid](A,B,C)
774 \tkzGetPoint{G}
775 \tkzDefTriangleCenter[spieker](A,B,C)
776 \tkzGetPoint{Sp}
777 \tkzDrawPolygon[](A,B,C)
778 \tkzDrawPolygon[new](Ma,Mb,Mc)
779 \tkzDefCircle[in](Ma,Mb,Mc) \tkzGetPoints{I}{i}
780 \tkzDrawCircle(I,i)
781 \tkzDrawPoints(B,C,A,Sp,Ma,Mb,Mc)
782 \tkzAutoLabelPoints[center=G,dist=.3](Ma,Mb)
783 \tkzLabelPoints[right](Sp)
784 \tkzLabelPoints[below](A,B,Mc)
785 \tkzLabelPoints[above](C)
786 \end{tikzpicture}
787 \end{tkzexample}
788
789 \subsubsection{Option \tkzname{gergonne}}
790
791 The Gergonne Point is the point of concurrency which results from connecting the vertices of a triangle to the opposite points of tangency of the triangle's incircle.
792 (Joseph Gergonne French mathematician )
793
794 \begin{tkzexample}[latex=8cm,small]
795 \begin{tikzpicture}
796 \tkzDefPoints{0/0/B,3.6/0/C,2.8/4/A}
797 \tkzDefTriangleCenter[gergonne](A,B,C)
798 \tkzGetPoint{Ge}
799 \tkzDefSpcTriangle[intouch](A,B,C){C_1,C_2,C_3}
800 \tkzDefCircle[in](A,B,C) \tkzGetPoints{I}{i}
801 \tkzDrawLines[add=.25 and .25,teal](A,B A,C B,C)
802 \tkzDrawSegments[new](A,C_1 B,C_2 C,C_3)
803 \tkzDrawPoints(A,...,C,C_1,C_2,C_3)
804 \tkzDrawPoints[red](Ge)
805 \tkzLabelPoints(B,C,C_1,Ge)
806 \tkzLabelPoints[above](A,C_2,C_3)
807 \end{tikzpicture}
808 \end{tkzexample}
809
810 \subsubsection{Option \tkzname{nagel}}
811 Let $Ta$ be the point at which the excircle with center $Ja$ meets the side $BC$ of a triangle $ABC$, and define $Tb$ and $Tc$ similarly. Then the lines $ATa$, $BTb$, and $CTc$ concur in the Nagel point $Na$.\\
812 \href{https://mathworld.wolfram.com/NagelPoint.html}{Weisstein, Eric W. "Nagel point." From MathWorld--A Wolfram Web Resource. }
813
814
815 \begin{tkzexample}[latex=7cm,small]
816 \begin{tikzpicture}[scale=.5]
817 \tkzDefPoints{0/0/A,6/0/B,4/6/C}
818 \tkzDefSpcTriangle[ex](A,B,C){Ja,Jb,Jc}
819 \tkzDefSpcTriangle[extouch](A,B,C){Ta,Tb,Tc}
820 \tkzDefTriangleCenter[nagel](A,B,C)
821 \tkzGetPoint{Na}
822 \tkzDrawPolygon[blue](A,B,C)
823 \tkzDrawLines[add=0 and 1](A,Ta B,Tb C,Tc)
824 \tkzDrawPoints[new](Ja,Jb,Jc,Ta,Tb,Tc)
825 \tkzClipBB
826 \tkzDrawLines[add=1 and 1,dashed](A,B B,C C,A)
827 \tkzDrawCircles[new](Ja,Ta Jb,Tb Jc,Tc)
828 \tkzDrawSegments[new,dashed](Ja,Ta Jb,Tb Jc,Tc)
829 \tkzDrawPoints(B,C,A)
830 \tkzDrawPoints[new](Na)
831 \tkzLabelPoints(B,C,A)
832 \tkzLabelPoints[new](Na)
833 \tkzLabelPoints[new](Ja,Jb,Jc,Ta,Tb,Tc)
834 \tkzMarkRightAngles[fill=gray!20](Ja,Ta,C
835 Jb,Tb,A Jc,Tc,B)
836 \end{tikzpicture}
837 \end{tkzexample}
838
839
840 \subsubsection{Option \tkzname{mittenpunkt}}
841
842 The mittenpunkt (also called the middlespoint) of a triangle $ABC$ is the symmedian point of the excentral triangle, i.e., the point of concurrence M of the lines from the excenters through the corresponding triangle side midpoints.\\
843 \href{https://mathworld.wolfram.com/Mittenpunkt.html}{Weisstein, Eric W. "Mittenpunkt." From MathWorld--A Wolfram Web Resource.}
844
845
846 \begin{tkzexample}[latex=8cm,small]
847 \begin{tikzpicture}[scale=.5]
848 \tkzDefPoints{0/0/A,6/0/B,4/6/C}
849 \tkzDefSpcTriangle[centroid](A,B,C){Ma,Mb,Mc}
850 \tkzDefSpcTriangle[ex](A,B,C){Ja,Jb,Jc}
851 \tkzDefSpcTriangle[extouch](A,B,C){Ta,Tb,Tc}
852 \tkzDefTriangleCenter[mittenpunkt](A,B,C)
853 \tkzGetPoint{Mi}
854 \tkzDrawPoints[new](Ma,Mb,Mc,Ja,Jb,Jc)
855 \tkzClipBB
856 \tkzDrawPolygon[blue](A,B,C)
857 \tkzDrawLines[add=0 and 1](Ja,Ma
858 Jb,Mb Jc,Mc)
859 \tkzDrawLines[add=1 and 1](A,B A,C B,C)
860 \tkzDrawCircles[new](Ja,Ta Jb,Tb Jc,Tc)
861 \tkzDrawPoints(B,C,A)
862 \tkzDrawPoints[new](Mi)
863 \tkzLabelPoints(Mi)
864 \tkzLabelPoints[left](Mb)
865 \tkzLabelPoints[new](Ma,Mc,Jb,Jc)
866 \tkzLabelPoints[above left](Ja,Jc)
867 \end{tikzpicture}
868 \end{tkzexample}
869
870 \subsubsection{Relation between \tkzname{gergonne}, \tkzname{centroid} and \tkzname{mittenpunkt}}
871
872 The Gergonne point $Ge$, triangle centroid $G$, and mittenpunkt $M$ are collinear, with GeG/GM=2.
873
874 \begin{tkzexample}[vbox,small]
875 \begin{tikzpicture}
876 \tkzDefPoints{0/0/A,2/2/B,8/0/C}
877 \tkzDefTriangleCenter[gergonne](A,B,C) \tkzGetPoint{Ge}
878 \tkzDefTriangleCenter[centroid](A,B,C)
879 \tkzGetPoint{G}
880 \tkzDefTriangleCenter[mittenpunkt](A,B,C)
881 \tkzGetPoint{M}
882 \tkzDrawLines[add=.25 and .25,teal](A,B A,C B,C)
883 \tkzDrawLines[add=.25 and .25,new](Ge,M)
884 \tkzDrawPoints(A,...,C)
885 \tkzDrawPoints[red,size=2](G,M,Ge)
886 \tkzLabelPoints(A,...,C,M,G,Ge)
887 \tkzMarkSegment[mark=s||](Ge,G)
888 \tkzMarkSegment[mark=s|](G,M)
889 \end{tikzpicture}
890 \end{tkzexample}
891
892 \endinput