summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-line.tex
blob: 8ecdac344f6d3439da7750821568a9e712fbef9d (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
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
\newpage
\section{Class \Iclass{line}} % (fold)
\label{sec:class_line}

\subsection{Attributes of a line} % (fold)
\label{sub:attributes_of_a_line}

Writing |L.AB = line: new (z.A,z.B)| creates an object of the class \tkzname{line} (the notation is arbitrary for the moment). Geometrically it is, as much ,the line passing through the points $A$ and $B$ as the segment $[AB]$. Thus we can use the midpoint of |L.AB| which is, of course, the midpoint of the segment $[AB]$. This medium is obtained with |L.AB.mid|. Note that |L.AB.pa = z.A| and |L.AB.pb = z.B|. Finally, if a line $L$ is the result of a method, you can obtain the points with |z.A,z.B = get_points (L)| or with the previous remark.

\begin{mybox}
   Creation |L.AB = line : new ( z.A , z.B ) |
\end{mybox}


The attributes are :

\vspace{1em}
\bgroup
\catcode`_=12
\small
\captionof{table}{Line attributes.}
\begin{tabular}{lll}
\toprule
\textbf{Attributes} & \textbf{Application} & \\
\Iattr{line}{pa}  & First point of the segment & |z.A = L.AB.pa| \\
\Iattr{line}{pb}  & Second point of the segment & \\
\Iattr{line}{type} & Type is 'line'    &  |L.AB.type = 'line'| \\  
\Iattr{line}{mid} & Middle of the segment& |z.M = L.AB.mid|\\
\Iattr{line}{slope} & Slope of the line & obtained with |an = L.AB.slope|\\
\Iattr{line}{length} & Length of the segment& |l = L.AB.length| \\  
\Iattr{line}{north\_pa}   & See next example& d(a,north—pa)=d(a,b)=d(east,b) =etc. \\
\Iattr{line}{north\_pb}   & &\\
\Iattr{line}{south\_pa}   & &\\
\Iattr{line}{south\_pb}   & &\\
\Iattr{line}{east}   & &\\
\Iattr{line}{west}   & &\\
\bottomrule
\end{tabular}
\egroup

\subsubsection{Example: attributes of class line} % (fold)
\label{ssub:example_class_line}
\begin{minipage}{.5\textwidth}
\begin{verbatim}
\begin{tkzelements}
  scale  = .5
   z.a   = point: new (1, 1)
   z.b   = point: new (5, 4)
   L.ab  = line : new (z.a,z.b)
   z.m   = L.ab.mid
   z.w   = L.ab.west
   z.e   = L.ab.east
   z.r   = L.ab.north_pa
   z.s   = L.ab.south_pb
   sl    = L.ab.slope
   len   = L.ab.length
\end{tkzelements}

\begin{tikzpicture}
   \tkzGetNodes
   \tkzDrawPoints(a,b,m,e,r,s,w)
   \tkzLabelPoints(a,b,e,r,s,w)
   \tkzLabelPoints[above](m)
   \tkzDrawLine(a,b)
   \tkzLabelSegment[sloped](a,b){ab = \tkzUseLua{len}}
   \tkzLabelSegment[above=12pt,sloped](a,b){slope of (ab) = \tkzUseLua{sl}}
\end{tikzpicture}
\end{verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}\begin{tkzelements}
scale = .5
z.a = point: new (1, 1)
z.b = point: new (5, 4)
L.ab = line : new (z.a,z.b)
z.m = L.ab.mid
z.w = L.ab.west
z.e = L.ab.east
z.r = L.ab.north_pa
z.s = L.ab.south_pb
sl = L.ab.slope
len = L.ab.length
\end{tkzelements}
\hspace*{\fill}
\begin{tikzpicture}
   \tkzGetNodes
   \tkzDrawPoints(a,b,m,e,r,s,w)
   \tkzLabelPoints(a,b)
   \tkzLabelPoint(r){north\_pa}
   \tkzLabelPoint(s){south\_pb}
   \tkzLabelPoint[below](m){mid}
   \tkzLabelPoint[right](w){west}
   \tkzLabelPoint[left](e){east}
   \tkzDrawLine(a,b)
   \tkzLabelSegment[above = 1em,sloped](a,b){ab = \pmpn{\tkzUseLua{len}}}
   \tkzLabelSegment[above=2em,sloped](a,b){slope of (ab) =  \pmpn{\tkzUseLua{sl}}}
\end{tikzpicture}
\end{minipage}
% subsubsection example_class_line (end)

\subsubsection{Method \Imeth{line}{new} and line attributes}
\label{ssub:example_line_attributes}

Notation |L| or |L.AB| or |L.euler|. The notation is actually free.
|L.AB| can also represent the segment. 

With | L.AB  = line : new (z.A,z.B)|, a line is defined.


\begin{minipage}{0.5\textwidth}
\begin{tkzexample}[latex=0cm,small,code only]
\begin{tkzelements}
   z.A   = point : new (1,1)
   z.B   = point : new (3,2)
   L.AB  = line : new (z.A,z.B)
   z.C   = L.AB.north_pa
   z.D   = L.AB.south_pa
\end{tkzelements}
\begin{tikzpicture}
   \tkzGetNodes
   \tkzDrawLines(A,B C,D)
   \tkzDrawPoints(A,...,D)
   \tkzLabelPoints(A,...,D)
   \tkzMarkRightAngle(B,A,C)
   \tkzMarkSegments(A,C A,B A,D)
\end{tikzpicture}
\end{tkzexample}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tkzelements}
   scale = 1
   z.A   = point : new (1,1)
   z.B   = point : new (3,2)
   L.AB  = line : new (z.A,z.B)
   z.C   = L.AB.north_pa
   z.D   = L.AB.south_pa
\end{tkzelements}
\begin{tikzpicture}
   \tkzGetNodes
   \tkzDrawLines(A,B C,D)
   \tkzDrawPoints(A,...,D)
   \tkzLabelPoints(A,...,D)
   \tkzMarkRightAngle(B,A,C)
   \tkzMarkSegments(A,C A,B A,D)
\end{tikzpicture}
\end{minipage}
% subsubsection example_line_attributes (end)
% subsection attributes_of_a_line (end)

\clearpage\newpage
\subsection{Methods of the class line} % (fold)
\label{sub:methods_from_class_line}
Here's the list of methods for the \tkzNameObj{line} object. The results are either reals, points, lines, circles or triangles.
\subsubsection{Table of the methods from  class line} % (fold)
\label{ssub:table_of_the_methods_from_class_line}

\vspace{1em}
\begin{minipage}{\textwidth}
   \bgroup
   \catcode`_=12
   \small
   \captionof{table}{Methods of the class line.}
   \begin{tabular}{lll}
   \toprule
   \textbf{Methods} & \textbf{Comments} & \\
   \midrule 
   \Imeth{line}{new(A, B)}      & |L.AB = line : new(z.A,z.B)| line through the points $A$ and $B$&\\
   \midrule 
    \textbf{Points} &&\\
   \midrule 
   \Imeth{line}{gold\_ratio ()}  & |z.C = L.AB : gold_ratio()|   & gold ratio   \\
   \Imeth{line}{normalize ()}  & |z.C = L.AB : normalize()| & AC =1 and $C\in (AB)$   \\
   \Imeth{line}{normalize\_inv ()}  & |z.C = L.AB : normalize_inv()|   & CB =1 and $C\in (AB)$  \\
   \Imeth{line}{barycenter (ka,kb)}    & |z.C = L.AB : barycenter (1,2)| $C$ & barycenter of |{(A,1)(B,2)}|\\
   \Imeth{line}{point (t)} & |z.C = L.AB : point (2)| &  $\overrightarrow{AC} = 2\overrightarrow{AB}$\\
   \Imeth{line}{midpoint ()}    & |z.M = L.AB : midpoint ()| & better is |z.M = L.AB.mid|  \\
   \Imeth{line}{harmonic\_int }  & |z.D = L.AB : harmonic_int (z.C)| & $D\in [AB]$ $C\notin [AB]$\\
   \Imeth{line}{harmonic\_ext (pt)}  & |z.D = L.AB : harmonic_ext (z.C)| & $D\notin [AB]$ $C\in [AB]$\\
   \Imeth{line}{harmonic\_both (k)}  & |z.C,z.D = L.AB : harmonic_both (tkzphi)| & ${ {CA/CB}={DA/DB}=t\varphi.}$\\
   \Imeth{line}{square ()} & |S.AB =(L.AB : square ()) | &  create a square |S.AB|.\footnote{ |_,_,z.C,z.D = get_points(S.AB)|}\\
   \midrule 
    \textbf{Lines} &&\\
   \midrule  
   \Imeth{line}{ll\_from ( pt )}  & |L.CD = L.AB : ll_from  (z.C)| & $(CD) \parallel (AB)$ \\
   \Imeth{line}{ortho\_from ( pt )} & |L.CD = L.AB : ortho_from  (z.C)|&  $(CD) \perp (AB)$\\
   \Imeth{line}{mediator ()}&|L.uv = L.AB : mediator ()| & $(u,v)$ mediator of $(A,B)$\\
   \midrule 
    \textbf{Triangles}&&\\
   \midrule  
   \Imeth{line}{equilateral (swap)}  & |T.ABC = L.AB : equilateral ()|  $(\overrightarrow{AB},\overrightarrow{AC})>0$  & or < with swap \footnote{Triangles are defined in the direct sense of rotation, unless the "swap" option is present.}  \\
   \Imeth{line}{isosceles (phi,swap)}     & |T.ABC = L.AB : isosceles (math.pi/6)|& \\
   \Imeth{line}{gold (swap)}     & |T.ABC = L.AB : gold ()| & right in $B$ and $AC = \varphi \times AB $ \\
   \Imeth{line}{euclide (swap)}   & |T.ABC = L.AB : euclide ()| & $AB=AC$ and   $(\overrightarrow{AB},\overrightarrow{AC}) = math.pi/5$    \\
   \Imeth{line}{golden (swap)}    & |T.ABC = L.AB : golden ()|   & $(\overrightarrow{AB},\overrightarrow{AC}) = 2\times \pi/5$   \\
   \midrule 
    \textbf{Circles} &&\\
   \midrule 
   \Imeth{line}{circle ()}  & |C.AB = L.AB : circle ()| &  center pa through pb \\
   \Imeth{line}{circle\_swap ()}  & |C.BA = L.AB : circle\_swap ()|&  center pb through pa \\
   \Imeth{line}{apollonius (k)}  & |C.apo = L.AB : apollonius (2)|&  Ensemble des points tq. |MA/MB = 2| \\
   \midrule 
    \textbf{Transformations} &&\\
   \midrule 
   \Imeth{line}{reflection ( obj )}  & |new obj = L.AB : reflection (obj|&\\
   \Imeth{line}{translation ( obj )} & |new obj = L.AB : translation (obj)|&\\
   \Imeth{line}{projection ( obj )}  & |z.H = L.AB : projection (z.C)| & $CH \perp (AB)$ and $H\in (AB)$\\
   \midrule 
    \textbf{Miscellaneous} &&\\
   \midrule 
   \Imeth{line}{distance (pt)}   & |d = L.Ab : distance (z.C)|  & see \ref{ssub:example_distance_and_projection}\\
   \Imeth{line}{in\_out (pt)}  & |b = L.AB: in_out(z.C)|  b=true if $C\in (AB)$ &\\
   \Imeth{line}{slope ()} &   |a = L.AB : slope()| & better is L.AB.slope \\
   \bottomrule
   \end{tabular}

   \egroup
\end{minipage}
% subsubsection table_of_the_methods_from_class_line (end)

Here are a few examples.

\subsubsection{Example: new line from a defined line} % (fold)
\label{ssub:new_line_from_a_defined_line}
\begin{minipage}{0.5\textwidth}
\begin{tkzexample}[latex=0cm,small,code only]
\begin{tkzelements}
   scale = 1.25
   z.A   = point : new (1,1)
   z.B   = point : new (3,2)
   L.AB  = line : new (z.A,z.B)
   z.C   = L.AB.north_pa
   z.D   = L.AB.south_pa
   L.CD  = line : new (z.C,z.D)
   _,z.E   = get_points ( L.CD: ll_from (z.B))
   -- z.E   = L2.pb
\end{tkzelements}
\begin{tikzpicture}
   \tkzGetNodes
   \tkzDrawLines(A,B C,D B,E)
   \tkzDrawPoints(A,...,E)
   \tkzLabelPoints(A,...,E)
   \tkzMarkRightAngle(B,A,C)
   \tkzMarkSegments(A,C A,B A,D)
\end{tikzpicture}
\end{tkzexample}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tkzelements}
scale = 1.25
z.A   = point : new (1,1)
z.B   = point : new (3,2)
L.AB  = line : new (z.A,z.B)
z.C   = L.AB.north_pa
z.D   = L.AB.south_pa
L.CD  = line : new (z.C,z.D)
_,z.E   = get_points ( L.CD: ll_from (z.B))
-- or  z.E   = L2.pb with |L2 = L.CD: ll_from (z.B)|
\end{tkzelements}
\hspace*{\fill}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawLines(A,B C,D B,E)
\tkzDrawPoints(A,...,E)
\tkzLabelPoints(A,...,E)
\tkzMarkRightAngle(B,A,C)
\tkzMarkSegments(A,C A,B A,D)
\end{tikzpicture}
\hspace*{\fill}
\end{minipage}
 %  \caption{New line from defined line}
% subsubsection new_line_from_a_defined_line (end)


\subsubsection{Example: projection of several points} % (fold)
\label{ssub:example_projection_of_several_points}
\begin{minipage}{0.5\textwidth}
\begin{tkzexample}[latex=0cm,small,code only]
\begin{tkzelements}
   scale     = .8
   z.a       = point:  new (0, 0)
   z.b       = point:  new (4, 1)
   z.c       = point:  new (2, 5)
   z.d       = point:  new (5, 2)
   L.ab      = line:   new (z.a,z.b)
   z.cp,z.dp = L.ab:  projection(z.c,z.d)
\end{tkzelements}
 \begin{tikzpicture}
   \tkzGetNodes
   \tkzDrawLines(a,b c,c' d,d')
   \tkzDrawPoints(a,...,d,c',d')
   \tkzLabelPoints(a,...,d,c',d')
 \end{tikzpicture}
 \end{tkzexample}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tkzelements}
scale  = .8
z.a    = point:  new (0, 0)
z.b    = point:  new (4, 1)
z.c    = point:  new (2, 5)
z.d    = point:  new (5, 2)
L.ab        = line:   new (z.a,z.b)
z.cp,z.dp   = L.ab :  projection(z.c,z.d)
\end{tkzelements}
\hspace*{\fill}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawLines(a,b c,c' d,d')
\tkzDrawPoints(a,...,d,c',d')
\tkzLabelPoints(a,...,d,c',d')
\end{tikzpicture}
\hspace*{\fill}
\end{minipage}

% \caption{Projection of several points}
% subsubsection example_projection_of_several_points (end)

\subsubsection{Example: combination of methods} % (fold)
\label{ssub:example_combination_of_methods}

\begin{minipage}{0.6\textwidth}
\begin{tkzexample}[small,code only]
\begin{tkzelements}
   z.A     = point: new (0 , 0)
   z.B     = point: new (6 , 0)
   z.C     = point: new (1 , 5)
   T.ABC   = triangle: new (z.A,z.B,z.C)
   L.AB    = T.ABC.ab
   z.O     = T.ABC.circumcenter
   C.OA    = circle: new (z.O,z.A)
   z.H     = L.AB: projection (z.O)
   L.ab    = C.OA: tangent_at (z.A)
   z.a,z.b = L.ab.pa,L.ab.pb
  -- or z.a,z.b  = get_points (L.ab)
\end{tkzelements}
\begin{tikzpicture}
   \tkzGetNodes
   \tkzDrawPolygon(A,B,C)
   \tkzDrawCircle(O,A)
   \tkzDrawSegments[purple](O,A O,B O,H)
   \tkzDrawArc[red](O,A)(B)
   \tkzDrawArc[blue](O,B)(A)
   \tkzDrawLine[add = 2 and 1](A,a)
   \tkzFillAngles[teal!30,opacity=.4](A,C,B b,A,B A,O,H)
   \tkzMarkAngles[mark=|](A,C,B b,A,B A,O,H H,O,B)
   \tkzDrawPoints(A,B,C,H,O)
   \tkzLabelPoints(A,B,C,H,O)
\end{tikzpicture}
\end{tkzexample}
\end{minipage}
\begin{minipage}{0.4\textwidth}
\begin{tkzelements}
scale   = .5
z.A     = point: new (0 , 0)
z.B     = point: new (6 , 0)
z.C     = point: new (1 , 5)
T.ABC   = triangle: new (z.A,z.B,z.C)
L.AB    = T.ABC.ab
z.O     = T.ABC.circumcenter
C.OA    = circle: new (z.O,z.A)
z.H     = L.AB : projection (z.O)
L.ab    = C.OA : tangent_at (z.A)
z.a,z.b = L.ab.pa,L.ab.pb
   -- or z.a,z.b  = get_points (L.ab)
\end{tkzelements}
\hspace*{\fill}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawPolygon(A,B,C)
\tkzDrawCircle(O,A)
\tkzDrawSegments[purple](O,A O,B O,H)
\tkzDrawArc[red](O,A)(B)
\tkzDrawArc[blue](O,B)(A)
\tkzDrawLine[add = 2 and 1](A,a)
\tkzFillAngles[teal!30,opacity=.4,,size=.5](A,C,B b,A,B A,O,H)
\tkzMarkAngles[mark=|,size=.5](A,C,B b,A,B A,O,H H,O,B)
\tkzDrawPoints(A,B,C,H,O)
\tkzLabelPoints(A,B,C,H,O)
\end{tikzpicture}
\hspace*{\fill}
\end{minipage}

% subsubsection example_combination_of_methods (end)

\subsubsection{Example: translation} % (fold)
\label{ssub:example_translation}

\begin{minipage}{0.6\textwidth}
\begin{tkzexample}[small,code only]
\begin{tkzelements}
   z.A  = point:  new (0,0)
   z.B  = point:  new (1,2)
   z.C  = point:  new (-3,2)
   z.D  = point:  new (0,2)
   L.AB = line : new (z.A,z.B)
   z.E,z.F = L.AB : translation (z.C,z.D)
\end{tkzelements}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawPoints(A,...,F)
\tkzLabelPoints(A,...,F)
\tkzDrawSegments[->,red,> =latex](C,E D,F A,B)
\end{tikzpicture}
\end{tkzexample}
\end{minipage}
\begin{minipage}{0.4\textwidth}
\begin{tkzelements}
   z.A  = point:  new (0,0)
   z.B  = point:  new (1,2)
   z.C  = point:  new (-3,2)
   z.D  = point:  new (0,2)
   L.AB = line : new (z.A,z.B)
   z.E,z.F = L.AB : translation (z.C,z.D)
\end{tkzelements}
\hspace*{\fill}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawPoints(A,...,F)
\tkzLabelPoints(A,...,F)
\tkzDrawSegments[->,red,> =latex](C,E D,F A,B) )
\end{tikzpicture}
\hspace*{\fill}
\end{minipage}

% subsubsection example_translation (end)

\subsubsection{Example: distance and projection} % (fold)
\label{ssub:example_distance_and_projection}

\begin{minipage}{0.5\textwidth}
\begin{tkzexample}[latex=0cm,small,code only]
\begin{tkzelements}
   z.A    = point : new (0 , 0)
   z.B    = point : new (5 , -2)
   z.C    = point : new (3 , 3)
   L.AB   = line : new (z.A,z.B)
   d      = L.AB : distance (z.C)
   z.H    = L.AB : projection (z.C)
\end{tkzelements}
\begin{tikzpicture}
  \tkzGetNodes
  \tkzDrawLines(A,B C,H)
  \tkzDrawPoints(A,B,C,H)
  \tkzLabelPoints(A,B,C,H)
  \tkzLabelSegment[above left,
  draw](C,H){$CH = \tkzUseLua{d}$}
\end{tikzpicture}
\end{tkzexample}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tkzelements}
   z.A    = point : new (0 , 0)
   z.B    = point : new (5 , -2)
   z.C    = point : new (3 , 3)
   L.AB   = line : new (z.A,z.B)
   d      = L.AB : distance (z.C)
   z.H    = L.AB : projection (z.C)
\end{tkzelements}
\hspace*{\fill}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawLines(A,B C,H)
\tkzDrawPoints(A,B,C,H)
\tkzLabelPoints(A,B,C,H)
\tkzLabelSegment[above left,draw](C,H){$CH = \tkzUseLua{d}$}
\end{tikzpicture}
\hspace*{\fill}
\end{minipage}

% \caption{Method distance with line object}
% subsubsection example_distance_and_projection (end)

\subsubsection{Reflection of object} % (fold)
\label{ssub:reflection_of_object}

\begin{minipage}{.5\textwidth}
   \begin{verbatim}
      \begin{tkzelements}
         z.A = point : new ( 0 , 0 ) 
         z.B = point : new ( 4 , 1 )
         z.E = point : new ( 0 , 2 ) 
         z.F = point : new ( 3 , 3 )  
         z.G = point : new ( 4 , 2 )
         L.AB = line : new ( z.A , z.B )
         T.EFG = triangle : new (z.E,z.F,z.G)
         T.new = L.AB : reflection (T.EFG)
         z.Ep,z.Fp,z.Gp = get_points(T.new)
      \end{tkzelements}
      \begin{tikzpicture}
         \tkzGetNodes
         \tkzDrawLine(A,B)
         \tkzDrawPolygon(E,F,G)
         \tkzDrawPolygon[new](E',F',G')
         \tkzDrawSegment[red,dashed](E,E')
      \end{tikzpicture}
   \end{verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
   z.A = point : new ( 0 , 0 ) 
   z.B = point : new ( 4 , 1 )
   z.E = point : new ( 0 , 2 ) 
   z.F = point : new ( 3 , 3 )  
   z.G = point : new ( 4 , 2 )
   L.AB = line : new ( z.A , z.B )
   T.EFG = triangle : new (z.E,z.F,z.G)
   T.new = L.AB : reflection (T.EFG)
   z.Ep,z.Fp,z.Gp = get_points(T.new)
\end{tkzelements}
\hspace{\fill}\begin{tikzpicture}
   \tkzGetNodes
   \tkzDrawLine(A,B)
   \tkzDrawPolygon(E,F,G)
   \tkzDrawPolygon[new](E',F',G')
   \tkzDrawSegment[red,dashed](E,E')
\end{tikzpicture}
\end{minipage}
% subsubsection reflection_of_object (end)


\subsection{Apollonius circle MA/MB = k} % (fold)
\label{sub:apollonius_circle_ma_mb_k}

\begin{tkzelements}
z.A = point : new ( 0 , 0 )
z.B = point : new ( 6 , 0 )  
L.AB =line: new (z.A,z.B)
C.apo = L.AB : apollonius (2)
z.O,z.C = get_points (	C.apo	) 
z.D = C.apo : antipode (z.C)
z.P = C.apo : point  (0.30)
\end{tkzelements}

\begin{tikzpicture}
\tkzGetNodes
\tkzFillCircle[blue!20,opacity=.2](O,C)
\tkzDrawCircle[blue!50!black](O,C)
\tkzDrawPoints(A,B,O,C,D,P)
\tkzLabelPoints[below right](A,B,O,C,D,P)
\tkzDrawSegments[orange](P,A P,B P,D B,D P,C)
\tkzDrawSegments[red](A,C)
\tkzDrawPoints(A,B)
\tkzLabelCircle[draw,fill=green!10,%
    text width=3cm,text centered,left=24pt](O,D)(60)%
  {$CA/CB=2$\\$PA/PB=2$\\$DA/DB=2$}
\tkzMarkRightAngle[opacity=.3,fill=lightgray](O,P,C)
\tkzMarkAngles[mark=||](A,P,D D,P,B)
\end{tikzpicture}

Remark: |\tkzUseLua{point.mod(z.P-z.A)/point.mod(z.P-z.B)}| = \tkzUseLua{point.mod(z.P-z.A)/point.mod(z.P-z.B)}
% subsection apollonius_circle_ma_mb_k (end)

% subsection methods_from_class_line (end)

% section class_line (end)
\endinput