summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-pointsSpc.tex
blob: f2bdf788cee45ca8c92d691d75d3520d790e96c1 (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
\section{Special points relating to a triangle}

\subsection{Triangle center: \tkzcname{tkzDefTriangleCenter}}

This macro allows you to define the center of a triangle.


\begin{NewMacroBox}{tkzDefTriangleCenter}{\oarg{local options}\parg{A,B,C}}%
\tkzHandBomb\ 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. You can use \tkzname{tkzPointResult} if it is not necessary to keep the results.

\medskip
\begin{tabular}{lll}%
\toprule
arguments & default & definition \\

\midrule
\TAline{(pt1,pt2,pt3)}{no default}{three points}
\midrule
options             & default & definition                         \\
\midrule
\TOline{ortho}  {circum}{intersection of the altitudes of a triangle}
\TOline{centroid} {circum}{centre of gravity. Intersection of the medians }
\TOline{circum}{circum}{circle center circumscribed}
\TOline{in}    {circum}{center of the circle inscribed in a triangle }
\TOline{ex}    {circum}{center of a circle exinscribed to a triangle }
\TOline{euler}{circum}{center of Euler's circle }
\TOline{symmedian} {circum}{Lemoine's point or symmedian centre or Grebe's point }
\TOline{spieker} {circum}{Spieker Circle Center}
\TOline{nagel}{circum}{Nagel Center}
\TOline{mittenpunkt} {circum}{also called the middlespoint}
\TOline{feuerbach}{circum}{Feuerbach Point}

\end{tabular}
\end{NewMacroBox}

\subsubsection{Option \tkzname{ortho} or \tkzname{orthic}}
 The intersection $H$ of the three altitudes  of a triangle is called the orthocenter.

\begin{tkzexample}[latex=5cm,small]
\begin{tikzpicture}
  \tkzDefPoint(0,0){A}
  \tkzDefPoint(5,1){B}
  \tkzDefPoint(1,4){C}
  \tkzClipPolygon(A,B,C)
  \tkzDefTriangleCenter[ortho](B,C,A)
    \tkzGetPoint{H}
  \tkzDefSpcTriangle[orthic,name=H](A,B,C){a,b,c}
  \tkzDrawPolygon[color=blue](A,B,C)
  \tkzDrawPoints(A,B,C,H)
  \tkzDrawLines[add=0 and 1](A,Ha B,Hb C,Hc)
  \tkzLabelPoint(H){$H$}
  \tkzAutoLabelPoints[center=H](A,B,C)
  \tkzMarkRightAngles(A,Ha,B B,Hb,C C,Hc,A)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Option \tkzname{centroid}}
\begin{tkzexample}[latex=5cm,small]
\begin{tikzpicture}[scale=.75]
  \tkzDefPoints{-1/1/A,5/1/B}
  \tkzDefEquilateral(A,B)
  \tkzGetPoint{C}
  \tkzDefTriangleCenter[centroid](A,B,C)
      \tkzGetPoint{G}
  \tkzDrawPolygon[color=brown](A,B,C)
  \tkzDrawPoints(A,B,C,G)
  \tkzDrawLines[add = 0 and 2/3](A,G B,G C,G)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Option \tkzname{circum}}
\begin{tkzexample}[latex=6cm,small]
 \begin{tikzpicture}
  \tkzDefPoints{0/1/A,3/2/B,1/4/C}
  \tkzDefTriangleCenter[circum](A,B,C)
  \tkzGetPoint{G}
  \tkzDrawPolygon[color=brown](A,B,C)
  \tkzDrawCircle(G,A)
  \tkzDrawPoints(A,B,C,G)
 \end{tikzpicture}
\end{tkzexample}

\subsubsection{Option \tkzname{in}}
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.
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.(\url{https://en.wikipedia.org/wiki/Incircle_and_excircles_of_a_triangle})
 
 \medskip
 We get the centre of the inscribed circle of the triangle. The result is of course in \tkzname{tkzPointResult}. We can retrieve it with \tkzcname{tkzGetPoint}.

\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}
  \tkzDefPoints{0/1/A,3/2/B,1/4/C}
  \tkzDefTriangleCenter[in](A,B,C)\tkzGetPoint{I}
  \tkzDefPointBy[projection=onto A--C](I)
  \tkzGetPoint{Ib}
  \tkzDrawPolygon[color=blue](A,B,C)
  \tkzDrawPoints(A,B,C,I)
  \tkzDrawLines[add = 0 and 2/3](A,I B,I C,I)
  \tkzDrawCircle(I,Ib)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Option \tkzname{ex}}
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.
(\url{https://en.wikipedia.org/wiki/Incircle_and_excircles_of_a_triangle})


 We get the centre of an inscribed circle of the triangle. The result is of course in \tkzname{tkzPointResult}. We can retrieve it with \tkzcname{tkzGetPoint}.

\begin{tkzexample}[latex=8cm,small]
  \begin{tikzpicture}[scale=.5]
    \tkzDefPoints{0/1/A,3/2/B,1/4/C}
    \tkzDefTriangleCenter[ex](B,C,A)
    \tkzGetPoint{J_c}
    \tkzDefPointBy[projection=onto A--B](J_c)
    \tkzGetPoint{Tc}
    %or
    % \tkzDefCircle[ex](B,C,A)
    % \tkzGetFirstPoint{J_c}
    % \tkzGetSecondPoint{Tc}
    \tkzDrawPolygon[color=blue](A,B,C)
    \tkzDrawPoints(A,B,C,J_c)
    \tkzDrawCircle[red](J_c,Tc)
    \tkzDrawLines[add=1.5 and 0](A,C B,C)
    \tkzLabelPoints(J_c)
  \end{tikzpicture}
\end{tkzexample}

\subsubsection{Option \tkzname{euler}}
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{http://mathworld.wolfram.com/Nine-PointCircle.html})

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=1]
 \tkzDefPoints{0/0/A,6/0/B,0.8/4/C}
 \tkzDefSpcTriangle[medial,
     name=M](A,B,C){_A,_B,_C}
 \tkzDefTriangleCenter[euler](A,B,C)
    \tkzGetPoint{N} % I= N nine points
 \tkzDefTriangleCenter[ortho](A,B,C)
    \tkzGetPoint{H}
 \tkzDefMidPoint(A,H) \tkzGetPoint{E_A}
 \tkzDefMidPoint(C,H) \tkzGetPoint{E_C}
 \tkzDefMidPoint(B,H) \tkzGetPoint{E_B}
 \tkzDefSpcTriangle[ortho,name=H](A,B,C){_A,_B,_C}
 \tkzDrawPolygon[color=blue](A,B,C)
 \tkzDrawCircle(N,E_A)
 \tkzDrawSegments[blue](A,H_A B,H_B C,H_C)
 \tkzDrawPoints(A,B,C,N,H)
 \tkzDrawPoints[red](M_A,M_B,M_C)
 \tkzDrawPoints[blue]( H_A,H_B,H_C)
 \tkzDrawPoints[green](E_A,E_B,E_C)
 \tkzAutoLabelPoints[center=N,
  font=\scriptsize](A,B,C,%
   M_A,M_B,M_C,%
   H_A,H_B,H_C,%
   E_A,E_B,E_C)
 \tkzLabelPoints[font=\scriptsize](H,N)
 \tkzMarkSegments[mark=s|,size=3pt,
     color=blue,line width=1pt](B,E_B E_B,H)
\end{tikzpicture}
\end{tkzexample}


\subsubsection{Option \tkzname{symmedian}}

\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}
  \tkzDefPoint(0,0){A}
  \tkzDefPoint(5,0){B}
  \tkzDefPoint(1,4){C}
  \tkzDefTriangleCenter[symmedian](A,B,C)\tkzGetPoint{K}
  \tkzDefTriangleCenter[median](A,B,C)\tkzGetPoint{G}
  \tkzDefTriangleCenter[in](A,B,C)\tkzGetPoint{I}
  \tkzDefSpcTriangle[centroid,name=M](A,B,C){a,b,c}
  \tkzDefSpcTriangle[incentral,name=I](A,B,C){a,b,c}
  \tkzDrawPolygon[color=blue](A,B,C)
  \tkzDrawLines[add = 0 and 2/3,blue](A,K B,K C,K)
  \tkzDrawSegments[red,dashed](A,Ma B,Mb C,Mc)
  \tkzDrawSegments[orange,dashed](A,Ia B,Ib C,Ic)
  \tkzDrawLine[add=2 and 2](G,I)
  \tkzDrawPoints(A,B,C,K,G,I)
\end{tikzpicture}
\end{tkzexample}


\subsubsection{Option \tkzname{nagel}}
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$.
\href{http://mathworld.wolfram.com/NagelPoint.html}{Weisstein, Eric W. "Nagel point." From MathWorld--A Wolfram Web Resource. }


\begin{tkzexample}[latex=8cm,small]
  \begin{tikzpicture}[scale=.5]
  \tkzDefPoints{0/0/A,6/0/B,4/6/C}
  \tkzDefSpcTriangle[ex](A,B,C){Ja,Jb,Jc}
  \tkzDefSpcTriangle[extouch](A,B,C){Ta,Tb,Tc}
  \tkzDrawPoints(Ja,Jb,Jc,Ta,Tb,Tc)
  \tkzLabelPoints(Ja,Jb,Jc,Ta,Tb,Tc)
  \tkzDrawPolygon[blue](A,B,C)
  \tkzDefTriangleCenter[nagel](A,B,C) \tkzGetPoint{Na}
  \tkzDrawPoints[blue](B,C,A)
  \tkzDrawPoints[red](Na)
  \tkzLabelPoints[blue](B,C,A)
  \tkzLabelPoints[red](Na)
  \tkzDrawLines[add=0 and 1](A,Ta B,Tb C,Tc)
  \tkzShowBB\tkzClipBB
  \tkzDrawLines[add=1 and 1,dashed](A,B B,C C,A)
  \tkzDrawCircles[ex,gray](A,B,C C,A,B B,C,A)
  \tkzDrawSegments[dashed](Ja,Ta Jb,Tb Jc,Tc)
  \tkzMarkRightAngles[fill=gray!20](Ja,Ta,C
              Jb,Tb,A Jc,Tc,B)
  \end{tikzpicture}
\end{tkzexample}


\subsubsection{Option   \tkzname{mittenpunkt}} 
\begin{tkzexample}[latex=8cm,small]
\begin{tikzpicture}[scale=.5]
 \tkzDefPoints{0/0/A,6/0/B,4/6/C}
 \tkzDefSpcTriangle[centroid](A,B,C){Ma,Mb,Mc}
 \tkzDefSpcTriangle[ex](A,B,C){Ja,Jb,Jc}
 \tkzDefSpcTriangle[extouch](A,B,C){Ta,Tb,Tc}
 \tkzDefTriangleCenter[mittenpunkt](A,B,C) 
 \tkzGetPoint{Mi}
 \tkzDrawPoints(Ma,Mb,Mc,Ja,Jb,Jc)
 \tkzClipBB
 \tkzDrawPolygon[blue](A,B,C)
 \tkzDrawLines[add=0 and 1](Ja,Ma 
               Jb,Mb Jc,Mc)
 \tkzDrawLines[add=1 and 1](A,B A,C B,C)
 \tkzDrawCircles[gray](Ja,Ta Jb,Tb Jc,Tc)
 \tkzDrawPoints[blue](B,C,A)
 \tkzDrawPoints[red](Mi)
 \tkzLabelPoints[red](Mi)
 \tkzLabelPoints[left](Mb)
 \tkzLabelPoints(Ma,Mc,Jb,Jc)
 \tkzLabelPoints[above left](Ja,Jc)
 \tkzShowBB
\end{tikzpicture}
\end{tkzexample}
%<---------------------------------------------------------------------->
%<---------------------------------------------------------------------->
\section{Draw a point}
\subsubsection{Drawing points \tkzcname{tkzDrawPoint}} \hypertarget{tdrp}{}

\begin{NewMacroBox}{tkzDrawPoint}{\oarg{local options}\parg{name}}%
\begin{tabular}{lll}%
arguments &  default & definition                 \\
\midrule
\TAline{name of point} {no default}  {Only one point name is accepted}
\bottomrule
\end{tabular}

\medskip
The argument is required. The disc takes the color of the circle, but  lighter. It is possible to change everything. The point is a node and therefore it is invariant if the drawing is modified by scaling.

\medskip
\begin{tabular}{lll}%
\toprule
options             & default & definition \\
\midrule
\TOline{shape}  {circle}{Possible \tkzname{cross} or \tkzname{cross out}}
\TOline{size}  {6}{$6 \times$ \tkzcname{pgflinewidth}}
\TOline{color}  {black}{the default color can be changed }
\bottomrule
\end{tabular}

\medskip
{We can create other forms such as \tkzname{cross}}
\end{NewMacroBox}

\subsubsection{Example of point drawings}
Note that \tkzname{scale} does not affect the shape of the dots. Which is normal.  Most of the time, we are satisfied with a single point shape that we can define from the beginning, either with a macro or by modifying a configuration file.


\begin{tkzexample}[latex=5cm,small]
  \begin{tikzpicture}[scale=.5]
   \tkzDefPoint(1,3){A}
   \tkzDefPoint(4,1){B}
   \tkzDefPoint(0,0){O}
   \tkzDrawPoint[color=red](A)
   \tkzDrawPoint[fill=blue!20,draw=blue](B)
   \tkzDrawPoint[color=green](O)
  \end{tikzpicture}
\end{tkzexample}

It is possible to draw several points at once but this macro is a little slower than the previous one. Moreover, we have to make do with the same options for all the points.

\hypertarget{tdrps}{}
\begin{NewMacroBox}{tkzDrawPoints}{\oarg{local options}\parg{liste}}%
\begin{tabular}{lll}%
arguments &  default  & definition \\
\midrule
\TAline{points list}{no default}{example \tkzcname{tkzDrawPoints(A,B,C)}}
\bottomrule
\end{tabular}

\medskip
\begin{tabular}{lll}%
options             & default & definition \\
\midrule
\TOline{shape}  {circle}{Possible \tkzname{cross} or \tkzname{cross out}}
\TOline{size}  {6}{$6 \times$ \tkzcname{pgflinewidth}}
\TOline{color}  {black}{the default color can be changed }
\bottomrule
\end{tabular}

\medskip
\tkzHandBomb\ Beware of the final "s", an oversight leads to cascading errors if you try to draw multiple points. The options are the same as for the previous macro.
\end{NewMacroBox}

\subsubsection{First example}

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}
  \tkzDefPoint(1,3){A} 
  \tkzDefPoint(4,1){B} 
  \tkzDefPoint(0,0){C} 
  \tkzDrawPoints[size=6,color=red,
               fill=red!50](A,B,C)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Second example}

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=.5]
 \tkzDefPoint(2,3){A}  \tkzDefPoint(5,-1){B}
 \tkzDefPoint[label=below:$\mathcal{C}$,
               shift={(2,3)}](-30:5.5){E}
 \begin{scope}[shift=(A)]
    \tkzDefPoint(30:5){C}
 \end{scope}
 \tkzCalcLength[cm](A,B)\tkzGetLength{rAB}
 \tkzDrawCircle[R](A,\rAB cm)
 \tkzDrawSegment(A,B)
 \tkzDrawPoints(A,B,C)
 \tkzLabelPoints(B,C)
 \tkzLabelPoints[above](A)
\end{tikzpicture}
\end{tkzexample}

\section{Point on line or circle}
\subsection{Point on a line}

\begin{NewMacroBox}{tkzDefPointOnLine}{\oarg{local options}\parg{A,B}}%
\begin{tabular}{lll}%
arguments &  default & definition                 \\
\midrule
\TAline{pt1,pt2} {no default}  {Two points to define a line}
\bottomrule
\end{tabular}

\medskip
\begin{tabular}{lll}%
options       & default & definition \\
\midrule
\TOline{pos=nb}  {}{nb is a decimal  }
\end{tabular}
\end{NewMacroBox}

\subsubsection{Use of option \tkzname{pos}}
\begin{tkzexample}[latex=9cm,small]
  \begin{tikzpicture}
  \tkzDefPoints{0/0/A,4/0/B}
  \tkzDrawLine[red](A,B)
  \tkzDefPointOnLine[pos=1.2](A,B) 
  \tkzGetPoint{P}
  \tkzDefPointOnLine[pos=-0.2](A,B) 
  \tkzGetPoint{R}
  \tkzDefPointOnLine[pos=0.5](A,B) 
  \tkzGetPoint{S}
  \tkzDrawPoints(A,B,P)
  \tkzLabelPoints(A,B)
  \tkzLabelPoint[above](P){pos=$1.2$}
  \tkzLabelPoint[above](R){pos=$-.2$}
  \tkzLabelPoint[above](S){pos=$.5$}
  \tkzDrawPoints(A,B,P,R,S)
  \tkzLabelPoints(A,B)
  \end{tikzpicture}
\end{tkzexample}

\subsection{Point on a circle}

\begin{NewMacroBox}{tkzDefPointOnCircle}{\oarg{local options}}%
\begin{tabular}{lll}%
options   & default & definition \\
\midrule
\TOline{angle}  {0}{angle formed with the abscissa axis}
\TOline{center}  {|tkzPointResult|}{circle center required}
\TOline{radius}  {|\BS tkzLengthResult|}{radius circle}
\end{tabular}
\end{NewMacroBox}

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}
 \tkzDefPoints{0/0/A,4/0/B,0.8/3/C}  
 \tkzDefPointOnCircle[angle=90,center=B,radius=1 cm]
 \tkzGetPoint{I}    
 \tkzDefCircle[circum](A,B,C)
 \tkzGetPoint{G} \tkzGetLength{rG}
 \tkzDefPointOnCircle[angle=30,center=G,radius=\rG pt]
 \tkzGetPoint{J}
 \tkzDrawCircle[R,teal](B,1cm) 
 \tkzDrawPoint[teal](I)
 \tkzDrawPoints(A,B,C)
 \tkzDrawCircle(G,J)
 \tkzDrawPoints(G,J)
 \tkzDrawPoint[red](J)
 \tkzLabelPoints(G,J)
\end{tikzpicture}
\end{tkzexample}
\endinput