Debian Codegraph @

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

raw
1 \newpage
2 \section{Circles}
3
4 Among the following macros, one will allow you to draw a circle, which is not a real feat. To do this, you will need to know the center of the circle and either the radius of the circle or a point on the circumference. It seemed to me that the most frequent use was to draw a circle with a given center passing through a given point. This will be the default method, otherwise you will have to use the \tkzname{R} option. There are a large number of special circles, for example the circle circumscribed by a triangle.
5
6 \begin{itemize}
7 \item I have created a first macro \tkzcname{tkzDefCircle} which allows, according to a particular circle, to retrieve its center and the measurement of the radius in cm. This recovery is done with the macros \tkzcname{tkzGetPoint} and \tkzcname{tkzGetLength};
8
9 \item then a macro \tkzcname{tkzDrawCircle};
10
11 \item then a macro that allows you to color in a disc, but without drawing the circle \tkzcname{tkzFillCircle};
12
13 \item sometimes, it is necessary for a drawing to be contained in a disk, this is the role assigned to \tkzcname{tkzClipCircle};
14
15 \item it finally remains to be able to give a label to designate a circle and if several possibilities are offered, we will see here \tkzcname{tkzLabelCircle}.
16 \end{itemize}
17
18 \subsection{Characteristics of a circle: \tkzcname{tkzDefCircle}}
19
20 This macro allows you to retrieve the characteristics (center and radius) of certain circles.
21
22 \begin{NewMacroBox}{tkzDefCircle}{\oarg{local options}\parg{A,B} or \parg{A,B,C}}%
23 \tkzHandBomb\ Attention the arguments are lists of two or three points. This macro is either used in partnership with \\ \tkzcname{tkzGetPoints} to obtain the center and a point on the circle, or by using \\ \tkzname{tkzFirstPointResult} and \tkzname{tkzSecondPointResult} if it is not necessary to keep the results. You can also use \tkzcname{tkzGetLength} to get the radius.
24
25 \medskip
26 \begin{tabular}{lll}%
27 \toprule
28 arguments & example & explanation \\
29 \midrule
30 \TAline{\parg{pt1,pt2} or \parg{pt1,pt2,pt3}}{\parg{A,B}} {$[AB]$ is radius $A$ is the center}
31 \bottomrule
32 \end{tabular}
33
34 \medskip
35 \begin{tabular}{lll}%
36 \toprule
37 options & default & definition \\
38 \midrule
39 \TOline{R} {circum}{circle characterized by a center and a radius}
40 \TOline{diameter}{circum}{circle characterized by two points defining a diameter}
41 \TOline{circum} {circum}{circle circumscribed of a triangle}
42 \TOline{in} {circum}{incircle a triangle}
43 \TOline{ex} {circum}{excircle of a triangle}
44 \TOline{euler or nine}{circum}{Euler's Circle}
45 \TOline{spieker} {circum}{Spieker Circle}
46 \TOline{apollonius} {circum}{circle of Apollonius}
47 \TOline{orthogonal from} {circum}{[orthogonal from = A ](O,M)}
48 \TOline{orthogonal through}{circum}{[orthogonal through = A and B](O,M)}
49 \TOline{K} {1}{coefficient used for a circle of Apollonius}
50 \bottomrule
51 \end{tabular}
52
53 \medskip
54 \emph{In the following examples, I draw the circles with a macro not yet presented. You may only need the center and a point on the circle. }
55 \end{NewMacroBox}
56
57 \subsubsection{Example with option \tkzname{R}}
58 We obtain with the macro \tkzcname{tkzGetPoint} a point of the circle which is the East pole.
59
60 \begin{tkzexample}[latex=7cm,small]
61 \begin{tikzpicture}[scale=1]
62 \tkzDefPoint(3,3){C}
63 \tkzDefPoint(5,5){A}
64 \tkzCalcLength(A,C) \tkzGetLength{rAC}
65 \tkzDefCircle[R](C,\rAC) \tkzGetPoint{B}
66 \tkzDrawCircle(C,B)
67 \tkzDrawSegment(C,A)
68 \tkzLabelSegment[above left](C,A){$2\sqrt{2}$}
69 \tkzDrawPoints(A,B,C)
70 \tkzLabelPoints(A,C,B)
71 \end{tikzpicture}
72 \end{tkzexample}
73
74
75 \subsubsection{Example with option \tkzname{diameter}}
76 It is simpler here to search directly for the middle of $[AB]$. The result is the center and if necessary
77 \begin{tkzexample}[latex=7cm,small]
78 \begin{tikzpicture}
79 \tkzDefPoint(0,0){O}
80 \tkzDefPoint(2,2){B}
81 \tkzDefCircle[diameter](O,B) \tkzGetPoint{A}
82 \tkzDrawCircle(A,B)
83 \tkzDrawPoints(O,A,B)
84 \tkzDrawSegment(O,B)
85 \tkzLabelPoints(O,A,B)
86 \tkzLabelSegment[above left](O,A){$\sqrt{2}$}
87 \tkzLabelSegment[above left](A,B){$\sqrt{2}$}
88 \tkzMarkSegments[mark=s||](O,A A,B)
89 \end{tikzpicture}
90 \end{tkzexample}
91
92 \subsubsection{Circles inscribed and circumscribed for a given triangle}
93
94 \begin{tkzexample}[latex=7cm,small]
95 \begin{tikzpicture}[scale=.75]
96 \tkzDefPoint(2,2){A} \tkzDefPoint(5,-2){B}
97 \tkzDefPoint(1,-2){C}
98 \tkzDefCircle[in](A,B,C)
99 \tkzGetPoints{I}{x}
100 \tkzDefCircle[circum](A,B,C)
101 \tkzGetPoint{K}
102 \tkzDrawCircles[new](I,x K,A)
103 \tkzLabelPoints[below](B,C)
104 \tkzLabelPoints[above left](A,I,K)
105 \tkzDrawPolygon(A,B,C)
106 \tkzDrawPoints(A,B,C,I,K)
107 \end{tikzpicture}
108 \end{tkzexample}
109
110 \subsubsection{Example with option \tkzname{ex}}
111 We want to define an excircle of a triangle relatively to point $C$
112
113 \begin{tkzexample}[latex=8cm,small]
114 \begin{tikzpicture}[scale=.75]
115 \tkzDefPoints{ 0/0/A,4/0/B,0.8/4/C}
116 \tkzDefCircle[ex](B,C,A)
117 \tkzGetPoints{J_c}{h}
118 \tkzDefPointBy[projection=onto A--C ](J_c)
119 \tkzGetPoint{X_c}
120 \tkzDefPointBy[projection=onto A--B ](J_c)
121 \tkzGetPoint{Y_c}
122 \tkzDefCircle[in](A,B,C)
123 \tkzGetPoints{I}{y}
124 \tkzDrawCircles[color=lightgray](J_c,h I,y)
125 \tkzDefPointBy[projection=onto A--C ](I)
126 \tkzGetPoint{F}
127 \tkzDefPointBy[projection=onto A--B ](I)
128 \tkzGetPoint{D}
129 \tkzDrawPolygon(A,B,C)
130 \tkzDrawLines[add=0 and 1.5](C,A C,B)
131 \tkzDrawSegments(J_c,X_c I,D I,F J_c,Y_c)
132 \tkzMarkRightAngles(A,F,I B,D,I J_c,X_c,A%
133 J_c,Y_c,B)
134 \tkzDrawPoints(B,C,A,I,D,F,X_c,J_c,Y_c)
135 \tkzLabelPoints(B,A,J_c,I,D)
136 \tkzLabelPoints[above](Y_c)
137 \tkzLabelPoints[left](X_c)
138 \tkzLabelPoints[above left](C)
139 \tkzLabelPoints[left](F)
140 \end{tikzpicture}
141 \end{tkzexample}
142
143 \subsubsection{Euler's circle for a given triangle with option \tkzname{euler}}
144
145 We verify that this circle passes through the middle of each side.
146 \begin{tkzexample}[latex=6cm,small]
147 \begin{tikzpicture}[scale=.75]
148 \tkzDefPoint(5,3.5){A}
149 \tkzDefPoint(0,0){B} \tkzDefPoint(7,0){C}
150 \tkzDefCircle[euler](A,B,C)
151 \tkzGetPoints{E}{e}
152 \tkzDefSpcTriangle[medial](A,B,C){M_a,M_b,M_c}
153 \tkzDrawCircle[new](E,e)
154 \tkzDrawPoints(A,B,C,E,M_a,M_b,M_c)
155 \tkzDrawPolygon(A,B,C)
156 \tkzLabelPoints[below](B,C)
157 \tkzLabelPoints[left](A,E)
158 \end{tikzpicture}
159 \end{tkzexample}
160
161 \subsubsection{Apollonius circles for a given segment option \tkzname{apollonius}}
162
163 \begin{tkzexample}[latex=9cm,small]
164 \begin{tikzpicture}[scale=0.75]
165 \tkzDefPoint(0,0){A}
166 \tkzDefPoint(4,0){B}
167 \tkzDefCircle[apollonius,K=2](A,B)
168 \tkzGetPoints{K1}{x}
169 \tkzDrawCircle[color = teal!50!black,
170 fill=teal!20,opacity=.4](K1,x)
171 \tkzDefCircle[apollonius,K=3](A,B)
172 \tkzGetPoints{K2}{y}
173 \tkzDrawCircle[color=orange!50,
174 fill=orange!20,opacity=.4](K2,y)
175 \tkzLabelPoints[below](A,B,K1,K2)
176 \tkzDrawPoints(A,B,K1,K2)
177 \tkzDrawLine[add=.2 and 1](A,B)
178 \end{tikzpicture}
179 \end{tkzexample}
180
181 \subsubsection{Circles exinscribed to a given triangle option \tkzname{ex}}
182 You can also get the center and the projection of it on one side of the triangle.
183
184 with \tkzcname{tkzGetFirstPoint\{Jb\}} and \tkzcname{tkzGetSecondPoint\{Tb\}}.
185
186 \begin{tkzexample}[latex=8cm,small]
187 \begin{tikzpicture}[scale=.6]
188 \tkzDefPoint(0,0){A}
189 \tkzDefPoint(3,0){B}
190 \tkzDefPoint(1,2.5){C}
191 \tkzDefCircle[ex](A,B,C) \tkzGetPoints{I}{i}
192 \tkzDefCircle[ex](C,A,B) \tkzGetPoints{J}{j}
193 \tkzDefCircle[ex](B,C,A) \tkzGetPoints{K}{k}
194 \tkzDefCircle[in](B,C,A) \tkzGetPoints{O}{o}
195 \tkzDrawCircles[new](J,j I,i K,k O,o)
196 \tkzDrawLines[add=1.5 and 1.5](A,B A,C B,C)
197 \tkzDrawPolygon[purple](I,J,K)
198 \tkzDrawSegments[new](A,K B,J C,I)
199 \tkzDrawPoints(A,B,C)
200 \tkzDrawPoints[new](I,J,K)
201 \tkzLabelPoints(A,B,C,I,J,K)
202 \end{tikzpicture}
203 \end{tkzexample}
204
205 \subsubsection{Spieker circle with option \tkzname{spieker}}
206 The incircle of the medial triangle $M_aM_bM_c$ is the Spieker circle:
207
208 \begin{tkzexample}[latex=6cm, small]
209 \begin{tikzpicture}[scale=1.25]
210 \tkzDefPoints{ 0/0/A,4/0/B,0.8/4/C}
211 \tkzDefSpcTriangle[medial](A,B,C){M_a,M_b,M_c}
212 \tkzDefTriangleCenter[spieker](A,B,C)
213 \tkzGetPoint{S_p}
214 \tkzDrawPolygon(A,B,C)
215 \tkzDrawPolygon[cyan](M_a,M_b,M_c)
216 \tkzDrawPoints(B,C,A)
217 \tkzDefCircle[spieker](A,B,C)
218 \tkzDrawPoints[new](M_a,M_b,M_c,S_p)
219 \tkzDrawCircle[new](tkzFirstPointResult,%
220 tkzSecondPointResult)
221 \tkzLabelPoints[right](M_a)
222 \tkzLabelPoints[left](M_b)
223 \tkzLabelPoints[below](A,B,M_c,S_p)
224 \tkzLabelPoints[above](C)
225 \end{tikzpicture}
226 \end{tkzexample}
227
228 \subsection{Projection of excenters}
229
230 \begin{NewMacroBox}{tkzDefProjExcenter}{\oarg{local options}\parg{A,B,C}\parg{a,b,c}\marg{X,Y,Z}}%
231 Each excenter has three projections on the sides of the triangle ABC. We can do this with one macro\\ \tkzcname{tkzDefProjExcenter[name=J](A,B,C)(a,b,c)\{Y,Z,X\}}.
232
233 \medskip
234 \begin{tabular}{lll}%
235 \toprule
236 options & default & definition \\
237 \midrule
238 \TOline{name} {no defaut}{used to name the vertices}
239 \bottomrule
240 \end{tabular}
241
242 \begin{tabular}{lll}%
243 arguments & default & definition \\
244 \midrule
245 \TAline{(pt1=$\alpha_1$,pt2=$\alpha_2$,\dots)}{no default}{Each point has a assigned weight}
246 \end{tabular}
247
248 \medskip
249 \end{NewMacroBox}
250
251 \subsubsection{\tkzname{Excircles}}
252
253 \begin{tkzexample}[vbox,small]
254 \begin{tikzpicture}[scale=.6]
255 \tikzset{line style/.append style={line width=.2pt}}
256 \tikzset{label style/.append style={color=teal,font=\footnotesize}}
257 \tkzDefPoints{0/0/A,5/0/B,0.8/4/C}
258 \tkzDefSpcTriangle[excentral,name=J](A,B,C){a,b,c}
259 \tkzDefSpcTriangle[intouch,name=I](A,B,C){a,b,c}
260 \tkzDefProjExcenter[name=J](A,B,C)(a,b,c){X,Y,Z}
261 \tkzDefCircle[in](A,B,C) \tkzGetPoint{I} \tkzGetSecondPoint{T}
262 \tkzDrawCircles[red](Ja,Xa Jb,Yb Jc,Zc)
263 \tkzDrawCircle(I,T)
264 \tkzDrawPolygon[dashed,color=blue](Ja,Jb,Jc)
265 \tkzDrawLines[add=1.5 and 1.5](A,C A,B B,C)
266 \tkzDrawSegments(Ja,Xa Ja,Ya Ja,Za
267 Jb,Xb Jb,Yb Jb,Zb
268 Jc,Xc Jc,Yc Jc,Zc
269 I,Ia I,Ib I,Ic)
270 \tkzMarkRightAngles[size=.2,fill=gray!15](Ja,Za,B Ja,Xa,B Ja,Ya,C Jb,Yb,C)
271 \tkzMarkRightAngles[size=.2,fill=gray!15](Jb,Zb,B Jb,Xb,C Jc,Yc,A Jc,Zc,B)
272 \tkzMarkRightAngles[size=.2,fill=gray!15](Jc,Xc,C I,Ia,B I,Ib,C I,Ic,A)
273 \tkzDrawSegments[blue](Jc,C Ja,A Jb,B)
274 \tkzDrawPoints(A,B,C,Xa,Xb,Xc,Ja,Jb,Jc,Ia,Ib,Ic,Ya,Yb,Yc,Za,Zb,Zc)
275 \tkzLabelPoints(A,Ya,Yb,Ja,I)
276 \tkzLabelPoints[left](Jb,Ib,Yc)
277 \tkzLabelPoints[below](Zb,Ic,Jc,B,Za,Xa)
278 \tkzLabelPoints[above right](C,Zc,Yb)
279 \tkzLabelPoints[right](Xb,Ia,Xc)
280 \end{tikzpicture}
281 \end{tkzexample}
282
283 \subsubsection{\tkzname{Orthogonal from}}
284 Orthogonal circle of given center. \tkzcname{tkzGetPoints\{z1\}\{z2\}} gives two points of the circle.
285
286 \begin{tkzexample}[latex=7cm,small]
287 \begin{tikzpicture}[scale=.75]
288 \tkzDefPoints{0/0/O,1/0/A}
289 \tkzDefPoints{1.5/1.25/B,-2/-3/C}
290 \tkzDefCircle[orthogonal from=B](O,A)
291 \tkzGetPoints{z1}{z2}
292 \tkzDefCircle[orthogonal from=C](O,A)
293 \tkzGetPoints{t1}{t2}
294 \tkzDrawCircle(O,A)
295 \tkzDrawCircles[new](B,z1 C,t1)
296 \tkzDrawPoints(t1,t2,C)
297 \tkzDrawPoints(z1,z2,O,A,B)
298 \tkzLabelPoints[right](O,A,B,C)
299 \end{tikzpicture}
300 \end{tkzexample}
301
302 \subsubsection{\tkzname{Orthogonal through}}
303 Orthogonal circle passing through two given points.
304 \begin{tkzexample}[latex=6cm,small]
305 \begin{tikzpicture}[scale=1]
306 \tkzDefPoint(0,0){O}
307 \tkzDefPoint(1,0){A}
308 \tkzDrawCircle(O,A)
309 \tkzDefPoint(-1.5,-1.5){z1}
310 \tkzDefPoint(1.5,-1.25){z2}
311 \tkzDefCircle[orthogonal through=z1 and z2](O,A)
312 \tkzGetPoint{c}
313 \tkzDrawCircle[new](tkzPointResult,z1)
314 \tkzDrawPoints[new](O,A,z1,z2,c)
315 \tkzLabelPoints[right](O,A,z1,z2,c)
316 \end{tikzpicture}
317 \end{tkzexample}
318
319 \endinput