%!TEX root = /Users/ego/Boulot/TKZ/tkz-euclide/doc_fr/TKZdoc-euclide-main.tex \section{Définition de points à l'aide d'un vecteur} \subsection{\tkzcname{tkzDefPointWith}} Il y a plusieurs possibilités pour créer des points qui répondent à certaines conditions vectorielles. Cela peut se faire avec \tkzcname{tkzDefPointWith}. Le principe général est le suivant, deux points sont passés en argument, autrement dit un vecteur. Les différentes options permettent d'obtenir un nouveau point formant avec le premier point (sauf exception) un vecteur colinéaire ou bien orthogonal au premier vecteur. Ensuite la longueur est soit proportionnelle à celle du premier, ou bien proportionnelle à l'unité. Dans la mesure ou ce point n'est utilisé que temporairement, il n'est pas obligé de le nommer immédiatement. Le résultat est dans \tkzcname{tkzPointResult}. La macro \tkzNameMacro{tkzGetPoint} permet de récupérer le point et de le nommer différemment. \begin{NewMacroBox}{tkzDefPointWith}{\parg{pt1,pt2}} Il s'agit en fait de la définition d'un point répondant à des conditions vectorielles. \medskip \begin{tabular}{lll} \toprule arguments & définition & explication \\ \midrule \TAline{(pt1,pt2)} {couple de points}{le résultat est un point dans \tkzcname{tkzPointResult} } \\ \bottomrule \end{tabular} \medskip Dans ce qui suit, on suppose que le point est récupéré par \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{K}{[linear](A,B),K=2}{$\overrightarrow{AC}=2\times \overrightarrow{AB}$} \bottomrule \end{tabular} \medskip \noindent\emph{Pour la linéarité, K est obligatoire. Sa valeur par défaut est égale à 1.} \end{NewMacroBox} \subsubsection{\tkzcname{tkzDefPointWith} et \tkzname{orthogonal}} $K=-1$ c'est pour que $(\overrightarrow{AC},\overrightarrow{AB})$ détermine un angle positif. AB=AC puisque $|K|=1$ \begin{tkzexample}[latex=6cm] \begin{tikzpicture}[scale=1.2] \tkzInit[xmax=5,ymax=4] \tkzGrid \tkzDefPoint(2,3){A} \tkzDefPoint(4,2){B} \tkzDefPointWith[orthogonal,K=-1](A,B) \tkzGetPoint{C} \tkzDrawPoints[color=red](A,B,C) \tkzLabelPoints[above right=3pt](A,B,C) \end{tikzpicture} \end{tkzexample} \subsubsection{\tkzcname{tkzDefPointWith} \tkzname{orthogonal normed}} AC=1 \begin{tkzexample}[latex=6cm] \begin{tikzpicture}[scale=1.2] \tkzInit[ymin=1,xmax=5,ymax=5] \tkzGrid \tkzDefPoint(2,3){A} \tkzDefPoint(4,2){B} \tkzDefPointWith[orthogonal normed](A,B) \tkzGetPoint{C} \tkzDrawPoints[color=red](A,B,C) \tkzLabelPoints[above right=3pt](A,B,C) \end{tikzpicture} \end{tkzexample} \subsubsection{\tkzcname{tkzDefPointWith} et \tkzname{orthogonal normed}} $K=2$ donc AC=2. \begin{tkzexample}[latex=6cm] \begin{tikzpicture}[scale=1.2] \tkzInit[ymin=1,xmax=5,ymax=5] \tkzGrid \tkzDefPoint(2,3){A} \tkzDefPoint(4,2){B} \tkzDefPointWith[orthogonal normed,K=2](A,B) \tkzGetPoint{C} \tkzDrawPoints[color=red](A,B,C) \tkzLabelPoints[above right=3pt](A,B,C) \end{tikzpicture} \end{tkzexample} \subsubsection{\tkzcname{tkzDefPointWith} et \tkzname{colinear}} $K=2$ donc AC=2. \begin{tkzexample}[latex=6cm] \begin{tikzpicture}[scale=1.2] \tkzInit[xmax=5,ymax=4] \tkzGrid \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) \end{tikzpicture} \end{tkzexample} \subsubsection{\tkzcname{tkzDefPointWith} \tkzname{linear} } Ici $K=0.5$ Cela revient à appliquer une homothétie ou bien encore une multiplication d'un vecteur par un réel. C est ici le milieu de $[AB]$. \begin{tkzexample}[latex=6cm] \begin{tikzpicture}[scale=1.2] \tkzInit[ymin=1,xmax=5,ymax=4] \tkzGrid \tkzDefPoint(1,3){A} \tkzDefPoint(4,2){B} \tkzDefPointWith[linear,K=0.5](A,B) \tkzGetPoint{C} \tkzDrawPoints[color=red](A,B,C) \tkzLabelPoints[above right=3pt](A,B,C) \end{tikzpicture} \end{tkzexample} \subsubsection{\tkzcname{tkzDefPointWith} \tkzname{linear normed}} Dans l'exemple suivant AC=1 et C appartient à $(AB)$. \begin{tkzexample}[latex=6cm] \begin{tikzpicture}[scale=1.2] \tkzInit[ymin=1,xmax=5,ymax=4] \tkzGrid \tkzDefPoint(1,3){A} \tkzDefPoint(4,2){B} \tkzDefPointWith[linear normed](A,B) \tkzGetPoint{C} \tkzDrawPoints[color=red](A,B,C) \tkzLabelPoints[above right=3pt](A,B,C) \end{tikzpicture} \end{tkzexample} \endinput