summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-line.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-line.tex')
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-line.tex526
1 files changed, 454 insertions, 72 deletions
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-line.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-line.tex
index 8ecdac344f..feab38af27 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-line.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-line.tex
@@ -18,7 +18,7 @@ The attributes are :
\bgroup
\catcode`_=12
\small
-\captionof{table}{Line attributes.}
+\captionof{table}{Line attributes.}\label{line:att}
\begin{tabular}{lll}
\toprule
\textbf{Attributes} & \textbf{Application} & \\
@@ -26,12 +26,12 @@ The attributes are :
\Iattr{line}{pb} & Second point of the segment & \\
\Iattr{line}{type} & Type is 'line' & |L.AB.type = 'line'| \\
\Iattr{line}{mid} & Middle of the segment& |z.M = L.AB.mid|\\
-\Iattr{line}{slope} & Slope of the line & obtained with |an = L.AB.slope|\\
-\Iattr{line}{length} & Length of the segment& |l = L.AB.length| \\
-\Iattr{line}{north\_pa} & See next example& d(a,north—pa)=d(a,b)=d(east,b) =etc. \\
+\Iattr{line}{slope} & Slope of the line & see (\ref{ssub:example_class_line})\\
+\Iattr{line}{length} &|l = L.AB.length|&see (\ref{sub:transfer_from_lua_to_tex} ; \ref{ssub:example_class_line})\\
+\Iattr{line}{north\_pa} & See (\ref{ssub:example_class_line}) & \\
\Iattr{line}{north\_pb} & &\\
\Iattr{line}{south\_pa} & &\\
-\Iattr{line}{south\_pb} & &\\
+\Iattr{line}{south\_pb} & &See (\ref{ssub:example_class_line}) \\
\Iattr{line}{east} & &\\
\Iattr{line}{west} & &\\
\bottomrule
@@ -76,8 +76,8 @@ z.m = L.ab.mid
z.w = L.ab.west
z.e = L.ab.east
z.r = L.ab.north_pa
-z.s = L.ab.south_pb
-sl = L.ab.slope
+z.s = L.ab.south_pb
+sl = L.ab.slope
len = L.ab.length
\end{tkzelements}
\hspace*{\fill}
@@ -146,78 +146,433 @@ With | L.AB = line : new (z.A,z.B)|, a line is defined.
% subsubsection example_line_attributes (end)
% subsection attributes_of_a_line (end)
-\clearpage\newpage
+\newpage
\subsection{Methods of the class line} % (fold)
\label{sub:methods_from_class_line}
-Here's the list of methods for the \tkzNameObj{line} object. The results are either reals, points, lines, circles or triangles.
-\subsubsection{Table of the methods from class line} % (fold)
-\label{ssub:table_of_the_methods_from_class_line}
+Here's the list of methods for the \tkzNameObj{line} object. The results are either reals, points, lines, circles or triangles. The triangles obtained are similar to the triangles defined below.
-\vspace{1em}
\begin{minipage}{\textwidth}
- \bgroup
- \catcode`_=12
- \small
- \captionof{table}{Methods of the class line.}
- \begin{tabular}{lll}
- \toprule
- \textbf{Methods} & \textbf{Comments} & \\
- \midrule
- \Imeth{line}{new(A, B)} & |L.AB = line : new(z.A,z.B)| line through the points $A$ and $B$&\\
- \midrule
- \textbf{Points} &&\\
- \midrule
- \Imeth{line}{gold\_ratio ()} & |z.C = L.AB : gold_ratio()| & gold ratio \\
- \Imeth{line}{normalize ()} & |z.C = L.AB : normalize()| & AC =1 and $C\in (AB)$ \\
- \Imeth{line}{normalize\_inv ()} & |z.C = L.AB : normalize_inv()| & CB =1 and $C\in (AB)$ \\
- \Imeth{line}{barycenter (ka,kb)} & |z.C = L.AB : barycenter (1,2)| $C$ & barycenter of |{(A,1)(B,2)}|\\
- \Imeth{line}{point (t)} & |z.C = L.AB : point (2)| & $\overrightarrow{AC} = 2\overrightarrow{AB}$\\
- \Imeth{line}{midpoint ()} & |z.M = L.AB : midpoint ()| & better is |z.M = L.AB.mid| \\
- \Imeth{line}{harmonic\_int } & |z.D = L.AB : harmonic_int (z.C)| & $D\in [AB]$ $C\notin [AB]$\\
- \Imeth{line}{harmonic\_ext (pt)} & |z.D = L.AB : harmonic_ext (z.C)| & $D\notin [AB]$ $C\in [AB]$\\
- \Imeth{line}{harmonic\_both (k)} & |z.C,z.D = L.AB : harmonic_both (tkzphi)| & ${ {CA/CB}={DA/DB}=t\varphi.}$\\
- \Imeth{line}{square ()} & |S.AB =(L.AB : square ()) | & create a square |S.AB|.\footnote{ |_,_,z.C,z.D = get_points(S.AB)|}\\
- \midrule
- \textbf{Lines} &&\\
- \midrule
- \Imeth{line}{ll\_from ( pt )} & |L.CD = L.AB : ll_from (z.C)| & $(CD) \parallel (AB)$ \\
- \Imeth{line}{ortho\_from ( pt )} & |L.CD = L.AB : ortho_from (z.C)|& $(CD) \perp (AB)$\\
- \Imeth{line}{mediator ()}&|L.uv = L.AB : mediator ()| & $(u,v)$ mediator of $(A,B)$\\
- \midrule
- \textbf{Triangles}&&\\
- \midrule
- \Imeth{line}{equilateral (swap)} & |T.ABC = L.AB : equilateral ()| $(\overrightarrow{AB},\overrightarrow{AC})>0$ & or < with swap \footnote{Triangles are defined in the direct sense of rotation, unless the "swap" option is present.} \\
- \Imeth{line}{isosceles (phi,swap)} & |T.ABC = L.AB : isosceles (math.pi/6)|& \\
- \Imeth{line}{gold (swap)} & |T.ABC = L.AB : gold ()| & right in $B$ and $AC = \varphi \times AB $ \\
- \Imeth{line}{euclide (swap)} & |T.ABC = L.AB : euclide ()| & $AB=AC$ and $(\overrightarrow{AB},\overrightarrow{AC}) = math.pi/5$ \\
- \Imeth{line}{golden (swap)} & |T.ABC = L.AB : golden ()| & $(\overrightarrow{AB},\overrightarrow{AC}) = 2\times \pi/5$ \\
- \midrule
- \textbf{Circles} &&\\
- \midrule
- \Imeth{line}{circle ()} & |C.AB = L.AB : circle ()| & center pa through pb \\
- \Imeth{line}{circle\_swap ()} & |C.BA = L.AB : circle\_swap ()|& center pb through pa \\
- \Imeth{line}{apollonius (k)} & |C.apo = L.AB : apollonius (2)|& Ensemble des points tq. |MA/MB = 2| \\
- \midrule
- \textbf{Transformations} &&\\
- \midrule
- \Imeth{line}{reflection ( obj )} & |new obj = L.AB : reflection (obj|&\\
- \Imeth{line}{translation ( obj )} & |new obj = L.AB : translation (obj)|&\\
- \Imeth{line}{projection ( obj )} & |z.H = L.AB : projection (z.C)| & $CH \perp (AB)$ and $H\in (AB)$\\
- \midrule
- \textbf{Miscellaneous} &&\\
- \midrule
- \Imeth{line}{distance (pt)} & |d = L.Ab : distance (z.C)| & see \ref{ssub:example_distance_and_projection}\\
- \Imeth{line}{in\_out (pt)} & |b = L.AB: in_out(z.C)| b=true if $C\in (AB)$ &\\
- \Imeth{line}{slope ()} & |a = L.AB : slope()| & better is L.AB.slope \\
- \bottomrule
- \end{tabular}
-
- \egroup
+\bgroup
+\catcode`_=12
+\small
+\captionof{table}{Methods of the class line.(part 1)}\label{line:methods1}
+\begin{tabular}{lll}
+\toprule
+\textbf{Methods} & \textbf{Comments} & \\
+\midrule
+\Imeth{line}{new(pt, pt)} & |L.AB = line : new(z.A,z.B)| line $(AB)$& see (\ref{ssub:altshiller})\\
+\midrule
+\textbf{Points} &&\\
+\midrule
+\Imeth{line}{gold\_ratio ()} & |z.C = L.AB : gold_ratio()| & see (\ref{sub:gold_ratio_with_segment} ; \ref{sub:the_figure_pappus_circle} ; \ref{sub:bankoff_circle}) \\
+\Imeth{line}{normalize ()} & |z.C = L.AB : normalize()| & AC =1 and $C\in (AB)$ see (\ref{ssub:normalize}) \\
+\Imeth{line}{normalize\_inv ()} & |z.C = L.AB : normalize_inv()| & CB =1 and $C\in (AB)$ \\
+ \Imeth{line}{barycenter (r,r)} & |z.C = L.AB : barycenter (1,2)| & see (\ref{ssub:barycenter_with_a_line})\\
+ \Imeth{line}{point (r)} & |z.C = L.AB : point (2)| & $\overrightarrow{AC} = 2\overrightarrow{AB}$ See (\ref{sub:ellipse} ; \ref{ssub:method_point})\\
+\Imeth{line}{midpoint ()} & |z.M = L.AB : midpoint ()| & better is |z.M = L.AB.mid| \\
+\Imeth{line}{harmonic\_int (pt)} & |z.D = L.AB : harmonic_int (z.C)| & See (\ref{sub:bankoff_circle})\\
+\Imeth{line}{harmonic\_ext (pt)} & |z.D = L.AB : harmonic_ext (z.C)| & See (\ref{sub:bankoff_circle})\\
+\Imeth{line}{harmonic\_both (r)} & |z.C,z.D = L.AB : harmonic_both|($\varphi$) & \ref{sub:harmonic_division_with_tkzphi}\\
+\Imeth{line}{square ()} & |S.AB = L.AB : square () | & create a square |S.AB|.\footnote{ |_,_,z.C,z.D = get_points(S.AB)|}\\
+\midrule
+\textbf{Lines} &&\\
+\midrule
+\Imeth{line}{ll\_from ( pt )} & |L.CD = L.AB : ll_from (z.C)| & $(CD) \parallel (AB)$ \\
+\Imeth{line}{ortho\_from ( pt )} & |L.CD = L.AB : ortho_from (z.C)|& $(CD) \perp (AB)$\\
+\Imeth{line}{mediator ()}&|L.uv = L.AB : mediator ()| & $(u,v)$ mediator of $(A,B)$\\
+\midrule
+\textbf{Triangles}&&\\
+\midrule
+\Imeth{line}{equilateral (<swap>)} & |T.ABC = L.AB : equilateral ()| & $(\overrightarrow{AB},\overrightarrow{AC})>0$ or $<0$ with swap \footnote{Triangles are defined in the direct sense of rotation, unless the "swap" option is present.} \\
+\Imeth{line}{isosceles (an<,swap>)} & |T.ABC = L.AB : isosceles (math.pi/6)|& \\
+\Imeth{line}{two\_angles (an,an)} & |T.ABC = L.AB : two_angles (an,an)|&note \footnote{The given side is between the two angles} see ( ) \\
+\Imeth{line}{school ()} & Angle measurements are 30°,60° and 90°. & \\
+\Imeth{line}{sss (r,r)} & $AC=r$ $BC=r$ & \\
+\Imeth{line}{as (r,an)} & $AC =r$ $\widehat{BAC} = an$& \\
+\Imeth{line}{sa (r,an)} & $AC =r$ $\widehat{ABC} = an$& \\
+\midrule
+\textbf{Sacred triangles}&&\\
+\midrule
+\Imeth{line}{gold (<swap>)} & |T.ABC = L.AB : gold ()| & right in $B$ and $AC = \varphi \times AB $ \\
+\Imeth{line}{euclide (<swap>)} & |T.ABC = L.AB : euclide ()| & $AB=AC$ and $(\overrightarrow{AB},\overrightarrow{AC}) = \pi/5$ \\
+\Imeth{line}{golden (<swap>)} & |T.ABC = L.AB : golden ()| &
+ $(\overrightarrow{AB},\overrightarrow{AC}) = 2\times \pi/5$ \\
+\Imeth{line}{divine ()} & & \\
+\Imeth{line}{egyptian ()} & & \\
+\Imeth{line}{cheops ()} & & \\
+\bottomrule
+\end{tabular}
+\egroup
\end{minipage}
-% subsubsection table_of_the_methods_from_class_line (end)
+\begin{minipage}{\textwidth}
+\bgroup
+\catcode`_=12
+\small
+\captionof{table}{Methods of the class line.(part 2)}\label{line:methods2}
+\begin{tabular}{lll}
+\toprule
+\textbf{Methods} & \textbf{Comments} & \\
+\midrule
+\textbf{Circles} &&\\
+\midrule
+\Imeth{line}{circle ()} & |C.AB = L.AB : circle ()| & center pa through pb \\
+\Imeth{line}{circle\_swap ()} & |C.BA = L.AB : circle_swap ()|& center pb through pa \\
+\Imeth{line}{apollonius (r)} & |C.apo = L.AB : apollonius (2)|& Ensemble des points tq. |MA/MB = 2| \\
+\midrule
+\textbf{Transformations} &&\\
+\midrule
+\Imeth{line}{reflection ( obj )} & |new obj = L.AB : reflection (obj|&\\
+\Imeth{line}{translation ( obj )} & |new obj = L.AB : translation (obj)|&\\
+\Imeth{line}{projection ( obj )} & |z.H = L.AB : projection (z.C)| & $CH \perp (AB)$ and $H\in (AB)$\\
+\midrule
+\textbf{Miscellaneous} &&\\
+\midrule
+\Imeth{line}{distance (pt)} & |d = L.Ab : distance (z.C)| & see \ref{ssub:example_distance_and_projection}\\
+\Imeth{line}{in\_out (pt)} & |b = L.AB: in_out(z.C)| & b=true if $C\in (AB)$ \\
+\Imeth{line}{slope ()} & |a = L.AB : slope()| & better is L.AB.slope \\
+\Imeth{line}{in\_out\_segment (pt)} & |b = L.AB : in_out_segment(z.C)| & b=true if $C\in [AB$] \\
+\bottomrule
+\end{tabular}
+\egroup
+\end{minipage}
+
+\vspace{1 em}
Here are a few examples.
+\subsubsection{Triangle with two\_angles} % (fold)
+\label{ssub:triangle_with_two__angles}
+
+The angles are on either side of the given segment
+
+\begin{minipage}{.4\textwidth}
+\begin{verbatim}
+\begin{tkzelements}
+ z.A = point : new ( 0 , 0 )
+ z.B = point : new ( 4 , 0 )
+ L.AB = line : new ( z.A , z.B )
+ T.ABC = L.AB : two_angles (math.pi/6,math.pi/2)
+ z.C = T.ABC.pc
+\end{tkzelements}
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawPolygons(A,B,C)
+ \tkzDrawPoints(A,B,C)
+ \tkzLabelPoints(A,B)
+ \tkzLabelPoints[above](C)
+\end{tikzpicture}
+\end{verbatim}
+\end{minipage}
+\begin{minipage}{.6\textwidth}
+ \begin{tkzelements}
+ z.A = point : new ( 0 , 0 )
+ z.B = point : new ( 4 , 0 )
+ L.AB = line : new ( z.A , z.B )
+ T.ABC= L.AB : two_angles (math.pi/6,math.pi/2)
+ z.C = T.ABC.pc
+ \end{tkzelements}
+ \hspace*{\fill}
+ \begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawPolygons(A,B,C)
+ \tkzDrawPoints(A,B,C)
+ \tkzLabelPoints(A,B)
+ \tkzLabelPoints[above](C)
+ \end{tikzpicture}
+ \hspace*{\fill}
+\end{minipage}
+% subsubsection triangle_with_two__angles (end)
+
+\subsubsection{Triangle with three given sides} % (fold)
+\label{ssub:triangle_with_three_given_sides}
+
+In the following example, a small difficulty arises. The given lengths are not affected by scaling, so it's necessary to use the \Igfct{math}{value (r) } function, which will modify the lengths according to the scale.
+
+\begin{minipage}{.4\textwidth}
+\begin{verbatim}
+\begin{tkzelements}
+ scale =1.25
+ z.A = point : new ( 0 , 0 )
+ z.B = point : new ( 5 , 0 )
+ L.AB = line : new ( z.A , z.B )
+ T.ABC = L.AB : sss (value(3),value(4))
+ z.C = T.ABC.pc
+\end{tkzelements}
+\begin{tikzpicture}[gridded]
+ \tkzGetNodes
+ \tkzDrawPolygons(A,B,C)
+ \tkzDrawPoints(A,B,C)
+ \tkzLabelPoints(A,B)
+ \tkzLabelPoints[above](C)
+\end{tikzpicture}
+\end{verbatim}
+\end{minipage}
+\begin{minipage}{.6\textwidth}
+ \begin{tkzelements}
+ scale =1.25
+ z.A = point : new ( 0 , 0 )
+ z.B = point : new ( 5 , 0 )
+ L.AB = line : new ( z.A , z.B )
+ T.ABC = L.AB : sss (value(3),value(4))
+ z.C = T.ABC.pc
+ \end{tkzelements}
+\hspace{\fill} \begin{tikzpicture}[gridded]
+ \tkzGetNodes
+ \tkzDrawPolygons(A,B,C)
+ \tkzDrawPoints(A,B,C)
+ \tkzLabelPoints(A,B)
+ \tkzLabelPoints[above](C)
+ \end{tikzpicture}
+\end{minipage}
+% subsubsection triangle_with_three_given_sides (end)
+
+\subsubsection{Triangle with side between side and angle} % (fold)
+\label{ssub:triangle_with_side_between_side_and_angle}
+
+In some cases, two solutions are possible.
+
+\begin{minipage}{.4\textwidth}
+\begin{verbatim}
+\begin{tkzelements}
+ scale =1.2
+ z.A = point : new ( 0 , 0 )
+ z.B = point : new ( 5 , 0 )
+ L.AB = line : new ( z.A , z.B )
+ T.ABC,T.ABD = L.AB : ssa (value(3),math.pi/6)
+ z.C = T.ABC.pc
+ z.D = T.ABD.pc
+\end{tkzelements}
+\begin{tikzpicture}[gridded]
+ \tkzGetNodes
+ \tkzDrawPolygons(A,B,C A,B,D)
+ \tkzDrawPoints(A,B,C,D)
+ \tkzLabelPoints(A,B)
+ \tkzLabelPoints[above](C,D)
+ \tkzLabelAngle(C,B,A){$\pi/3$}
+ \tkzLabelSegment[below left](A,C){$7$}
+ \tkzLabelSegment[below left](A,D){$7$}
+\end{tikzpicture}
+\end{verbatim}
+\end{minipage}
+\begin{minipage}{.6\textwidth}
+ \begin{tkzelements}
+ scale =1.2
+ z.A = point : new ( 0 , 0 )
+ z.B = point : new ( 5 , 0 )
+ L.AB = line : new ( z.A , z.B )
+ T.ABC,T.ABD = L.AB : ssa (value(3),math.pi/6)
+ z.C = T.ABC.pc
+ z.D = T.ABD.pc
+ \end{tkzelements}
+ \hspace{\fill} \begin{tikzpicture}[gridded]
+ \tkzGetNodes
+ \tkzDrawPolygons(A,B,C A,B,D)
+ \tkzDrawPoints(A,B,C,D)
+ \tkzLabelPoints(A,B)
+ \tkzLabelPoints[above](C,D)
+ \tkzLabelAngle(C,B,A){$\pi/3$}
+ \tkzLabelSegment[below left](A,C){$7$}
+ \tkzLabelSegment[below left](A,D){$7$}
+ \end{tikzpicture}
+\end{minipage}
+
+% subsubsection triangle_with_side_between_side_and_angle (end)
+
+\subsubsection{About sacred triangles} % (fold)
+\label{ssub:about_triangles}
+The side lengths are proportional to the lengths given in the table. They depend on the length of the initial segment.
+
+\captionof{table}{Sacred triangles.}\label{line:met}
+\begin{tabular}{ll}
+\toprule
+\textbf{Name} & \textbf{definition} \\
+\midrule
+\Imeth{line}{gold (<swap>)} & Right triangle with $a=\varphi$, $b=1$ and $c=\sqrt{\varphi}$\\
+\Imeth{line}{golden (<swap>)} &Right triangle $b=\varphi$ $c=1$ ; half of gold rectangle \\
+\Imeth{line}{divine ()} & Isosceles $a=\varphi$, $b=c=1$ and $\beta = \gamma=\pi/5$ \\
+\Imeth{line}{pythagoras ()} & $a=5$, $b=4$, $c=3$ and other names: isis or egyptian\\
+\Imeth{line}{sublime ()} & Isosceles $a=1$, $b=c=\varphi$ and $\beta =\gamma=2\pi/5$ ; other name: euclid\\
+\Imeth{line}{cheops ()} & Isosceles $a=2$, $b=c=\varphi$ and height = $\sqrt{\varphi}$ \\
+\bottomrule
+\end{tabular}
+
+\begin{minipage}{.4\textwidth}
+\begin{verbatim}
+\begin{tkzelements}
+ z.A = point : new ( 0 , 0 )
+ z.B = point : new ( 4 , 0 )
+ L.AB = line : new ( z.A , z.B )
+ T.ABC = L.AB : cheops ()
+ z.C = T.ABC.pc
+ T.ABD = L.AB : gold ()
+ z.D = T.ABD.pc
+ T.ABE = L.AB : euclide ()
+ z.E = T.ABE.pc
+ T.ABF = L.AB : golden ()
+ z.F = T.ABF.pc
+ T.ABG = L.AB : devine ()
+ z.G = T.ABG.pc
+ T.ABH = L.AB : pythagoras ()
+ z.H = T.ABH.pc
+\end{tkzelements}
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawPolygons(A,B,C A,B,D A,B,E A,B,F A,B,G A,B,H)
+ \tkzDrawPoints(A,...,H)
+ \tkzLabelPoints(A,...,H)
+\end{tikzpicture}
+\end{verbatim}
+\end{minipage}
+\begin{minipage}{.6\textwidth}
+\begin{tkzelements}
+ z.A = point : new ( 0 , 0 )
+ z.B = point : new ( 4 , 0 )
+ L.AB = line : new ( z.A , z.B )
+ T.ABC = L.AB : cheops ()
+ z.C = T.ABC.pc
+ T.ABD = L.AB : gold ()
+ z.D = T.ABD.pc
+ T.ABE = L.AB : euclide ()
+ z.E = T.ABE.pc
+ T.ABF = L.AB : golden ()
+ z.F = T.ABF.pc
+ T.ABG = L.AB : divine ()
+ z.G = T.ABG.pc
+ T.ABH = L.AB : pythagoras ()
+ z.H = T.ABH.pc
+\end{tkzelements}
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawPolygons(A,B,C A,B,D A,B,E A,B,F A,B,G A,B,H)
+ \tkzDrawPoints(A,...,H)
+ \tkzLabelPoints(A,...,H)
+\end{tikzpicture}
+\end{minipage}
+% subsubsection about_triangles (end)
+
+\subsubsection{Method point }% (fold)
+\label{ssub:method_point}
+This method is very useful. It allows you to place a point on the line under consideration.
+If |r = 0| then the point is |pa|, if |r = 1| it's |pb|.
+
+If |r = .5| the point obtained is the midpoint of the segment. |r| can be negative or greater than 1.
+
+This method exists for all objects except quadrilaterals.
+
+
+\begin{minipage}{.4\textwidth}
+\begin{verbatim}
+\begin{tkzelements}
+ z.A = point : new (-1,-1)
+ z.B = point : new (1,1)
+ L.AB = line : new (z.A,z.B)
+ z.I = L.AB : point (0.5)
+ z.J = L.AB : point (-0.5)
+ z.K = L.AB : point (2)
+\end{tkzelements}
+\begin{tikzpicture}[gridded]
+\tkzGetNodes
+ \tkzDrawLine(J,K)
+ \tkzDrawPoints(A,B,I,J,K)
+ \tkzLabelPoints(A,B,I,J,K)
+ \end{tikzpicture}
+\end{verbatim}
+\end{minipage}
+\begin{minipage}{.6\textwidth}
+ \begin{tkzelements}
+ z.A = point : new (-1,-1)
+ z.B = point : new (1,1)
+ L.AB = line : new (z.A,z.B)
+ z.I = L.AB : point (0.5)
+ z.J = L.AB : point (-0.5)
+ z.K = L.AB : point (2)
+\end{tkzelements}
+\begin{tikzpicture}[gridded]
+\tkzGetNodes
+ \tkzDrawLine(J,K)
+ \tkzDrawPoints(A,B,I,J,K)
+ \tkzLabelPoints(A,B,I,J,K)
+ \end{tikzpicture}
+ \end{minipage}
+% subsubsection method_point (end)
+
+\subsubsection{Normalize} % (fold)
+\label{ssub:normalize}
+
+
+\begin{minipage}{.4\textwidth}
+ \begin{verbatim}
+ \begin{tkzelements}
+ z.a = point: new (1, 1)
+ z.b = point: new (5, 4)
+ L.ab = line : new (z.a,z.b)
+ z.c = L.ab : normalize ()
+ \end{tkzelements}
+
+ \begin{tikzpicture}[gridded]
+ \tkzGetNodes
+ \tkzDrawSegments(a,b)
+ \tkzDrawCircle(a,c)
+ \tkzDrawPoints(a,b,c)
+ \tkzLabelPoints(a,b,c)
+ \end{tikzpicture}
+ \end{verbatim}
+\end{minipage}
+\begin{minipage}{.6\textwidth}
+\begin{tkzelements}
+ z.a = point: new (1, 1)
+ z.b = point: new (5, 4)
+ L.ab = line : new (z.a,z.b)
+ z.c = L.ab : normalize ()
+\end{tkzelements}
+\hspace*{\fill}
+\begin{tikzpicture}[gridded]
+\tkzGetNodes
+\tkzDrawSegments(a,b)
+\tkzDrawCircle(a,c)
+\tkzDrawPoints(a,b,c)
+\tkzLabelPoints(a,b,c)
+\end{tikzpicture}
+\hspace*{\fill}
+\end{minipage}
+% subsubsection normalize (end)
+
+
+\subsubsection{Barycenter with a line} % (fold)
+\label{ssub:barycenter_with_a_line}
+
+\begin{minipage}{.4\textwidth}
+\begin{verbatim}
+\begin{tkzelements}
+ z.A = point : new ( 0 , -1 )
+ z.B = point : new ( 4 , 2 )
+ L.AB = line : new ( z.A , z.B )
+ z.G = L.AB : barycenter (1,2)
+\end{tkzelements}
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawLine(A,B)
+ \tkzDrawPoints(A,B,G)
+ \tkzLabelPoints(A,B,G)
+\end{tikzpicture}
+\end{verbatim}
+\end{minipage}
+\begin{minipage}{.6\textwidth}
+\begin{tkzelements}
+ z.A = point : new ( 0 , -1 )
+ z.B = point : new ( 4 , 2 )
+ L.AB = line : new ( z.A , z.B )
+ z.G = L.AB : barycenter (1,2)
+\end{tkzelements}
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawLine(A,B)
+ \tkzDrawPoints(A,B,G)
+ \tkzLabelPoints(A,B,G)
+\end{tikzpicture}
+\end{minipage}
+% subsubsection barycenter_with_a_line (end)
+
\subsubsection{Example: new line from a defined line} % (fold)
\label{ssub:new_line_from_a_defined_line}
\begin{minipage}{0.5\textwidth}
@@ -520,6 +875,33 @@ z.a,z.b = L.ab.pa,L.ab.pb
\subsection{Apollonius circle MA/MB = k} % (fold)
\label{sub:apollonius_circle_ma_mb_k}
+\begin{verbatim}
+\begin{tkzelements}
+ z.A = point : new ( 0 , 0 )
+ z.B = point : new ( 6 , 0 )
+ L.AB =line: new (z.A,z.B)
+ C.apo = L.AB : apollonius (2)
+ z.O,z.C = get_points ( C.apo )
+ z.D = C.apo : antipode (z.C)
+ z.P = C.apo : point (0.30)
+\end{tkzelements}
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzFillCircle[blue!20,opacity=.2](O,C)
+ \tkzDrawCircle[blue!50!black](O,C)
+ \tkzDrawPoints(A,B,O,C,D,P)
+ \tkzLabelPoints[below right](A,B,O,C,D,P)
+ \tkzDrawSegments[orange](P,A P,B P,D B,D P,C)
+ \tkzDrawSegments[red](A,C)
+ \tkzDrawPoints(A,B)
+ \tkzLabelCircle[draw,fill=green!10,%
+ text width=3cm,text centered,left=24pt](O,D)(60)%
+ {$CA/CB=2$\\$PA/PB=2$\\$DA/DB=2$}
+ \tkzMarkRightAngle[opacity=.3,fill=lightgray](O,P,C)
+ \tkzMarkAngles[mark=||](A,P,D D,P,B)
+\end{tikzpicture}
+\end{verbatim}
+
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
z.B = point : new ( 6 , 0 )
@@ -546,7 +928,7 @@ z.P = C.apo : point (0.30)
\tkzMarkAngles[mark=||](A,P,D D,P,B)
\end{tikzpicture}
-Remark: |\tkzUseLua{point.mod(z.P-z.A)/point.mod(z.P-z.B)}| = \tkzUseLua{point.mod(z.P-z.A)/point.mod(z.P-z.B)}
+Remark: |\tkzUseLua{length(z.P,z.A)/length(z.P,z.B)}| = \tkzUseLua{length(z.P,z.A)/length(z.P,z.B)}
% subsection apollonius_circle_ma_mb_k (end)
% subsection methods_from_class_line (end)