summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-point.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-point.tex')
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-point.tex261
1 files changed, 185 insertions, 76 deletions
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-point.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-point.tex
index ef9ddbfc76..45f7991c92 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-point.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-point.tex
@@ -97,15 +97,15 @@ This is the creation of a fixed point with coordinates 1 and 2 and which is name
\bgroup
\small
\catcode`_=12
-\captionof{table}{Point attributes.}
+\captionof{table}{Point attributes.}\label{point:att}
\begin{tabular}{lll}
\toprule
-\textbf{Attributes} & \textbf{Application}\\
-\Iattr{point}{re} & |z.A.re| &\tkzar |z.A = point:new (1,2) x = z.A.re|=1\\
-\Iattr{point}{im} & |z.A.im| &\tkzar |z.A = point:new (1,2) y= z.A.im|=2\\
-\Iattr{point}{type} & |z.A.type| &\tkzar |z.A.type = 'point'|\\
-\Iattr{point}{argument} & |z.A.argument| &\tkzar |z.A.argument $\approx$ 0.78539816339745|\\
-\Iattr{point}{module} & |z.A.module| &\tkzar |z.A.module| $\approx$ |2.2360...| =$\sqrt{5}$\\
+\textbf{Attributes} & \textbf{Application}& \textbf{Example}\\
+\Iattr{point}{re} & |z.A.re = 1| & see (\ref{ssub:methods}) \\
+\Iattr{point}{im} & |z.A.im = 2| &see (\ref{ssub:methods}) \\
+\Iattr{point}{type} & |z.A.type = 'point| & \\
+\Iattr{point}{argument} & |z.A.argument $\approx$ 0.78539816339745| & see (\ref{ssub:example_point_attributes})\\
+\Iattr{point}{module} & |z.A.module| $\approx$ |2.2360...| =$\sqrt{5}$ & see (\ref{ssub:example_point_attributes})\\
\bottomrule
\end{tabular}
\egroup
@@ -126,13 +126,13 @@ This is the creation of a fixed point with coordinates 1 and 2 and which is name
\end{tkzelements}
\end{verbatim}
\pgfkeys{/pgf/number format/.cd,std,precision=2}
-\let\pmpn\pgfmathprintnumber
+\let\pmpn\pgfmathprintnumber
\DeleteShortVerb{\|}
\begin{verbatim}
\begin{tikzpicture}[scale = 1]
\pgfkeys{/pgf/number format/.cd,std,precision=2}
-\let\pmpn\pgfmathprintnumber
+\let\pmpn\pgfmathprintnumber
\tkzDefPoints{2/4/M,2/0/A,0/0/O,0/4/B}
\tkzLabelPoints(O)
\tkzMarkAngle[fill=gray!30,size=1](A,O,M)
@@ -154,7 +154,7 @@ $|z_M| =\sqrt{5}\approx \pmpn{\tkzUseLua{z.M.modulus}}$ cm}
\begin{center}
\begin{tikzpicture}
\pgfkeys{/pgf/number format/.cd,std,precision=2}
- \let\pmpn\pgfmathprintnumber
+ \let\pmpn\pgfmathprintnumber
\tkzDefPoints{2/4/M,2/0/A,0/0/O,0/4/B}
\tkzLabelPoints(O)
\tkzMarkAngle[fill=gray!30,size=1](A,O,M)
@@ -172,7 +172,7 @@ $|z_M| =\sqrt{5}\approx \pmpn{\tkzUseLua{z.M.modulus}}$ cm}
\begin{scope}[every annotation/.style={fill=lightgray!15,anchor = east}]
\node [annotation,font =\small,text width=6cm] at (current bounding box.west) {
Attributes of \texttt{z.M}
- \begin{itemize}
+ \begin{itemize}
\item \texttt{z.M.re} = 1
\item \texttt{z.M.im} = 2
\item \texttt{z.M.type} = 'point'
@@ -184,7 +184,7 @@ Attributes of \texttt{z.M}
\end{tikzpicture}
\end{center}
-\MakeShortVerb{\|}
+ \MakeShortVerb{\|}
\hspace*{\fill}
% \caption{Class Point}
% subsubsection example_point_attributes (end)
@@ -192,13 +192,13 @@ Attributes of \texttt{z.M}
\subsubsection{Argand diagram} % (fold)
\label{ssub:argand_diagram}
-\normalsize
+\normalsize
\begin{minipage}{\textwidth}
\begin{verbatim}
\begin{tkzelements}
z.A = point : new ( 2 , 3 )
- z.O = point : new ( 0 , 0 )
- z.I = point : new ( 1 , 0 )
+ z.O = point : new ( 0 , 0 )
+ z.I = point : new ( 1 , 0 )
\end{tkzelements}
\hspace{\fill}\begin{tikzpicture}
\tkzGetNodes
@@ -218,8 +218,8 @@ Attributes of \texttt{z.M}
\begin{minipage}{\textwidth}
\begin{tkzelements}
z.A = point : new ( 2 , 3 )
- z.O = point : new ( 0 , 0 )
- z.I = point : new ( 1 , 0 )
+ z.O = point : new ( 0 , 0 )
+ z.I = point : new ( 1 , 0 )
\end{tkzelements}
\hspace{\fill}\begin{tikzpicture}
\tkzGetNodes
@@ -242,53 +242,54 @@ Attributes of \texttt{z.M}
\subsection{Methods of the class point} % (fold)
\label{sub:methods_of_the_class_point}
-The methods described in the following table are standard. You'll find them in most of the examples at the end of this documentation. The result of the different methods presented in the following table is a \tkzNameObj{point}.
+The methods described in the following table are standard. You'll find them in most of the examples at the end of this documentation. The result of the different methods presented in the following table is a \tkzNameObj{point}.
\vspace{1em}
\bgroup
\catcode`_=12
\small
-\captionof{table}{Methods of the class point.}
-\begin{tabular}{lll}
-\toprule
-\textbf{Methods} & \textbf{Application}& \\
+\captionof{table}{Methods of the class point.}\label{point:met}
+\begin{tabular}{lll}
+\toprule
+\textbf{Methods} & \textbf{Application}& \\
+\midrule
+\Imeth{point}{new(r, r)} & |z.A = point : new(1,2)| & see (\ref{ssub:method_normalize}) \\
+\Imeth{point}{polar (d, an)} & |z.A = point : polar(1,math.pi/3)| & see (\ref{sub:archimedes} )\\
+\Imeth{point}{polar\_deg an} & an in deg & polar coordinates an deg \\
\midrule
- new (a,b) & |z.a = point : new(1,2)| &\tkzar affix z.a=1+2i \\
- polar (radius, phi) & |z.a = point : polar(1,math.pi/3)| &\tkzar affix $cos(\pi/3)+sin(\pi/3)i$ \\
- polar_deg (radius, phi) & phi in deg &\tkzar polar coordinates phi deg \\
-\midrule
- \textbf{Points} &&\\
-\midrule
- north(d) & see \ref{sub:power_v2} |d| distance to the point & d=1 1 if empty \\
- south(d) & \\
- east(d) & \\
- west(d) & \\
- normalize() & |z.b = z.a: normalize ()| &\tkzar |z.b| = 1 and z.a = k$\times$ z.b \\
- get_points (obj) & retrieves points from the object & \\
- \midrule
+\textbf{Points} &&\\
+\midrule
+\Imeth{point}{north(r)} & |r| distance to the point (1 if empty) & see (\ref{sub:power_v2}) ; \ref{ssub:methods}) \\
+\Imeth{point}{south(r)} & & \\
+\Imeth{point}{east(r)} & & \\
+\Imeth{point}{west(r)} & & \\
+\Imeth{point}{normalize()} & |z.b = z.a: normalize ()| & see (\ref{ssub:method_normalize}) \\
+\Imeth{point}{get\_points (obj)} & retrieves points from the object & \\
+ \midrule
\textbf{Transformations} &&\\
\midrule
- symmetry(obj) & obj : point,line,etc. &\tkzar z.a:symmetry (C.OH) \\
- rotation(angle , obj) & point,line,etc. &\tkzar rotation center a\\
- homothety(k,obj) & |z.c = z.a : homothety (2,z.b)| & \\
-\bottomrule %
+ \Imeth{point}{symmetry(obj)} & obj : point, line, etc. & see (\ref{ssub:object_symmetry}) \\
+ \Imeth{point}{rotation(an , obj)} & point, line, etc. & see (\ref{ssub:object_rotation})\\
+ \Imeth{point}{homothety(r,obj)} & |z.c = z.a : homothety (2,z.b)| & see (\ref{sub:homothety}) \\
+\bottomrule %
\end{tabular}
\egroup
\subsubsection{Example: method \Imeth{point}{north (d)} } % (fold)
\label{ssub:example_method_imeth_point_north_d}
+This function defines a point located on a vertical line passing through the given point. This function is useful if you want to report a certain distance (see the following example).
If |d| is absent then it is considered equal to 1.
\begin{minipage}{.5\textwidth}
\begin{verbatim}
\begin{tkzelements}
- z.O = point : new ( 0, 0 )
- z.A = z.O : east ()
- z.Ap = z.O : east (2) : north (2)
- z.B = z.O : north ()
- z.C = z.O : west ()
- z.D = z.O : south ()
+ z.O = point : new ( 0, 0 )
+ z.A = z.O : east ()
+ z.Ap = z.O : east (2) : north (2)
+ z.B = z.O : north ()
+ z.C = z.O : west ()
+ z.D = z.O : south ()
\end{tkzelements}
\begin{tikzpicture}
\tkzGetNodes
@@ -300,12 +301,12 @@ If |d| is absent then it is considered equal to 1.
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
scale = 1.5
- z.O = point : new ( 0, 0 )
- z.A = z.O : east ()
+ z.O = point : new ( 0, 0 )
+ z.A = z.O : east ()
z.Ap = z.O : east (2) : north (2)
- z.B = z.O : north ()
- z.C = z.O : west ()
- z.D = z.O : south ()
+ z.B = z.O : north ()
+ z.C = z.O : west ()
+ z.D = z.O : south ()
\end{tkzelements}
\hspace{\fill}
\begin{tikzpicture}
@@ -317,8 +318,66 @@ If |d| is absent then it is considered equal to 1.
\end{minipage}
% subsubsection example_method_imeth_point_north_d (end)
+
+\subsubsection{Length transfer} % (fold)
+\label{ssub:report_de_distance}
+
+Use of |north and east| functions linked to points, to transfer lengths, see (\ref{sub:length_of_a_segment})
+
+\begin{minipage}{.4\textwidth}
+\begin{verbatim}
+\begin{tkzelements}
+ z.A = point : new ( 0 , 0 )
+ z.B = point : new ( 3 , 0 )
+ L.AB = line : new ( z.A , z.B )
+ T.ABC = L.AB : sublime ()
+ z.C = T.ABC.pc
+ z.D = z.B: north (length(z.B,z.C))
+ z.E = z.B: east (L.AB.length)
+ z.M = L.AB.mid
+ z.F = z.E : north (length(z.C,z.M))
+\end{tkzelements}
+\begin{tikzpicture}[gridded]
+ \tkzGetNodes
+ \tkzDrawPolygons(A,B,C)
+ \tkzDrawSegments[gray,dashed](B,D B,E E,F C,M)
+ \tkzDrawPoints(A,...,F)
+ \tkzLabelPoints(A,B,E,M)
+ \tkzLabelPoints[above right](C,D,F)
+\end{tikzpicture}
+\end{verbatim}
+\end{minipage}
+\begin{minipage}{.6\textwidth}
+\begin{tkzelements}
+ z.A = point : new ( 0 , 0 )
+ z.B = point : new ( 3 , 0 )
+ L.AB = line : new ( z.A , z.B )
+ T.ABC = L.AB : sublime ()
+ z.C = T.ABC.pc
+ z.D = z.B: north (length(z.B,z.C))
+ z.E = z.B: east (L.AB.length)
+ z.M = L.AB.mid
+ z.F = z.E : north (length(z.C,z.M))
+\end{tkzelements}
+\hspace{\fill}
+\begin{tikzpicture}[gridded]
+ \tkzGetNodes
+ \tkzDrawPolygons(A,B,C)
+ \tkzDrawSegments[gray,dashed](B,D B,E E,F C,M)
+ \tkzDrawPoints(A,...,F)
+ \tkzLabelPoints(A,B,E,M)
+ \tkzLabelPoints[above right](C,D,F)
+\end{tikzpicture}
+\end{minipage}
+
+% subsubsection report_de_distance (end)
+
+
\subsubsection{Example: method \Imeth{point}{polar} } % (fold)
\label{ssub:example_polar_method}
+
+This involves defining a point using its modulus and argument.
+
\begin{minipage}{0.6\textwidth}
\begin{tkzexample}[latex=0cm,small,code only]
\begin{tkzelements}
@@ -327,7 +386,7 @@ If |d| is absent then it is considered equal to 1.
z.F = point: polar (3, math.pi/3)
\end{tkzelements}
\begin{tikzpicture}
- \tkzGetNodes
+ \tkzGetNodes
\tkzDrawCircle(O,A)
\tkzDrawSegments[new](O,A)
\tkzDrawSegments[purple](O,F)
@@ -345,7 +404,7 @@ If |d| is absent then it is considered equal to 1.
\end{tkzelements}
\hspace*{\fill}
\begin{tikzpicture}
-\tkzGetNodes
+\tkzGetNodes
\tkzDrawCircle(O,A)
\tkzDrawSegments[new](O,A)
\tkzDrawSegments[purple](O,F)
@@ -356,8 +415,57 @@ If |d| is absent then it is considered equal to 1.
\end{minipage}
% subsubsection example_polar_method (end)
-\subsubsection{Example: rotation of points} % (fold)
+\subsubsection{Method \Imeth{point}{normalize ()}} % (fold)
+\label{ssub:method_normalize}
+
+The result is a point located between the origin and the initial point at a distance of $1$ from the origin.
+
+\begin{minipage}{.4\textwidth}
+\begin{verbatim}
+\begin{tkzelements}
+ scale = 1.5
+ z.O = point : new (0,0)
+ z.A = point : new (1,2)
+ z.B = z.A : normalize ()
+ z.I = point : new (1,0)
+\end{tkzelements}
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawSegment(O,A)
+ \tkzDrawCircle(O,B)
+ \tkzDrawPoints(O,A,B,I)
+ \tkzLabelPoints(O,A,B)
+ \tkzLabelPoint[below right](I){$1$}
+\end{tikzpicture}
+\end{verbatim}
+\end{minipage}
+\begin{minipage}{.6\textwidth}
+\begin{tkzelements}
+scale = 1.5
+z.O = point : new (0,0)
+z.A = point : new (1,2)
+z.B = z.A : normalize ()
+z.I = point : new (1,0)
+\end{tkzelements}
+ \hspace*{\fill}
+\begin{tikzpicture}
+\tkzGetNodes
+\tkzDrawSegment(O,A)
+\tkzDrawCircle(O,B)
+\tkzDrawPoints(O,A,B,I)
+\tkzLabelPoints(O,A,B)
+\tkzLabelPoint[below right](I){$1$}
+\end{tikzpicture}
+ \hspace*{\fill}
+\end{minipage}
+% subsubsection method_normalize (end)
+
+
+\subsubsection{Example: \Imeth{point}{rotation of points}} % (fold)
\label{ssub:example_rotation_of_points}
+
+The arguments are the angle of rotation in radians, and here a list of points.
+
\begin{minipage}{.6\textwidth}
\begin{tkzexample}[latex=0cm,small,code only]
\begin{tkzelements}
@@ -398,25 +506,25 @@ If |d| is absent then it is considered equal to 1.
\end{minipage}
% subsubsection example_rotation_of_points (end)
-\subsubsection{Object rotation} % (fold)
+\subsubsection{Object \Imeth{point}{rotation}} % (fold)
\label{ssub:object_rotation}
Rotate a triangle by an angle of $\pi/6$ around $O$.
\begin{minipage}{.5\textwidth}
\begin{verbatim}
\begin{tkzelements}
-z.O = point : new ( -1 , -1 )
-z.A = point : new ( 2 , 0 )
-z.B = point : new ( 5 , 0 )
-L.AB = line : new (z.A,z.B)
-T.ABC = L.AB : equilateral ()
-S.fig = L.AB : square ()
-_,_,z.E,z.F = get_points ( S.fig )
-S.new = z.O : rotation (math.pi/3,S.fig)
-_,_,z.Ep,z.Fp = get_points ( S.new )
-z.C = T.ABC.pc
-T.ApBpCp = z.O : rotation (math.pi/3,T.ABC)
-z.Ap,z.Bp,z.Cp = get_points ( T.ApBpCp)
+ z.O = point : new ( -1 , -1 )
+ z.A = point : new ( 2 , 0 )
+ z.B = point : new ( 5 , 0 )
+ L.AB = line : new (z.A,z.B)
+ T.ABC = L.AB : equilateral ()
+ S.fig = L.AB : square ()
+ _,_,z.E,z.F = get_points ( S.fig )
+ S.new = z.O : rotation (math.pi/3,S.fig)
+ _,_,z.Ep,z.Fp = get_points ( S.new )
+ z.C = T.ABC.pc
+ T.ApBpCp = z.O : rotation (math.pi/3,T.ABC)
+ z.Ap,z.Bp,z.Cp = get_points ( T.ApBpCp)
\end{tkzelements}
\begin{tikzpicture}
@@ -430,18 +538,18 @@ z.Ap,z.Bp,z.Cp = get_points ( T.ApBpCp)
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
-z.O = point : new ( -1 , -1 )
-z.A = point : new ( 2 , 0 )
-z.B = point : new ( 5 , 0 )
+z.O = point : new ( -1 , -1 )
+z.A = point : new ( 2 , 0 )
+z.B = point : new ( 5 , 0 )
L.AB = line : new (z.A,z.B)
T.ABC = L.AB : equilateral ()
S.fig = L.AB : square ()
-_,_,z.E,z.F = get_points ( S.fig )
+_,_,z.E,z.F = get_points ( S.fig )
S.new = z.O : rotation (math.pi/3,S.fig)
-_,_,z.Ep,z.Fp = get_points ( S.new )
+_,_,z.Ep,z.Fp = get_points ( S.new )
z.C = T.ABC.pc
T.ApBpCp = z.O : rotation (math.pi/3,T.ABC)
-z.Ap,z.Bp,z.Cp = get_points ( T.ApBpCp)
+z.Ap,z.Bp,z.Cp = get_points ( T.ApBpCp)
\end{tkzelements}
\hspace{\fill}\begin{tikzpicture}
@@ -453,12 +561,12 @@ z.Ap,z.Bp,z.Cp = get_points ( T.ApBpCp)
\tkzDrawArc[delta=0,->,dashed,red](O,A)(A')
\tkzDrawSegments[dashed,red](O,A O,A')
\end{scope}
-
+
\end{tikzpicture}
\end{minipage}
% subsubsection object_rotation (end)
-\subsubsection{Object symmetry} % (fold)
+\subsubsection{Object \Imeth{point}{symmetry}} % (fold)
\label{ssub:object_symmetry}
\begin{minipage}{.5\textwidth}
\begin{verbatim}
@@ -470,7 +578,7 @@ z.Ap,z.Bp,z.Cp = get_points ( T.ApBpCp)
z.o = point: new(1,1)
z.ap,z.bp = get_points (z.o: symmetry (C.ab))
\end{tkzelements}
-
+
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawCircles(a,b a',b')
@@ -490,7 +598,7 @@ z.Ap,z.Bp,z.Cp = get_points ( T.ApBpCp)
z.o = point: new(1, 1)
z.ap,z.bp = get_points (z.o: symmetry (C.ab))
\end{tkzelements}
-
+
\hspace{\fill}\begin{tikzpicture}
\tkzGetNodes
\tkzDrawCircles(a,b a',b')
@@ -502,5 +610,6 @@ z.Ap,z.Bp,z.Cp = get_points ( T.ApBpCp)
\end{minipage}
% subsubsection object_symmetry (end)
% subsection methods_of_the_class_point (end)
+
% section class_point (end)
\endinput \ No newline at end of file