summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-tools.tex
blob: 1123d86a2fca255ba744782e443dd7dd3d9077bc (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
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
\section{Miscellaneous tools and mathematical tools}
\subsection{Duplicate a segment} 
This involves constructing a segment on a given half-line of the same length as a given segment.

\begin{NewMacroBox}{tkzDuplicateSegment}{\parg{pt1,pt2}\parg{pt3,pt4}\marg{pt5}}%
This involves creating a segment on a given half-line of the same length as a given segment . It is in fact the definition of a point.
\tkzcname{tkzDuplicateSegment} is the new name of \tkzcname{tkzDuplicateLen}.

\medskip  
\begin{tabular}{lll}%
\toprule
arguments             & example & explanation                         \\ 

\midrule
\TAline{(pt1,pt2)(pt3,pt4)\{pt5\}} {\tkzcname{tkzDuplicateSegment}(A,B)(E,F)\{C\}}{AC=EF and $C \in [AB)$} \\  
\bottomrule
\end{tabular}

\medskip
\emph{The macro \tkzcname{tkzDuplicateLength} is identical to this one. }
\end{NewMacroBox}

\subsubsection{Use of\tkzcname{tkzDuplicateSegment}} 

\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}[scale=.5]
 \tkzDefPoints{0/0/A,2/-3/B,2/5/C}
 \tkzDuplicateSegment(A,B)(A,C)  
 \tkzGetPoint{D}
 \tkzDrawSegments[new](A,B A,C)
 \tkzDrawSegment[teal](A,D)
 \tkzDrawPoints[new](A,B,C,D) 
 \tkzLabelPoints[above right=3pt](A,B,C,D)
\end{tikzpicture} 
\end{tkzexample} 

\subsubsection{Proportion of gold with \tkzcname{tkzDuplicateSegment}} 
\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[rotate=-90,scale=.4]
 \tkzDefPoints{0/0/A,10/0/B}
 \tkzDefMidPoint(A,B)   
 \tkzGetPoint{I}
 \tkzDefPointWith[orthogonal,K=-.75](B,A)
 \tkzGetPoint{C}
 \tkzInterLC(B,C)(B,I)  \tkzGetSecondPoint{D}
 \tkzDuplicateSegment(B,D)(D,A) \tkzGetPoint{E}
 \tkzInterLC(A,B)(A,E)   \tkzGetPoints{N}{M}
 \tkzDrawArc[orange,delta=10](D,E)(B)
 \tkzDrawArc[orange,delta=10](A,M)(E)
 \tkzDrawLines(A,B B,C A,D)
 \tkzDrawArc[orange,delta=10](B,D)(I)
 \tkzDrawPoints(A,B,D,C,M,I)
 \tkzLabelPoints[below left](A,B,D,C,M,I)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Golden triangle or sublime triangle} 
\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=.75] 
  \tkzDefPoints{0/0/A,5/0/C,0/5/B} 
  \tkzDefMidPoint(A,C)\tkzGetPoint{H} 
  \tkzDuplicateSegment(H,B)(H,A)\tkzGetPoint{D} 
  \tkzDuplicateSegment(A,D)(A,B)\tkzGetPoint{E} 
  \tkzDuplicateSegment(A,D)(B,A)\tkzGetPoint{G} 
  \tkzInterCC(A,C)(B,G)\tkzGetSecondPoint{F}
  \tkzDrawLine(A,C)
  \tkzDrawArc(A,C)(B) 
  \begin{scope}[arc style/.style={color=gray,%
                               style=dashed}]
    \tkzDrawArc(H,B)(D) 
    \tkzDrawArc(A,D)(B) 
    \tkzDrawArc(B,G)(F) 
  \end{scope}
  \tkzDrawSegment[dashed](H,B) 
  \tkzCompass(B,F) 
  \tkzDrawPolygon[new](A,B,F)
  \tkzDrawPoints(A,...,H)
  \tkzLabelPoints[below left](A,...,H)
\end{tikzpicture}
\end{tkzexample}

\subsection{Segment length \tkzcname{tkzCalcLength}}
There's an option in \TIKZ\  named \tkzname{veclen}. This option
 is used to calculate AB if A and B are two points.

The only problem for me is that the version of \TIKZ\ is not accurate enough in some cases. My version uses the \tkzNamePack{xfp} package and is slower, but more accurate.

\begin{NewMacroBox}{tkzCalcLength}{\oarg{local options}\parg{pt1,pt2}}%
You can store the result with the macro \tkzcname{tkzGetLength} for example \tkzcname{tkzGetLength\{dAB\}} \\
defines the macro \tkzcname{dAB}.

\medskip
\begin{tabular}{lll}%
\toprule
arguments    & example & explanation       \\
\midrule
\TAline{(pt1,pt2)\{name of macro\}} {\tkzcname{tkzCalcLength}(A,B)}{\tkzcname{dAB} gives $AB$ in cm}
\bottomrule
\end{tabular}

\medskip
Only one option

\begin{tabular}{lll}%
   
\toprule
 options    & default & example       \\
\midrule
\TOline{cm}  {true}{\tkzcname{tkzCalcLength}(A,B) After \tkzcname{tkzGetLength\{dAB\}} \tkzcname{dAB} gives $AB$ in cm}
\end{tabular}
\end{NewMacroBox}

\subsubsection{Compass square construction}

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=1]
  \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B}
  \tkzCalcLength(A,B)\tkzGetLength{dAB}
  \tkzDefLine[perpendicular=through A](A,B)
  \tkzGetPoint{D}
  \tkzDefPointWith[orthogonal,K=-1](B,A)    
    \tkzGetPoint{F}
  \tkzGetPoint{C}
  \tkzDrawLine[add= .6 and .2](A,B)
  \tkzDrawLine(A,D) 
  \tkzShowLine[orthogonal=through A,gap=2](A,B)
  \tkzMarkRightAngle(B,A,D)
  \tkzCompasss(A,D D,C)
  \tkzDrawArc[R](B,\dAB)(80,110)
  \tkzDrawPoints(A,B,C,D)
  \tkzDrawSegments[color=gray,style=dashed](B,C C,D)
  \tkzLabelPoints[below left](A,B,C,D)
\end{tikzpicture}
\end{tkzexample}


\subsubsection{Example}
The macro \tkzcname{tkzDefCircle[radius](A,B)} defines the radius that we retrieve with \tkzcname{tkzGetLength},  this result is in \tkzname{cm}.

\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}[scale=.5]
 \tkzDefPoint(0,0){A}
 \tkzDefPoint(3,-4){B}
 \tkzDefMidPoint(A,B) \tkzGetPoint{M}
 \tkzCalcLength(M,B)\tkzGetLength{rAB}
 \tkzDrawCircle(A,B)
 \tkzDrawPoints(A,B)
 \tkzLabelPoints(A,B)
 \tkzDrawSegment[dashed](A,B)
 \tkzLabelSegment(A,B){$\pgfmathprintnumber{\rAB}$}
\end{tikzpicture}
\end{tkzexample}


\subsection{Transformation from pt to cm or cm to pt}
Not sure if this is necessary and it is only a division by 28.45274 and a multiplication by the same number. The macros are:

\begin{NewMacroBox}{tkzpttocm}{\parg{number}\marg{name of macro}}%
The result is stored in a macro.

\medskip
\begin{tabular}{lll}%
\toprule
arguments             & example & explanation                         \\
\midrule
\TAline{(number)\{name of macro\}} {\tkzcname{tkzpttocm}(120)\{len\}}{\tkzcname{len} gives a number of tkzname{cm}}
\bottomrule
\end{tabular}

\medskip
You'll have to use \tkzcname{len} along with \tkzname{cm}.
\end{NewMacroBox}

\subsection{Change of unit} 
\begin{NewMacroBox}{tkzcmtopt}{\parg{number}\marg{name of macro}}%
The result is stored in a macro.

\medskip
\begin{tabular}{lll}
\toprule
arguments             & example & explanation                         \\
\midrule
\TAline{(number)\{name of macro\}}{\tkzcname{tkzcmtopt}(5)\{len\}}{\tkzcname{len} length in \tkzname{pts}}
\bottomrule
\end{tabular}

\medskip
\emph{The result can be used with \tkzcname{len}\ \tkzname{pt}}
\end{NewMacroBox}


\subsection{Get point coordinates}
%<--------------------------------------------------------------------------–>
%                    Coordonnées d'un point 
%    result in #2x and #2y    #1 is the point and we get its coordinates
% use either $A$ one point \tkzGetPointCoord(A){V} then \Vx = xA and \Vy = yA
% in cm 
% tkzGetPointCoord with [#1] cm or  pt ?? todo
%<--------------------------------------------------------------------------–>
\begin{NewMacroBox}{tkzGetPointCoord}{\parg{$A$}\marg{name of macro}}%
\begin{tabular}{lll}%
arguments             & example & explanation                         \\
\midrule
\TAline{(point)\{name of macro\}} {\tkzcname{tkzGetPointCoord}(A)\{A\}}{\tkzcname{Ax} and \tkzcname{Ay} give coordinates for $A$}
\end{tabular}

\medskip
\emph{Stores in two macros the coordinates of a point. If the name of the macro is \tkzname{p}, then \tkzcname{px} and \tkzcname{py} give the coordinates of the chosen point with the cm as unit.}
\end{NewMacroBox}

\subsubsection{Coordinate transfer with \tkzcname{tkzGetPointCoord}}

\begin{tkzexample}[width=8cm,small]
\begin{tikzpicture}
 \tkzInit[xmax=5,ymax=3]
 \tkzGrid[sub,orange]
 \tkzDrawX \tkzDrawY
 \tkzDefPoint(1,0){A}
 \tkzDefPoint(4,2){B}
 \tkzGetPointCoord(A){a}
 \tkzGetPointCoord(B){b}
 \tkzDefPoint(\ax,\ay){C}
 \tkzDefPoint(\bx,\by){D}
 \tkzDrawPoints[color=red](C,D)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Sum of vectors with \tkzcname{tkzGetPointCoord}}
\begin{tkzexample}[width=6cm,small]
\begin{tikzpicture}[>=latex]
  \tkzDefPoint(1,4){a}
  \tkzDefPoint(3,2){b}
  \tkzDefPoint(1,1){c}
  \tkzDrawSegment[->,red](a,b)
  \tkzGetPointCoord(c){c}
  \draw[color=blue,->](a) -- ([shift=(b)]\cx,\cy) ;
  \draw[color=purple,->](b) -- ([shift=(b)]\cx,\cy) ;
  \tkzDrawSegment[->,blue](a,c)
  \tkzDrawSegment[->,purple](b,c)
\end{tikzpicture}
\end{tkzexample}

\subsection{Swap labels of points}

\begin{NewMacroBox}{tkzSwapPoints}{\parg{$pt1$,$pt2$}}%
\begin{tabular}{lll}%
arguments             & example & explanation                         \\
\midrule
\TAline{(pt1,pt2)} {\tkzcname{tkzSwapPoints}(A,B)}{now $A$ has the coordinates of $B$ }
\end{tabular}

\emph{The points have exchanged their coordinates.}
\end{NewMacroBox}

\subsubsection{Use of \tkzcname{tkzSwapPoints}}

\begin{tkzexample}[width=6cm,small]
\begin{tikzpicture}
  \tkzDefPoints{0/0/O,5/-1/A,2/2/B}
   \tkzSwapPoints(A,B)
   \tkzDrawPoints(O,A,B)
   \tkzLabelPoints(O,A,B)
\end{tikzpicture}
\end{tkzexample}

\subsection{Dot Product}
In Euclidean geometry, the dot product of the Cartesian coordinates of two vectors is widely used.

\begin{NewMacroBox}{tkzDotProduct}{\parg{$pt1$,$pt2$,$pt3$}}%
  The dot product of two vectors $\overrightarrow{u} = [a,b]$ and  $\overrightarrow{v} = [a',b']$ is defined as: $\overrightarrow{u}\cdot \overrightarrow{v} = aa' + bb'$

$\overrightarrow{u} = \overrightarrow{pt1pt2}$ $\overrightarrow{v} = \overrightarrow{pt1pt3}$
  
\begin{tabular}{lll}%
arguments             & example & explanation                         \\
\midrule
\TAline{(pt1,pt2,pt3)} {\tkzcname{tkzDotProduct}(A,B,C)}{the result is $\overrightarrow{AB}\cdot \overrightarrow{AC}$}
\end{tabular}

\emph{The result is a number that can be retrieved with \tkzcname{tkzGetResult}.}
\end{NewMacroBox}

\subsubsection{Simple example} % (fold)
\label{ssub:simple_example}

\begin{tkzexample}[small,latex=7cm]
\begin{tikzpicture}
  \tkzDefPoints{-2/-3/A,4/0/B,1/3/C}
  \tkzDefPointBy[projection= onto A--B](C)  
  \tkzGetPoint{H}
  \tkzDrawSegment(C,H)
  \tkzMarkRightAngle(C,H,A)
  \tkzDrawSegments[vector style](A,B A,C)
  \tkzDrawPoints(A,H) \tkzLabelPoints(A,B,H)
  \tkzLabelPoints[above](C)
  \tkzDotProduct(A,B,C) \tkzGetResult{pabc}
 % \pgfmathparse{round(10*\pabc)/10}
  \let\pabc\pgfmathresult
  \node at (1,-3) {$\overrightarrow{PA}\cdot \overrightarrow{PB}=\pabc$};
  \tkzDotProduct(A,H,B) \tkzGetResult{phab}
 % \pgfmathparse{round(10*\phab)/10}
  \let\phab\pgfmathresult
  \node at (1,-4) {$PA \times PH = \phab $};
\end{tikzpicture}
\end{tkzexample}
% subsubsection simple_example (end)


\subsubsection{Cocyclic points} % (fold)
\label{ssub:cocyclicpts}

\begin{tkzexample}[small,latex=7cm]
\begin{tikzpicture}[scale=.75]
  \tkzDefPoints{1/2/O,5/2/B,2/2/P,3/3/Q}
  \tkzInterLC[common=B](O,B)(O,B) \tkzGetFirstPoint{A}
  \tkzInterLC[common=B](P,Q)(O,B) \tkzGetPoints{C}{D}
  \tkzDrawCircle(O,B)
  \tkzDrawSegments(A,B C,D)
  \tkzDrawPoints(A,B,C,D,P)
  \tkzLabelPoints(P)
  \tkzLabelPoints[below left](A,C)
  \tkzLabelPoints[above right](B,D)
  \tkzDotProduct(P,A,B) \tkzGetResult{pab}
  \pgfmathparse{round(10*\pab)/10}
  \let\pab\pgfmathresult
  \tkzDotProduct(P,C,D) \tkzGetResult{pcd}
  \pgfmathparse{round(10*\pcd)/10}
  \let\pcd\pgfmathresult
  \node at (1,-3) {%
  $\overrightarrow{PA}\cdot \overrightarrow{PB} =
   \overrightarrow{PC}\cdot \overrightarrow{PD}$};
    \node at (1,-4)%
    {$\overrightarrow{PA}\cdot \overrightarrow{PB} =\pab$};
 \node at (1,-5){%
 $\overrightarrow{PC}\cdot \overrightarrow{PD} =\pcd$};
\end{tikzpicture}
\end{tkzexample}
% subsubsection cocyclicpts (end)

\newpage
\subsection{Power of a point with respect to a circle}

\begin{NewMacroBox}{tkzPowerCircle}{\parg{$pt1$}\parg{$pt2$,$pt3$}}%
\begin{tabular}{lll}%
arguments             & example & explanation                         \\
\midrule
\TAline{(pt1)(pt2,pt3)} {\tkzcname{tkzPowerCircle}(A)(O,M)}{power of $A$ with respect to the circle (O,A)}
\end{tabular}

\emph{The result is a number that represents the power of a point with respect to a circle.}
\end{NewMacroBox}

\subsubsection{Power from the radical axis} % (fold)
\label{ssub:power}

In this example, the radical axis $(EF)$ has been drawn. A point $H$ has been chosen on $(EF)$ and the power of the point $H$ with respect to the circle of center $A$ has been calculated as well as $PS^2$. You can check that the power of $H$ with respect to the circle of center $C$ as well as $HS'^2, HT^2, HT'^2$ give the same result.  

\begin{tkzexample}[small,latex=7cm]
\begin{tikzpicture}[scale=.5]
  \tkzDefPoints{-1/0/A,0/5/B,5/-1/C,7/1/D}
  \tkzDrawCircles(A,B C,D)
  \tkzDefRadicalAxis(A,B)(C,D) \tkzGetPoints{E}{F}
  \tkzDrawLine[add=1 and 2](E,F)
  \tkzDefPointOnLine[pos=1.5](E,F) \tkzGetPoint{H}
  \tkzDefLine[tangent from = H](A,B)\tkzGetPoints{T}{T'}
  \tkzDefLine[tangent from = H](C,D)\tkzGetPoints{S}{S'}
  \tkzDrawSegments(H,T H,T' H,S H,S')
  \tkzDrawPoints(A,B,C,D,E,F,H,T,T',S,S')
  \tkzPowerCircle(H)(A,B) \tkzGetResult{pw}
  \tkzDotProduct(H,S,S) \tkzGetResult{phtt}
  \node {Power $\approx \pw \approx \phtt$};
\end{tikzpicture}
\end{tkzexample}
% subsubsection power (end)

\subsection{Radical axis}

In geometry, the radical axis of two non-concentric circles is the set of points whose power with respect to the circles are equal. Here |\tkzDefRadicalAxis(A,B)(C,D)| gives the radical axis of the two circles $\mathcal{C}(A,B)$ and $\mathcal{C}(C,D)$. 

\begin{NewMacroBox}{tkzDefRadicalAxis}{\parg{$pt1$,$pt2$}\parg{$pt3$,$pt4$}}%
\begin{tabular}{lll}%
arguments             & example & explanation                         \\
\midrule
\TAline{(pt1,pt2)(pt3,pt4)} {\tkzcname{tkzDefRadicalAxis}(A,B)(C,D)}{Two circles with centers $A$ and $C$}
\midrule
\end{tabular}


\emph{The result is two points of the radical axis.}
\end{NewMacroBox}

\subsubsection{Two circles disjointed} % (fold)
\label{ssub:two_circles_disjointed}


\begin{tkzexample}[small,latex=8cm]
\begin{tikzpicture}[scale=.75]
    \tkzDefPoints{-1/0/A,0/2/B,4/-1/C,4/0/D}
    \tkzDrawCircles(A,B C,D)
    \tkzDefRadicalAxis(A,B)(C,D)
     \tkzGetPoints{E}{F}
    \tkzDrawLine[add=1 and 2](E,F)
    \tkzDrawLine[add=.5 and .5](A,C)
\end{tikzpicture}
\end{tkzexample}
% subsubsection two_circles_disjointed (end)

\subsection{Two intersecting circles} % (fold)
\label{sub:two_intersecting_circles}
\begin{tkzexample}[small,latex=8cm]
\begin{tikzpicture}[scale=.5]
  \tkzDefPoints{-1/0/A,0/2/B,3/-1/C,3/-2/D}
  \tkzDrawCircles(A,C B,D)
  \tkzDefRadicalAxis(A,C)(B,D)
  \tkzGetPoints{E}{F}
  \tkzDrawPoints(A,B,C,D,E,F)
    \tkzLabelPoints(A,B,C,D,E,F)
  \tkzDrawLine[add=.5 and 1](E,F)
  \tkzDrawLine[add=.25 and .25](A,B)
\end{tikzpicture}
\end{tkzexample}
% subsection two_intersecting_circles (end)


\subsection{Two externally tangent circles} % (fold)
\label{sub:two_externally_tangent_circles}
\begin{tkzexample}[small,latex=8cm]
\begin{tikzpicture}[scale=.5]
  \tkzDefPoints{0/0/A,4/0/B,6/0/C}
  \tkzDrawCircles(A,B C,B)
  \tkzDefRadicalAxis(A,B)(C,B)
  \tkzGetPoints{E}{F}
  \tkzDrawPoints(A,B,C,E,F)
    \tkzLabelPoints(A,B,C,E,F)
  \tkzDrawLine[add=1 and 1](E,F)
  \tkzDrawLine[add=.5 and .5](A,B)
\end{tikzpicture}
\end{tkzexample}
% subsection two_externally_tangent_circles (end)


\subsection{Two circles tangent internally} % (fold)
\label{sub:deux_cercles_tangents_interieurement}
\begin{tkzexample}[small,latex=8cm]
\begin{tikzpicture}[scale=.5]
  \tkzDefPoints{0/0/A,3/0/B,5/0/C}
  \tkzDrawCircles(A,C B,C)
  \tkzDefRadicalAxis(A,C)(B,C)
  \tkzGetPoints{E}{F}
  \tkzDrawPoints(A,B,C,E,F)
  \tkzLabelPoints[below right](A,B,C,E,F)
  \tkzDrawLine[add=1 and 1](E,F)
  \tkzDrawLine[add=.5 and .5](A,B)
\end{tikzpicture}
\end{tkzexample}
% subsection deux_cercles_tangents_interieurement (end)

\subsubsection{Three circles} % (fold)
\label{ssub:threecircles}



\begin{tkzexample}[small,latex=8cm]
\begin{tikzpicture}[scale=.4]
  \tkzDefPoints{0/0/A,5/0/a,7/-1/B,3/-1/b,5/-4/C,2/-4/c}
  \tkzDrawCircles(A,a B,b C,c)
  \tkzDefRadicalAxis(A,a)(B,b) \tkzGetPoints{i}{j}
  \tkzDefRadicalAxis(A,a)(C,c) \tkzGetPoints{k}{l}
  \tkzDefRadicalAxis(C,c)(B,b) \tkzGetPoints{m}{n}
  \tkzDrawLines[new](i,j k,l m,n)
\end{tikzpicture}
\end{tkzexample}
% subsubsection threecircles (end)
  
\subsection{\tkzcname{tkzIsLinear}, \tkzcname{tkzIsOrtho}}
 \begin{NewMacroBox}{tkzIsLinear}{\parg{$pt1$,$pt2$,$pt3$}}%
 \begin{tabular}{lll}%
 arguments             & example & explanation                         \\
 \midrule
 \TAline{(pt1,pt2,pt3)} {\tkzcname{tkzIsLinear}(A,B,C)}{$A,B,C$ aligned ?}
 \midrule
 \end{tabular}
 
 \emph{\tkzcname{tkzIsLinear} allows to test the alignment of the three points $pt1$,$pt2$,$pt3$. }
 \end{NewMacroBox}
 
 \begin{NewMacroBox}{tkzIsOrtho}{\parg{$pt1$,$pt2$,$pt3$}}%
 \begin{tabular}{lll}%
 arguments             & example & explanation                         \\
 \midrule
 \TAline{(pt1,pt2,pt3)} {\tkzcname{tkzIsOrtho}(A,B,C)}{$(AB)\perp (AC)$ ? }
 \midrule
 \end{tabular}
 
 \emph{\tkzcname{tkzIsOrtho} allows to test the orthogonality of lines $(pt1pt2)$ and $(pt1pt3)$. }
 \end{NewMacroBox}
 
 \subsubsection{Use of \tkzcname{tkzIsOrtho} and \tkzcname{tkzIsLinear}}
   
\begin{tkzexample}[small,latex=7cm]
  \begin{tikzpicture}
  \tkzDefPoints{1/-2/A,5/0/B}
  \tkzDefCircle[diameter](A,B) \tkzGetPoint{O}
  \tkzDrawCircle(O,A)
  \tkzDefPointBy[rotation= center O angle 60](B) 
  \tkzGetPoint{C}
  \tkzDefPointBy[rotation= center O angle 60](A) 
  \tkzGetPoint{D}
  \tkzDrawCircle(O,A)
  \tkzDrawPoints(A,B,C,D,O)
  \tkzIsOrtho(C,A,B)
  \iftkzOrtho
    \tkzDrawPolygon[blue](A,B,C)
  \tkzDrawPoints[blue](A,B,C,D)
  \else
  \tkzDrawPoints[red](A,B,C,D)
  \fi
   \tkzIsLinear(O,C,D)
    \iftkzLinear
    \tkzDrawSegment[orange](C,D)
    \fi
\end{tikzpicture}
  
\end{tkzexample}

  
\endinput