summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-circleby.tex
blob: 7af83e2aa1c387b08317864bc9777780d1be631b (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
\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 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{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}

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

\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,right](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,right](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{Inversion}}

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=1.5]
\tkzSetUpPoint[size=3,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