summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-pointwith.tex
blob: 98c1ef0c6dcbc50a8c5c0c9a6c0b3623530a2ae5 (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
\section{Defining points using a vector}

\subsection{\tkzcname{tkzDefPointWith}}
There are several possibilities to create points that meet certain vector conditions.
This can be done with \tkzcname{tkzDefPointWith}. The general principle is as follows, two points are passed as arguments, i.e. a vector. The different options allow to obtain a new point forming with the first point ( with some exceptions) a collinear vector or a vector orthogonal to the first vector. Then the length is either proportional to that of the first one, or proportional to the unit. Since this point is only used temporarily, it does not have to be named immediately. The result is in \tkzcname{tkzPointResult}. The macro \tkzNameMacro{tkzGetPoint} allows you to retrieve the point and name it differently.

 There are options to define the distance between the given point and the obtained point.
In the general case this distance is the distance between the 2 points given as arguments if the option is of the "normed" type then the distance between the given point and the obtained point is 1 cm. Then the $K$ option allows to obtain multiples.

\begin{NewMacroBox}{tkzDefPointWith}{\parg{pt1,pt2}}
 It is in fact the definition of a point meeting vectorial conditions.

\medskip
  
\begin{tabular}{lll}
\toprule
arguments             & definition & explication                         \\ 
\midrule
\TAline{(pt1,pt2)} {point couple}{the result is a point in \tkzcname{tkzPointResult} } \\

\bottomrule
\end{tabular}

\medskip
In what follows, it is assumed that the point is recovered by \tkzNameMacro{tkzGetPoint\{C\}}

\begin{tabular}{lll}
\toprule
options             & exemple & explication                         \\ 
\midrule
\TOline{orthogonal}{[orthogonal](A,B)}{$AC=AB$ et $\overrightarrow{AC} \perp \overrightarrow{AB}$}
\TOline{orthogonal normed}{[orthogonal normed](A,B)}{$AC=1$ et $\overrightarrow{AC} \perp \overrightarrow{AB}$} 
\TOline{linear}{[linear](A,B)}{$\overrightarrow{AC}=K \times \overrightarrow{AB}$}
\TOline{linear normed}{[linear normed](A,B)}{$AC=K$ et $\overrightarrow{AC}=k\times \overrightarrow{AB}$ }  
\TOline{colinear= at \#1}{[colinear= at C](A,B)}{$\overrightarrow{CD}= \overrightarrow{AB}$ }
\TOline{colinear normed= at \#1}{[colinear normed= at C](A,B)}{$\overrightarrow{CD}= \overrightarrow{AB}$ }
\TOline{K}{[linear](A,B),K=2}{$\overrightarrow{AC}=2\times \overrightarrow{AB}$}
  \bottomrule
\end{tabular}

\end{NewMacroBox}

\subsubsection{\tkzcname{tkzDefPointWith} et \tkzname{colinear at}}
 $(\overrightarrow{AB}=\overrightarrow{CD})$
\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}[scale=1.2,
   vect/.style={->,shorten >=3pt,>=latex'}]
  \tkzDefPoint(2,3){A}   \tkzDefPoint(4,2){B}
  \tkzDefPoint(0,1){C}
  \tkzDefPointWith[colinear=at C](A,B)
  \tkzGetPoint{D}
  \tkzDrawPoints[color=red](A,B,C,D)
  \tkzLabelPoints[above right=3pt](A,B,C,D)
  \tkzDrawSegments[vect](A,B C,D)
\end{tikzpicture}
\end{tkzexample}


\subsubsection{colinear at}

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[vect/.style={->,
	             shorten >=3pt,>=latex'}]
  \tkzDefPoint(0,0){A}
  \tkzDefPoint(5,0){B}
  \tkzDefPoint(1,2){C}
  \tkzDefPointWith[colinear=at C](A,B)
  \tkzGetPoint{G}
  \tkzDefPointWith[colinear=at C,K=0.5](A,B)
  \tkzGetPoint{H}
  \tkzLabelPoints(A,B,C,G,H)
  \tkzDrawPoints(A,B,C,G,H)
	\tkzDrawSegments[vect](A,B C,H)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{colinear $K=\frac{\sqrt{2}}{2}$}

\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}[vect/.style={->,
	          shorten >=3pt,>=latex'}]
 \tkzDefPoint(1,1){A}
 \tkzDefPoint(4,2){B}
 \tkzDefPoint(2,2){CU}
 \tkzDefPointWith[colinear=at C,K=sqrt(2)/2](A,B)
 \tkzGetPoint{D}
 \tkzDrawPoints[color=red](A,B,C,D)
 \tkzDrawSegments[vect](A,B C,D)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{\tkzcname{tkzDefPointWith} et \tkzname{orthogonal}}
$K=-1$ afin que $(\overrightarrow{AC},\overrightarrow{AB})$ détermine un angle positif. AB=AC puisque $|K|=1$
\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}[scale=1.2,
  vect/.style={->,shorten >=3pt,>=latex'}]
   \tkzDefPoint(2,3){A}   
	   \tkzDefPoint(4,2){B}
   \tkzDefPointWith[orthogonal,K=-1](A,B)
     \tkzGetPoint{C}
   \tkzDrawPoints[color=red](A,B,C)
   \tkzLabelPoints[right=3pt](A,B,C)
   \tkzDrawSegments[vect](A,B A,C)
   \tkzMarkRightAngle(B,A,C)
\end{tikzpicture}
\end{tkzexample}



\subsubsection{ orthogonal simple}
\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=.75]
  \tkzDefPoint(1,2){O}
  \tkzDefPoint(2,5){I}
  \tkzDefPointWith[orthogonal](O,I) 
  \tkzGetPoint{J}
  \tkzDefPointWith[orthogonal,K=-1](O,I)
  \tkzGetPoint{K}
  \tkzDrawSegment(O,I)
  \tkzDrawSegments[->](O,J O,K)
  \tkzMarkRightAngles(I,O,J I,O,K)
  \tkzDrawPoints(O,I,J,K)
  \tkzLabelPoints(O,I,J,K)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{advanced orthogonal}
\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=.75]
  \tkzDefPoints{0/0/A,6/0/B}
  \tkzDefMidPoint(A,B)
	  \tkzGetPoint{I}
  \tkzDefPointWith[orthogonal,K=-.75](B,A) 
  \tkzGetPoint{C}
  \tkzInterLC(B,C)(B,I)
	   \tkzGetPoints{D}{F}
  \tkzDuplicateSegment(B,F)(A,F)
  \tkzGetPoint{E}
  \tkzDrawArc[delta=10](F,E)(B)
  \tkzInterLC(A,B)(A,E)
	  \tkzGetPoints{N}{M}
  \tkzDrawArc[delta=10](A,M)(E)
  \tkzDrawLines(A,B B,C A,F)
  \tkzCompass(B,F)
  \tkzDrawPoints(A,B,C,F,M,E)
  \tkzLabelPoints(A,B,C,F,M,E)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{segment colinear and orthogonal}
\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=1.2,
  vect/.style={->,shorten >=3pt,>=latex'}]
   \tkzDefPoint(2,1){A}
   \tkzDefPoint(6,2){B}
   \tkzDefPointWith[orthogonal,K=.5](A,B) 
   \tkzGetPoint{C}
   \tkzDefPointWith[colinear=at C,K=.5](A,B) 
   \tkzGetPoint{D}
   \tkzMarkRightAngle[fill=gray!20](B,A,C)
   \tkzDrawSegments[vect](A,B A,C C,D)
   \tkzDrawPoints(A,...,D)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{\tkzcname{tkzDefPointWith}  \tkzname{orthogonal normed}, K=1}
AC=1

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=1.2,
  vect/.style={->,shorten >=3pt,>=latex'}]
  \tkzDefPoint(2,3){A}   \tkzDefPoint(4,2){B}
  \tkzDefPointWith[orthogonal normed](A,B)
  \tkzGetPoint{C}
  \tkzDrawPoints[color=red](A,B,C)
  \tkzDrawSegments[vect](A,B A,C)
  \tkzMarkRightAngle[fill=gray!20](B,A,C)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{\tkzcname{tkzDefPointWith} et  \tkzname{orthogonal normed} K=2}
$K=2$ donc AC=2.

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=1.2,
   vect/.style={->,shorten >=3pt,>=latex'}]
   \tkzDefPoint(2,3){A}   \tkzDefPoint(5,1){B}
   \tkzDefPointWith[orthogonal normed,K=2](A,B)
   \tkzGetPoint{C}
   \tkzDrawPoints[color=red](A,B,C)
   \tkzDrawCircle[R](A,2cm)
   \tkzDrawSegments[vect](A,B A,C)
   \tkzMarkRightAngle[fill=gray!20](B,A,C)
   \tkzLabelPoints[above=3pt](A,B,C)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{\tkzcname{tkzDefPointWith}  \tkzname{linear} }
 Ici $K=0.5$
This amounts to applying a homothety or a multiplication of a vector by a real. Here is the middle of $[AB]$.

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=1.2]
   \tkzDefPoint(1,3){A}   \tkzDefPoint(4,2){B}
   \tkzDefPointWith[linear,K=0.5](A,B)
   \tkzGetPoint{C}
   \tkzDrawPoints[color=red](A,B,C)
   \tkzDrawSegment(A,B)
   \tkzLabelPoints[above right=3pt](A,B,C)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{\tkzcname{tkzDefPointWith}  \tkzname{linear normed}}
In the following example AC=1 and C belongs to $(AB)$.

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=1.2]
 \tkzDefPoint(1,3){A}   \tkzDefPoint(4,2){B}
 \tkzDefPointWith[linear normed](A,B)
 \tkzGetPoint{C}
 \tkzDrawPoints[color=red](A,B,C)
 \tkzDrawSegment(A,B)
 \tkzLabelSegment(A,C){$1$}
 \tkzLabelPoints[above right=3pt](A,B,C)
\end{tikzpicture}
\end{tkzexample}



%<--------------------------------------------------------------------------–>
%         tkzGetVectxy  
%<--------------------------------------------------------------------------–>


\subsection{\tkzcname{tkzGetVectxy} } 
Retrieving the coordinates of a vector

\begin{NewMacroBox}{tkzGetVectxy}{\parg{$A,B$}\var{text}}
Allows to obtain the coordinates of a vector

\medskip
\begin{tabular}{lll}
\toprule
arguments             & example & explication                         \\

\midrule

\TAline{(point)\{name of macro\}} {\tkzcname{tkzGetVectxy}(A,B)\{V\}}{\tkzcname{Vx},\tkzcname{Vy} : coordinates of $\overrightarrow{AB}$}
\end{tabular}
\end{NewMacroBox}

\subsubsection{Coordinate transfer with \tkzcname{tkzGetVectxy}}

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}
 \tkzDefPoint(0,0){O}
 \tkzDefPoint(1,1){A}
 \tkzDefPoint(4,2){B}
 \tkzGetVectxy(A,B){v}
 \tkzDefPoint(\vx,\vy){V}
 \tkzDrawSegment[->,color=red](O,V)
 \tkzDrawSegment[->,color=blue](A,B)
 \tkzDrawPoints(A,B,O)
 \tkzLabelPoints(A,B,O,V)
\end{tikzpicture}
\end{tkzexample}



\endinput