summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-circleby.tex
blob: 4df2f613334582cbc5c7963a55f0666e9a931af1 (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
\subsection{Definition of circle by transformation; \tkzcname{tkzDefCircleBy} }
These transformations are:

\begin{itemize}
   \item translation;
   \item homothety;
   \item orthogonal reflection or symmetry;
   \item central symmetry;
   \item orthogonal projection;
   \item rotation (degrees);
   \item orthogonal from ;
   \item orthogonal through;
   \item inversion.
\end{itemize}

The choice of transformations is made through the options. The macro is \tkzcname{tkzDefCircleBy} and the other for the transformation of a list of points \tkzcname{tkzDefCirclesBy}. For example, we'll write:
\begin{tkzltxexample}[]
\tkzDefCircleBy[translation= from A to A'](O,M) 
\end{tkzltxexample}
$O$ is the center and $M$ is a point on the circle.
The image is a circle. The new center is |tkzFirstPointResult| and |tkzSecondPointResult| is a point on the new circle. You can get the results with the macro \tkzcname{tkzGetPoints} .
\medskip
\begin{NewMacroBox}{tkzDefCircleBy}{\oarg{local options}\parg{pt1,pt2}}%
The argument is a couple of points. The results is a couple of points. If you want to keep these points then the macro \tkzcname{tkzGetPoints\{O'\}\{M'\}} allows you to assign the name \tkzname{O'} to the center and \tkzname{M'} to the point on the circle.

\begin{tabular}{lll}%
\toprule
arguments &  definition & examples               \\ 
\midrule
\TAline{pt1,pt2}   {existing points}   {$(O,M)$}
\bottomrule
\end{tabular}

\begin{tabular}{lll}%
options     &     & examples                         \\ 
\midrule
\TOline{translation}{= from \#1 to \#2}{[translation=from A to B](O,M)}
\TOline{homothety}  {= center \#1 ratio \#2}{[homothety=center A ratio .5](O,M)}
\TOline{reflection} {= over \#1--\#2}{[reflection=over A--B](O,M)}
\TOline{symmetry }  {= center \#1}{[symmetry=center A](O,M)}
\TOline{projection }{= onto \#1--\#2}{[projection=onto A--B](O,M)}
\TOline{rotation }  {= center \#1 angle \#2}{[rotation=center O angle 30](O,M)}
\TOline{orthogonal from} {= \#1}{[orthogonal from = A ](O,M)}
\TOline{orthogonal through}{= \#1 and \#2}{[orthogonal through = A and B](O,M)}
\TOline{inversion}{= center \#1 through \#2}{[inversion =center O through A](O,M)} 
% \TOline{inversion negative}{= center \#1 through \#2}{[inversion negative =center O through A](O,M)}
\bottomrule
\end{tabular}

The image is only defined and not drawn.
\end{NewMacroBox} 

\subsubsection{Examples of transformations} 

\subsubsection{\tkzname{Translation}}
\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[>=latex] 
 \tkzDefPoint(0,0){A}  \tkzDefPoint(3,1){B}
 \tkzDefPoint(3,2){C}   \tkzDefPoint(4,3){D}
 \tkzDefCircleBy[translation= from B to A](C,D) 
 \tkzGetPoints{C'}{D'} 
 \tkzDrawPoints[teal](A,B,C,D,C',D')
 \tkzDrawSegments[orange,->](A,B)
 \tkzDrawCircles(C,D C',D')
 \tkzLabelPoints[color=teal](A,B,C,C') 
 \tkzLabelPoints[color=teal,above](D,D') 
\end{tikzpicture} 
\end{tkzexample}

 \subsubsection{\tkzname{Reflection} (orthogonal symmetry)}

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[>=latex] 
 \tkzDefPoint(0,0){A}  \tkzDefPoint(3,1){B}
 \tkzDefPoint(3,2){C}   \tkzDefPoint(4,3){D}
 \tkzDefCircleBy[reflection = over A--B](C,D)
 \tkzGetPoints{C'}{D'} 
 \tkzDrawPoints[teal](A,B,C,D,C',D')
 \tkzDrawLine[add =0 and 1][orange](A,B)
 \tkzDrawCircles(C,D C',D')
 \tkzLabelPoints[color=teal](A,B,C,C') 
 \tkzLabelPoints[color=teal,above](D,D') 
\end{tikzpicture} 
\end{tkzexample}


\subsubsection{\tkzname{Homothety}}

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=1.2]
 \tkzDefPoint(0,0){A}   \tkzDefPoint(3,1){B}
 \tkzDefPoint(3,2){C}   \tkzDefPoint(4,3){D}
 \tkzDefCircleBy[homothety=center A ratio .5](C,D)
 \tkzGetPoints{C'}{D'}
 \tkzDrawPoints[teal](A,C,D,C',D')
 \tkzDrawCircles(C,D C',D')
 \tkzLabelPoints[color=teal](A,C,C')
 \tkzLabelPoints[color=teal,above](D,D') 
\end{tikzpicture}
\end{tkzexample}


\subsubsection{\tkzname{Symmetry}}
\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=1]
 \tkzDefPoint(0,0){A}   \tkzDefPoint(3,1){B}
 \tkzDefPoint(3,2){C}   \tkzDefPoint(4,3){D}
 \tkzDefCircleBy[symmetry=center B](C,D)
 \tkzGetPoints{C'}{D'}
 \tkzDrawPoints[teal](B,C,D,C',D')
 \tkzDrawLines[orange](C,C' D,D')
 \tkzDrawCircles(C,D C',D')
 \tkzLabelPoints[color=teal](A,C,C')
 \tkzLabelPoints[color=teal,above](D)
 \tkzLabelPoints[color=teal,below](D')
\end{tikzpicture}
\end{tkzexample}

\subsubsection{\tkzname{Rotation}}
\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=0.5]
 \tkzDefPoint(3,-1){B}
 \tkzDefPoint(3,2){C}   \tkzDefPoint(4,3){D}
 \tkzDefCircleBy[rotation=center B angle 90](C,D)
 \tkzGetPoints{C'}{D'}
 \tkzDrawPoints[teal](B,C,D,C',D')
 \tkzLabelPoints[color=teal](B,C,D,C',D')
 \tkzDrawCircles(C,D C',D')
\end{tikzpicture}
\end{tkzexample}


\subsubsection{\tkzname{Orthogonal from}}
Orthogonal circle of given center. \tkzcname{tkzGetPoints\{z1\}\{z2\}} gives two points of the circle.

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=.75]
  \tkzDefPoints{0/0/O,1/0/A}
  \tkzDefPoints{1.5/1.25/B,-2/-3/C}
  \tkzDefCircleBy[orthogonal from=B](O,A)
  \tkzGetPoints{z1}{z2}
  \tkzDefCircleBy[orthogonal from=C](O,A)
  \tkzGetPoints{t1}{t2}
  \tkzDrawCircle(O,A)
  \tkzDrawCircles[new](B,z1 C,t1)
  \tkzDrawPoints(t1,t2,C)
  \tkzDrawPoints(z1,z2,O,A,B)
  \tkzLabelPoints(O,A,B,C)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{\tkzname{Orthogonal from} : Right angle between circles}
We are looking for a circle orthogonal to the given circle.

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=.4]
\tkzDefPoints{0/0/A,6/0/B,4/2/D}
\tkzDefCircleBy[orthogonal from=B](A,D)
\tkzGetSecondPoint{C}
\tkzDrawCircles(A,C B,C)
\tkzDefTangent[at=C](A) \tkzGetPoint{a}
\tkzDefPointsBy[symmetry = center C](a){d}
\tkzDefTangent[at=C](B) \tkzGetPoint{b}
\tkzDrawLines[add=1 and 4](a,C  C,b)
\tkzDrawSegments(A,C B,C)
\tkzMarkRightAngle[fill=teal,opacity=.2,size=1](b,C,d)
\end{tikzpicture}
\end{tkzexample}

 \subsubsection{\tkzname{Orthogonal through}}
Orthogonal circle passing through two given points.
\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}[scale=1]
  \tkzDefPoint(0,0){O}
  \tkzDefPoint(1,0){A}
  \tkzDrawCircle(O,A)
  \tkzDefPoint(-1.5,-1.5){z1}
  \tkzDefPoint(1.5,-1.25){z2}
  \tkzDefCircleBy[orthogonal through=z1 and z2](O,A)
   \tkzGetPoint{c}
  \tkzDrawCircle[new](tkzPointResult,z1)
  \tkzDrawPoints[new](O,A,z1,z2,c)
  \tkzLabelPoints(O,A,z1,z2,c)
\end{tikzpicture}
\end{tkzexample}


\subsubsection{\tkzname{Inversion}}

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=1.5]
\tkzSetUpPoint[size=4,color=red,fill=red!20]
\tkzSetUpStyle[color=purple,ultra thin]{st1}
\tkzSetUpStyle[color=cyan,ultra thin]{st2}
\tkzDefPoint(2,0){A} \tkzDefPoint(3,0){B} 
\tkzDefPoint(3,2){C} \tkzDefPoint(4,2){D} 
\tkzDefCircleBy[inversion = center B through A](C,D) 
\tkzGetPoints{C'}{D'}
\tkzDrawPoints(A,B,C,D,C',D') 
\tkzLabelPoints(A,B,C,D,C',D')
\tkzDrawCircles(B,A)
\tkzDrawCircles[st1](C,D)
\tkzDrawCircles[st2](C',D')
\end{tikzpicture}
\end{tkzexample}


\endinput