\newpage
\section{Class \Iclass{line}} % (fold)
\label{sec:class_line}

\subsection{Attributes of a line} % (fold)
\label{sub:attributes_of_a_line}

Writing |L.AB = line: new (z.A,z.B)| creates an object of the class \tkzname{line} (the notation is arbitrary for the moment). Geometrically, it represents both the line passing through the points $A$ and $B$ as the segment $[AB]$. Thus, we can use the midpoint of |L.AB|, which is, of course, the midpoint of the segment $[AB]$. This medium is obtained with |L.AB.mid|. Note that |L.AB.pa = z.A| and |L.AB.pb = z.B|. Finally, if a line $L$ is the result of a method, you can obtain the points with |z.A,z.B = get_points (L)| or with the previous remark.

\begin{mybox}
   Creation |L.AB = line : new ( z.A , z.B ) |
\end{mybox}


The attributes are :

\vspace{1em}
\bgroup
\catcode`_=12
\small
\captionof{table}{Line attributes.}\label{line:att}
\begin{tabular}{lll}
\toprule
\textbf{Attributes} & \textbf{Application} & \\
\Iattr{line}{pa}  & First point of the segment & |z.A = L.AB.pa| \\
\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 & [\ref{ssub:example_class_line}] \\
\Iattr{line}{length} &|l = L.AB.length|& [\ref{sub:transfer_from_lua_to_tex} ; \ref{ssub:example_class_line}] \\  
\Iattr{line}{north\_pa}   & & [\ref{ssub:example_class_line}]  \\
\Iattr{line}{north\_pb}   & &\\
\Iattr{line}{south\_pa}   & &\\
\Iattr{line}{south\_pb}   & & [\ref{ssub:example_class_line}]  \\
\Iattr{line}{east}   & &\\
\Iattr{line}{west}   & &\\
\Iattr{line}{vec}   & |V.AB = L.AB.vec|& defines $\overrightarrow{AB}$  [\ref{sec:class_vector}] \\
\bottomrule
\end{tabular}
\egroup

\subsubsection{Example: attributes of class line} % (fold)
\label{ssub:example_class_line}

\vspace{5pt}
\begin{tkzelements}
z.a = point: new (1, 1)
z.b = point: new (5, 4)
L.ab = line : new (z.a,z.b)
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
len = L.ab.length
\end{tkzelements}

\begin{center}
  \begin{tikzpicture}
     \tkzGetNodes
     \tkzDrawPoints(a,b,m,e,r,s,w)
     \tkzLabelPoints(a,b)
     \tkzLabelPoint(r){north\_pa}
     \tkzLabelPoint(s){south\_pb}
     \tkzLabelPoint[below](m){mid}
     \tkzLabelPoint[right](w){west}
     \tkzLabelPoint[left](e){east}
     \tkzDrawLine(a,b)
     \tkzLabelSegment[above = 1em,sloped](a,b){ab = \pmpn{\tkzUseLua{len}}}
     \tkzLabelSegment[above=2em,sloped](a,b){slope of (ab) =  \pmpn{\tkzUseLua{sl}}}
  \end{tikzpicture}
\end{center}


\begin{Verbatim}
\begin{tkzelements}
  scale  = .5
   z.a   = point: new (1, 1)
   z.b   = point: new (5, 4)
   L.ab  = line : new (z.a,z.b)
   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
   len   = L.ab.length
\end{tkzelements}

\begin{tikzpicture}
   \tkzGetNodes
   \tkzDrawPoints(a,b,m,e,r,s,w)
   \tkzLabelPoints(a,b,e,r,s,w)
   \tkzLabelPoints[above](m)
   \tkzDrawLine(a,b)
   \tkzLabelSegment[sloped](a,b){ab = \tkzUseLua{len}}
   \tkzLabelSegment[above=12pt,sloped](a,b){slope of (ab) = \tkzUseLua{sl}}
\end{tikzpicture}
\end{Verbatim}


% subsubsection example_class_line (end)

\subsubsection{Method \Imeth{line}{new} and line attributes}
\label{ssub:example_line_attributes}

The notation can be |L| or |L.AB| or |L.euler|. The notation is actually free.
|L.AB| can also represent the segment. 

With | L.AB  = line : new (z.A,z.B)|, a line is defined.


\begin{minipage}{0.5\textwidth}
\begin{Verbatim}
\begin{tkzelements}
   z.A   = point : new (1,1)
   z.B   = point : new (3,2)
   L.AB  = line : new (z.A,z.B)
   z.C   = L.AB.north_pa
   z.D   = L.AB.south_pa
\end{tkzelements}
\begin{tikzpicture}
   \tkzGetNodes
   \tkzDrawLines(A,B C,D)
   \tkzDrawPoints(A,...,D)
   \tkzLabelPoints(A,...,D)
   \tkzMarkRightAngle(B,A,C)
   \tkzMarkSegments(A,C A,B A,D)
\end{tikzpicture}
\end{Verbatim}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tkzelements}
   scale = 1
   z.A   = point : new (1,1)
   z.B   = point : new (3,2)
   L.AB  = line : new (z.A,z.B)
   z.C   = L.AB.north_pa
   z.D   = L.AB.south_pa
\end{tkzelements}
\begin{tikzpicture}
   \tkzGetNodes
   \tkzDrawLines(A,B C,D)
   \tkzDrawPoints(A,...,D)
   \tkzLabelPoints(A,...,D)
   \tkzMarkRightAngle(B,A,C)
   \tkzMarkSegments(A,C A,B A,D)
\end{tikzpicture}
\end{minipage}
% subsubsection example_line_attributes (end)
% subsection attributes_of_a_line (end)

\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 can be real numbers, points, lines, circles or triangles. The triangles obtained are similar to the triangles defined below.

\begin{minipage}{\textwidth}
\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 
\Igfct{line}{new(pt, pt)}      & |L.AB = line : new(z.A,z.B)| & Create line $(AB)$ ;  [\ref{sub:altshiller}] \\
\midrule 
\textbf{Points} &&\\
\midrule 
\Imeth{line}{gold\_ratio ()}  & |z.C=L.AB : gold_ratio()|   &  [\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)$  [ \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)|  &   [\ref{ssub:barycenter_with_a_line}] \\
\Imeth{line}{point (r)} & |z.C=L.AB : point (2)|   & $\overrightarrow{AC} = 2\overrightarrow{AB}$  [\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)| &  [ \ref{sub:bankoff_circle}] \\
\Imeth{line}{harmonic\_ext (pt)}  & |z.D=L.AB : harmonic_ext (z.C)| & [ \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}{\_east(d)}    & |z.M=L.AB : _east(2)| & |BM = 2| $A,B,M$ aligned  \\
\Imeth{line}{\_west(d)}    & |z.M=L.AB : _east(2)| & |BM = 2| $A,B,M$ aligned  \\
\Imeth{line}{\_north\_pa(d)}  &|z.M=L.AB: _north_pa(2)| &|AM=2|; $AM\perp AB$ ; $\overrightarrow{AB},\overrightarrow{AM}$ counterclockwise. \\
...&&  [\ref{ssub:new_line_from_a_defined_line}; \ref{ssub:attributes_of_an_ellipse}]\\
\Imeth{line}{\_south\_pa(d)}  &|z.M=L.AB: _south_pa(2)| &|AM=2|; $AM\perp AB$ ; $\overrightarrow{AB},\overrightarrow{AM}$ clockwise   \\
\Imeth{line}{\_north\_pb(d)}  &|z.M=L.AB: _north_pb(2)| &|BM=2|; $BM\perp BA$ ; $\overrightarrow{BA},\overrightarrow{BM}$ clockwise   \\
\Imeth{line}{\_south\_pb(d)}  &|z.M=L.AB: _south_pb(2)| &|BM=2|; $BM\perp BA$ ; $\overrightarrow{AB},\overrightarrow{AM}$ counterclockwise   \\
\Imeth{line}{report(d,pt)}    &|z.M=L.AB: report(2,z.N)| &|MN=2|; $AB\parallel MN$ ;  [ex. \ref{ssub:method_report}]\\
\Imeth{line}{colinear\_at(pt,k)}    &|z.D=L.AB: colinear_at(z.C,2)| &|CD=2AB|; $AB\parallel CD$ ;  [ex. \ref{ssub:method_imeth_line_colinear__at}]\\
\midrule 
\textbf{Lines} &&\\
\midrule  
\Imeth{line}{ll\_from ( pt )}  &|L.CD=L.AB: ll_from(z.C)| &$(CD) \parallel (AB)$;  [\ref{ssub:new_line_from_a_defined_line}] \\
\Imeth{line}{ortho\_from ( pt )} &|L.CD=L.AB: ortho_from(z.C)|&$(CD) \perp (AB)$;  [\ref{ssub:newline_ortho_from}] \\
 \Imeth{line}{mediator ()} & |L.uv=L.AB: mediator()| & perpendicular bisector of $(A,B)$ \footnote{You can use |perpendicular_bisector| intead of \tkzname{mediator}.}; [\ref{ssub:method_imeth_line_mediator}]\\
\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.}; [\ref{ssub:object_rotation}]  \\
\Imeth{line}{isosceles (an<,swap>)}&|T.ABC=L.AB:isosceles(math.pi/6)|& [\ref{ssub:method_imeth_line_isosceles}]\\
\Imeth{line}{two\_angles (an,an)} &|T.ABC=L.AB:two_angles(an,an)|&note \footnote{The given side is between the two angles} [\ref{ssub:triangle_with_two__angles}] \\
\Imeth{line}{school ()}  & 30°,60°, 90°  & \\
\Imeth{line}{sss (r,r)}  & $AC=r$ $BC=r$ & [\ref{ssub:triangle_with_three_given_sides}] \\
\Imeth{line}{sas (r,an)}  & $AC =r$ $\widehat{BAC} = an$ & [\ref{ssub:triangle_with_three_given_sides}]  \\
\Imeth{line}{ssa (r,an)}  & $AC =r$ $\widehat{ABC} = an$&  [\ref{ssub:triangle_with_three_given_sides}]\\
\midrule 
\textbf{Squares}&&\\
\midrule  
\Imeth{line}{square ()} &|S.AB=L.AB : square () | &  create a square |S.AB|.\footnote{ |_,_,z.C,z.D = get_points(S.AB)|}; [\ref{ssub:object_rotation}] \\
\bottomrule
\end{tabular}
\egroup
\end{minipage}


\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{Sacred triangles}&&\\
\midrule  
\Imeth{line}{gold (<swap>)}    &|T.ABC=L.AB:gold()| & right in $B$ and $AC = \varphi \times AB $; [\ref{line:met}] \\
\Imeth{line}{euclide (<swap>)} &|T.ABC=L.AB:euclide()| &$AB=AC$ ; $(\overrightarrow{AB},\overrightarrow{AC}) = \pi/5$; [\ref{line:met}] \\
\Imeth{line}{golden (<swap>)}  &|T.ABC=L.AB:golden()|   &
    $(\overrightarrow{AB},\overrightarrow{AC}) = 2\times \pi/5$ ;  [\ref{line:met}] \\
\Imeth{line}{divine ()}  & &   [\ref{line:met}] \\  
\Imeth{line}{egyptian ()} & & [\ref{line:met}] \\
\Imeth{line}{cheops ()}  & & [\ref{line:met}] \\
\midrule 
\textbf{Circles} &&\\
\midrule 
\Imeth{line}{circle ()}  & |C.AB = L.AB : circle ()| &  center pa through pb \\
\Imeth{line}{apollonius (r)}  & |C.apo = L.AB : apollonius (2)|&  Set of points tq. |MA/MB = 2|; [\ref{ssub:apollonius_circle_ma_mb_k}] \\
\midrule 
\textbf{Transformations} &&\\
\midrule 
\Imeth{line}{reflection ( obj )}  & |new obj = L.AB : reflection (obj|&  [\ref{ssub:reflection_of_object}] \\
\Imeth{line}{translation ( obj )} & |new obj = L.AB : translation (obj)|& [\ref{ssub:example_translation}] \\
\Imeth{line}{projection ( obj )}  & |z.H = L.AB : projection (z.C)| & $CH \perp (AB)$ and $H\in (AB)$; [\ref{ssub:example_projection_of_several_points}; \ref{ssub:example_combination_of_methods}]\\
...  & &  [ \ref{ssub:example_projection_of_several_points}; \ref{ssub:example_combination_of_methods}]\\
\midrule 
\textbf{Miscellaneous} &&\\
\midrule 
\Imeth{line}{distance (pt)}   & |d = L.Ab : distance (z.C)|  &   [\ref{ssub:example_distance_and_projection}] \\
\Imeth{line}{in\_out (pt)}  & |b = L.AB: in_out(z.C)|  & b=true if $C\in (AB)$ ;  [\ref{ssub:in_out_for_a_line}] \\
\Imeth{line}{slope ()} &   |a = L.AB : slope()| & better is L.AB.slope; [\ref{ssub:example_class_line}]\\ 
\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}

\subsubsection{Method \Imeth{line}{report}} % (fold)
\label{ssub:method_report}

|report (d,pt)| If the point is absent, the transfer is made from the first point that defines the line.

\begin{minipage}{.5\textwidth}
  \begin{Verbatim}
  \begin{tkzelements}
  z.A  = point : new (1,-1)
  z.B  = point : new (5,0)
  L.AB = line : new ( z.A , z.B ) 
  z.M  = point : new (2,3)
  z.N  = L.AB :  report (3,z.M)
  z.O  = L.AB :  report (3)
  \end{tkzelements}
  \begin{tikzpicture}
  \tkzGetNodes
  \tkzDrawSegments(A,B M,N)
  \tkzDrawPoints(A,B,M,N,O)
  \tkzLabelPoints(A,B,M,N,O)
  \end{tikzpicture}
  \end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
  \begin{tkzelements}
z.A  = point : new (1,-1)
z.B  = point : new (5,0)
L.AB = line : new ( z.A , z.B ) 
z.M  = point : new (2,3)
z.N  = L.AB :  report (3,z.M)
z.O  = L.AB :  report (3)
\end{tkzelements}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawSegments(A,B M,N)
\tkzDrawPoints(A,B,M,N,O)
\tkzLabelPoints(A,B,M,N,O)
\end{tikzpicture}
\end{minipage}
% subsubsection method_report (end)

\subsubsection{Method \Imeth{line}{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)
   \tkzMarkAngle[red](C,B,A)
   \tkzMarkAngle[red](B,A,C)
   \tkzLabelAngle[red,pos=1.3](C,B,A){$\pi/2$}
   \tkzLabelAngle[red,pos=1.3](B,A,C){$\pi/6$}
\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}

   \begin{center}
     \begin{tikzpicture}
        \tkzGetNodes
        \tkzDrawPolygons(A,B,C) 
        \tkzDrawPoints(A,B,C)
        \tkzLabelPoints(A,B)
        \tkzLabelPoints[above](C)
        \tkzMarkAngle[red](C,B,A)
        \tkzMarkAngle[red](B,A,C)
        \tkzLabelAngle[red,pos=1.3](C,B,A){$\pi/2$}
        \tkzLabelAngle[red,pos=1.3](B,A,C){$\pi/6$}
     \end{tikzpicture}
   \end{center}

\end{minipage}
% subsubsection triangle_with_two__angles (end)

\subsubsection{Method \Imeth{line}{isosceles}} % (fold)
\label{ssub:method_imeth_line_isosceles}
\begin{minipage}{.5\textwidth}
  \begin{Verbatim}
\begin{tkzelements}
   scale          = 2
   z.a            = point :   new (1,2)
   z.b            = point :   new (5,1)
   L.ab           = line :    new (z.a,z.b)
   T.abc          = L.ab :    isosceles (math.pi/6,indirect)
   z.c            = T.abc.pc
   z.L            = T.abc : lemoine_point ()
   T.SY           = T.abc : symmedian ()
   z.Ka,z.Kb,z.Kc = get_points (T.SY)
   L.Kb          = T.abc : symmedian_line (1)
  _,z.Kb        = get_points(L.Kb) 
\end{tkzelements}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawPolygons(a,b,c Ka,Kb,Kc)
\tkzDrawPoints(a,b,c,L,Ka,Kb,Kc)
\tkzLabelPoints(c,L,Ka,Kb)
\tkzLabelPoints[above](a,b,Kc)
\tkzDrawSegments[cyan](a,Ka b,Kb c,Kc)
\end{tikzpicture}
\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
   scale      = 2
   z.a        = point : new (1,2)
   z.b        = point : new (5,1)
   L.ab       = line :  new (z.a,z.b)
   T.abc      = L.ab :  isosceles (math.pi/6,indirect)
   z.c        = T.abc.pc
   z.L        = T.abc : lemoine_point ()
   T.SY       = T.abc : symmedian ()
   z.Ka,z.Kb,
   z.Kc       = get_points (T.SY)
   L.Kb       = T.abc : symmedian_line (1)
  _,z.Kb      = get_points(L.Kb) 
\end{tkzelements}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawPolygons(a,b,c Ka,Kb,Kc)
\tkzDrawPoints(a,b,c,L,Ka,Kb,Kc)
\tkzLabelPoints(c,L,Ka,Kb)
\tkzLabelPoints[above](a,b,Kc)
\tkzDrawSegments[cyan](a,Ka b,Kb c,Kc)
\end{tikzpicture}
\end{minipage}

% subsubsection method_imeth_line_isosceles (end)

\subsubsection{Methods \Imeth{line}{sss}, \Imeth{line}{sas}, \Imeth{line}{ssa}} % (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.

\vspace{6pt}
\begin{minipage}{.4\textwidth}
\begin{Verbatim}
\begin{tkzelements}
  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))
  T.ABD =  L.AB : sas (value(3),math.pi/2)
  T.ABE =  L.AB : ssa (value(7),math.pi/2)
  z.C = T.ABC.pc
  z.D = T.ABD.pc
  z.E = T.ABE.pc
\end{tkzelements}
\hspace{\fill}  
\begin{tikzpicture}[gridded]
  \tkzGetNodes
  \tkzDrawPolygons(A,B,C A,B,D A,B,E) 
  \tkzDrawPoints(A,B,C,D,E)
  \tkzLabelPoints(A,B)
  \tkzLabelPoints[above](C,D,E)
\end{tikzpicture}
\end{Verbatim}
\end{minipage}
\begin{minipage}{.6\textwidth}
\begin{tkzelements}
  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))
  T.ABD =  L.AB : sas (value(3),math.pi/2)
  T.ABE =  L.AB : ssa (value(7),math.pi/2)
  z.C = T.ABC.pc
  z.D = T.ABD.pc
  z.E = T.ABE.pc
\end{tkzelements}

\begin{center}
  \begin{tikzpicture}[gridded]
    \tkzGetNodes
    \tkzDrawPolygons(A,B,C A,B,D A,B,E) 
    \tkzDrawPoints(A,B,C,D,E)
    \tkzLabelPoints(A,B)
    \tkzLabelPoints[above](C,D,E)
  \end{tikzpicture}
\end{center}

\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
   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[teal](C,B,A){$\pi/6$}
   \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
      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{center}
  \begin{tikzpicture}[gridded]
        \tkzGetNodes
        \tkzDrawPolygons(A,B,C A,B,D) 
        \tkzDrawPoints(A,B,C,D)
        \tkzLabelPoints(A,B)
        \tkzLabelPoints[above](C,D)
        \tkzLabelAngle[teal](C,B,A){$\pi/6$}
        \tkzLabelSegment[below left](A,C){$7$}
        \tkzLabelSegment[below left](A,D){$7$}
     \end{tikzpicture}
\end{center}

\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 : 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{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 \Imeth{line}{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{center}
  \begin{tikzpicture}[gridded]
  \tkzGetNodes
     \tkzDrawLine(J,K)
     \tkzDrawPoints(A,B,I,J,K)
     \tkzLabelPoints(A,B,I,J,K)
   \end{tikzpicture}
\end{center}

 \end{minipage}
% subsubsection method_point (end)

\subsubsection{Method \Imeth{line}{colinear\_at}} % (fold)
\label{ssub:method_imeth_line_colinear__at}
If the coefficient is missing then it defaults to $1$ and in the following example we obtain: $CE=AB$ and $(AB)\parallel (CE)$. For point $D$: $CD = .5AB$ and $(AB)\parallel (CD)$.

\begin{minipage}{.5\textwidth}
\begin{Verbatim}
\begin{tkzelements}
  z.A      = point: new (0 , 0)
  z.B      = point: new (4 , 0)
  z.C      = point: new (1 , 3)
  L.AB     = line : new (z.A,z.B)
  z.D      = L.AB : colinear_at (z.C,.5)
  z.E      = L.AB : colinear_at (z.C)
\end{tkzelements}
\begin{tikzpicture}
  \tkzGetNodes
  \tkzDrawSegments(A,B C,E)
  \tkzDrawPoints(A,B,C,D,E)
  \tkzLabelPoints(A,B,C,D,E)
\end{tikzpicture}
\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
  z.A      = point: new (0 , 0)
  z.B      = point: new (4 , 0)
  z.C      = point: new (1 , 3)
  L.AB     = line : new (z.A,z.B)
  z.D      = L.AB : colinear_at (z.C,.5)
  z.E      = L.AB : colinear_at (z.C)
\end{tkzelements}
\begin{center}
  \begin{tikzpicture}
    \tkzGetNodes
    \tkzDrawSegments(A,B C,E)
    \tkzDrawPoints(A,B,C,D,E)
    \tkzLabelPoints(A,B,C,D,E)
  \end{tikzpicture}
\end{center}

\end{minipage}

% subsubsection method_imeth_line_colinear__at (end)


\subsubsection{Method \Imeth{line}{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}

\begin{center}
  \begin{tikzpicture}[gridded]
  \tkzGetNodes
  \tkzDrawSegments(a,b)
  \tkzDrawCircle(a,c)
  \tkzDrawPoints(a,b,c)
  \tkzLabelPoints(a,b,c)
  \end{tikzpicture}
\end{center}

\end{minipage}
% subsubsection normalize (end)


\subsubsection{Method \Imeth{line}{barycenter}} % (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{center}
  \begin{tikzpicture}
     \tkzGetNodes
     \tkzDrawLine(A,B)
     \tkzDrawPoints(A,B,G)
     \tkzLabelPoints(A,B,G)
  \end{tikzpicture}
\end{center}

\end{minipage}
% subsubsection barycenter_with_a_line (end)

\subsubsection{Method \Imeth{line}{ll\_from}} % (fold)
\label{ssub:new_line_from_a_defined_line}
\begin{minipage}{0.5\textwidth}
\begin{Verbatim}
\begin{tkzelements}
   scale = 1.25
   z.A   = point : new (1,1)
   z.B   = point : new (3,2)
   L.AB  = line : new (z.A,z.B)
   z.C   = L.AB.north_pa
   z.D   = L.AB.south_pa
   L.CD  = line : new (z.C,z.D)
   _,z.E   = get_points ( L.CD: ll_from (z.B))
   -- z.E   = L2.pb
\end{tkzelements}
\begin{tikzpicture}
   \tkzGetNodes
   \tkzDrawLines(A,B C,D B,E)
   \tkzDrawPoints(A,...,E)
   \tkzLabelPoints(A,...,E)
   \tkzMarkRightAngle(B,A,C)
   \tkzMarkSegments(A,C A,B A,D)
\end{tikzpicture}
\end{Verbatim}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tkzelements}
scale = 1.25
z.A   = point : new (1,1)
z.B   = point : new (3,2)
L.AB  = line : new (z.A,z.B)
z.C   = L.AB.north_pa
z.D   = L.AB.south_pa
L.CD  = line : new (z.C,z.D)
_,z.E   = get_points ( L.CD: ll_from (z.B))
-- or  z.E   = L2.pb with |L2 = L.CD: ll_from (z.B)|
\end{tkzelements}

\begin{center}
  \begin{tikzpicture}
  \tkzGetNodes
  \tkzDrawLines(A,B C,D B,E)
  \tkzDrawPoints(A,...,E)
  \tkzLabelPoints(A,...,E)
  \tkzMarkRightAngle(B,A,C)
  \tkzMarkSegments(A,C A,B A,D)
  \end{tikzpicture}
\end{center}


\end{minipage}
 %  \caption{New line from defined line}
% subsubsection new_line_from_a_defined_line (end)

\subsubsection{Method \Imeth{line}{ortho\_from}} % (fold)
\label{ssub:newline_ortho_from}
\begin{minipage}{0.5\textwidth}
\begin{Verbatim}
\begin{tkzelements}
   z.A   = point : new (1,1)
   z.B   = point : new (3,2)
   L.AB  = line :  new (z.A,z.B)
   z.C   = point : new (1,3)
   L.CD  = L.AB :  ortho_from(z.C)
   z.D   = L.CD.pb
\end{tkzelements}
\begin{tikzpicture}
   \tkzGetNodes
   \tkzDrawLines(A,B C,D)
   \tkzDrawPoints(A,...,D)
   \tkzLabelPoints(A,...,D)
\end{tikzpicture}
\end{Verbatim}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tkzelements}
   z.A   = point : new (1,1)
   z.B   = point : new (3,2)
   L.AB  = line :  new (z.A,z.B)
  z.C   = point : new (1,3)
   L.CD  = L.AB :  ortho_from(z.C)
   z.D   = L.CD.pb
\end{tkzelements}

\begin{center}
\begin{tikzpicture}
   \tkzGetNodes
   \tkzDrawLines(A,B C,D)
   \tkzDrawPoints(A,...,D)
   \tkzLabelPoints(A,...,D)
\end{tikzpicture}
\end{center}


\end{minipage}

% subsubsection new_line_from_a_defined_line (end)

\subsubsection{Method \Imeth{line}{mediator}} % (fold)
\label{ssub:method_imeth_line_mediator}

In Mathworld, the mediator is the plane through the midpoint of a line segment and perpendicular to that segment, also called a mediating plane. The term "mediator" was introduced by J. Neuberg (Altshiller-Court 1979, p. 298). Here, I have adopted the French term and the mediator or 
the perpendicular bisector  of a line segment, is a line segment perpendicular to the segment and passing through the midpoint of this segment.
\begin{minipage}{.5\textwidth}
\begin{Verbatim}
\begin{tkzelements}
  z.A    = point: new(0,0)
  z.B    = point: new(5,0)
  L.AB   = line: new (z.A,z.B)
  L.med  = L.AB : mediator ()
  z.M    = L.AB.mid
  z.x,z.y= get_points(L.med)
\end{tkzelements}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawLine(A,B)
\tkzDrawSegments(x,y)
\tkzDrawPoints(A,B,M)
\tkzLabelPoints(A,B)
\tkzLabelPoints[below left](x,y,M)
\tkzMarkSegments(A,M M,B)
\end{tikzpicture}
\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
  z.A    = point: new(0,0)
  z.B    = point: new(5,0)
  L.AB   = line: new (z.A,z.B)
  L.med  = L.AB : mediator ()
  z.M    = L.AB.mid
  z.x,z.y= get_points(L.med)
\end{tkzelements}
\begin{center}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawLine(A,B)
\tkzDrawSegments(x,y)
\tkzDrawPoints(A,B,M)
\tkzLabelPoints(A,B)
\tkzLabelPoints[below left](x,y,M)
\tkzMarkSegments(A,M M,B)
\end{tikzpicture}
\end{center}

\end{minipage}

% subsubsection method_imeth_line_mediator (end)

\subsubsection{Method \Imeth{line}{equilateral}} % (fold)
\label{ssub:method_imeth_line_equilateral}

\begin{minipage}{.5\textwidth}
\begin{Verbatim}
\begin{tkzelements}
  z.A    = point: new(0,0)
  z.B    = point: new(5,0)
  L.AB   = line: new (z.A,z.B)
  T.ABC  = L.AB : equilateral ()
  z.C    = T.ABC.pc
\end{tkzelements}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawLine(A,B)
\tkzDrawPolygon(A,B,C)
\tkzMarkSegments(A,B B,C C,A)
\tkzDrawPoints(A,B,C)
\tkzMarkAngles(B,A,C C,B,A A,C,B)
\end{tikzpicture}
\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
  z.A    = point: new(0,0)
  z.B    = point: new(5,0)
  L.AB   = line: new (z.A,z.B)
  T.ABC  = L.AB : equilateral ()
  z.C    = T.ABC.pc
\end{tkzelements}
\begin{center}
  \begin{tikzpicture}
  \tkzGetNodes
  \tkzDrawLine(A,B)
  \tkzDrawPolygon(A,B,C)
  \tkzMarkSegments(A,B B,C C,A)
  \tkzDrawPoints(A,B,C)
  \tkzMarkAngles(B,A,C C,B,A A,C,B)
  \end{tikzpicture}
\end{center}

\end{minipage}

% subsubsection method_imeth_line_equilateral (end)

\subsubsection{Method \Imeth{line}{projection}} % (fold)
\label{ssub:example_projection_of_several_points}
\begin{minipage}{0.5\textwidth}
\begin{Verbatim}
\begin{tkzelements}
   scale     = .8
   z.a       = point:  new (0, 0)
   z.b       = point:  new (4, 1)
   z.c       = point:  new (2, 5)
   z.d       = point:  new (5, 2)
   L.ab      = line:   new (z.a,z.b)
   z.cp,z.dp = L.ab:  projection(z.c,z.d)
\end{tkzelements}
 \begin{tikzpicture}
   \tkzGetNodes
   \tkzDrawLines(a,b c,c' d,d')
   \tkzDrawPoints(a,...,d,c',d')
   \tkzLabelPoints(a,...,d,c',d')
 \end{tikzpicture}
\end{Verbatim}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tkzelements}
scale  = .8
z.a    = point:  new (0, 0)
z.b    = point:  new (4, 1)
z.c    = point:  new (2, 5)
z.d    = point:  new (5, 2)
L.ab        = line:   new (z.a,z.b)
z.cp,z.dp   = L.ab :  projection(z.c,z.d)
\end{tkzelements}

\begin{center}
  \begin{tikzpicture}
  \tkzGetNodes
  \tkzDrawLines(a,b c,c' d,d')
  \tkzDrawPoints(a,...,d,c',d')
  \tkzLabelPoints(a,...,d,c',d')
  \end{tikzpicture}
\end{center}

\end{minipage}

% \caption{Projection of several points}
% subsubsection example_projection_of_several_points (end)

\subsubsection{Example: combination of methods} % (fold)
\label{ssub:example_combination_of_methods}

\begin{minipage}{0.6\textwidth}
\begin{Verbatim}
\begin{tkzelements}
   z.A     = point: new (0 , 0)
   z.B     = point: new (6 , 0)
   z.C     = point: new (1 , 5)
   T.ABC   = triangle: new (z.A,z.B,z.C)
   L.AB    = T.ABC.ab
   z.O     = T.ABC.circumcenter
   C.OA    = circle: new (z.O,z.A)
   z.H     = L.AB: projection (z.O)
   L.ab    = C.OA: tangent_at (z.A)
   z.a,z.b = L.ab.pa,L.ab.pb
  -- or z.a,z.b  = get_points (L.ab)
\end{tkzelements}
\begin{tikzpicture}
   \tkzGetNodes
   \tkzDrawPolygon(A,B,C)
   \tkzDrawCircle(O,A)
   \tkzDrawSegments[purple](O,A O,B O,H)
   \tkzDrawArc[red](O,A)(B)
   \tkzDrawArc[blue](O,B)(A)
   \tkzDrawLine[add = 2 and 1](A,a)
   \tkzFillAngles[teal!30,opacity=.4](A,C,B b,A,B A,O,H)
   \tkzMarkAngles[mark=|](A,C,B b,A,B A,O,H H,O,B)
   \tkzDrawPoints(A,B,C,H,O)
   \tkzLabelPoints(B,H)
   \tkzLabelPoints[above](O,C)
   \tkzLabelPoints[left](A)
\end{tikzpicture}
\end{Verbatim}
\end{minipage}
\begin{minipage}{0.4\textwidth}
\begin{tkzelements}
scale   = .5
z.A     = point: new (0 , 0)
z.B     = point: new (6 , 0)
z.C     = point: new (1 , 5)
T.ABC   = triangle: new (z.A,z.B,z.C)
L.AB    = T.ABC.ab
z.O     = T.ABC.circumcenter
C.OA    = circle: new (z.O,z.A)
z.H     = L.AB : projection (z.O)
L.ab    = C.OA : tangent_at (z.A)
z.a,z.b = L.ab.pa,L.ab.pb
   -- or z.a,z.b  = get_points (L.ab)
\end{tkzelements}

\begin{center}
  \begin{tikzpicture}
  \tkzGetNodes
  \tkzDrawPolygon(A,B,C)
  \tkzDrawCircle(O,A)
  \tkzDrawSegments[purple](O,A O,B O,H)
  \tkzDrawArc[red](O,A)(B)
  \tkzDrawArc[blue](O,B)(A)
  \tkzDrawLine[add = 2 and 1](A,a)
  \tkzFillAngles[teal!30,opacity=.4,,size=.5](A,C,B b,A,B A,O,H)
  \tkzMarkAngles[mark=|,size=.5](A,C,B b,A,B A,O,H H,O,B)
  \tkzDrawPoints(A,B,C,H,O)
  \tkzLabelPoints(B,H)
  \tkzLabelPoints[above](O,C)
  \tkzLabelPoints[left](A)
  \end{tikzpicture}
\end{center}


\end{minipage}

% subsubsection example_combination_of_methods (end)

\subsubsection{Method \Imeth{line}{translation}} % (fold)
\label{ssub:example_translation}

\begin{minipage}{0.6\textwidth}
\begin{Verbatim}
\begin{tkzelements}
   z.A  = point:  new (0,0)
   z.B  = point:  new (1,2)
   z.C  = point:  new (-3,2)
   z.D  = point:  new (0,2)
   L.AB = line : new (z.A,z.B)
   z.E,z.F = L.AB : translation (z.C,z.D)
\end{tkzelements}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawPoints(A,...,F)
\tkzLabelPoints(A,...,F)
\tkzDrawSegments[->,red,> =latex](C,E D,F A,B)
\end{tikzpicture}
\end{Verbatim}
\end{minipage}
\begin{minipage}{0.4\textwidth}
\begin{tkzelements}
   z.A  = point:  new (0,0)
   z.B  = point:  new (1,2)
   z.C  = point:  new (-3,2)
   z.D  = point:  new (0,2)
   L.AB = line : new (z.A,z.B)
   z.E,z.F = L.AB : translation (z.C,z.D)
\end{tkzelements}

\begin{center}
  \begin{tikzpicture}
  \tkzGetNodes
  \tkzDrawPoints(A,...,F)
  \tkzLabelPoints(A,...,F)
  \tkzDrawSegments[->,red,> =latex](C,E D,F A,B) )
  \end{tikzpicture}
\end{center}


\end{minipage}

% subsubsection example_translation (end)


\subsubsection{Method \Imeth{line}{reflection} of an object} % (fold)
\label{ssub:reflection_of_object}

\begin{minipage}{.5\textwidth}
\begin{Verbatim}
\begin{tkzelements}
   z.A = point : new ( 0 , 0 ) 
   z.B = point : new ( 4 , 1 )
   z.E = point : new ( 0 , 2 ) 
   z.F = point : new ( 3 , 3 )  
   z.G = point : new ( 4 , 2 )
   L.AB = line : new ( z.A , z.B )
   T.EFG = triangle : new (z.E,z.F,z.G)
   T.new = L.AB : reflection (T.EFG)
   z.Ep,z.Fp,z.Gp = get_points(T.new)
\end{tkzelements}
\begin{tikzpicture}
   \tkzGetNodes
   \tkzDrawLine(A,B)
   \tkzDrawPolygon(E,F,G)
   \tkzDrawPolygon[new](E',F',G')
   \tkzDrawSegment[red,dashed](E,E')
\end{tikzpicture}
\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
   z.A = point : new ( 0 , 0 ) 
   z.B = point : new ( 4 , 1 )
   z.E = point : new ( 0 , 2 ) 
   z.F = point : new ( 3 , 3 )  
   z.G = point : new ( 4 , 2 )
   L.AB = line : new ( z.A , z.B )
   T.EFG = triangle : new (z.E,z.F,z.G)
   T.new = L.AB : reflection (T.EFG)
   z.Ep,z.Fp,z.Gp = get_points(T.new)
\end{tkzelements}

\begin{center}
  \begin{tikzpicture}
     \tkzGetNodes
     \tkzDrawLine(A,B)
     \tkzDrawPolygon(E,F,G)
     \tkzDrawPolygon[new](E',F',G')
     \tkzDrawSegment[red,dashed](E,E')
  \end{tikzpicture}
\end{center}

\end{minipage}
% subsubsection reflection_of_object (end)

\subsubsection{Method \Imeth{line}{distance}} % (fold)
\label{ssub:example_distance_and_projection}

\begin{minipage}{0.5\textwidth}
\begin{Verbatim}
\begin{tkzelements}
   z.A    = point : new (0 , 0)
   z.B    = point : new (5 , -2)
   z.C    = point : new (3 , 3)
   L.AB   = line : new (z.A,z.B)
   d      = L.AB : distance (z.C)
   z.H    = L.AB : projection (z.C)
\end{tkzelements}
\begin{tikzpicture}
  \tkzGetNodes
  \tkzDrawLines(A,B C,H)
  \tkzDrawPoints(A,B,C,H)
  \tkzLabelPoints(A,B,C,H)
  \tkzLabelSegment[above left,
  draw](C,H){$CH = \tkzUseLua{d}$}
\end{tikzpicture}
\end{Verbatim}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tkzelements}
   z.A    = point : new (0 , 0)
   z.B    = point : new (5 , -2)
   z.C    = point : new (3 , 3)
   L.AB   = line : new (z.A,z.B)
   d      = L.AB : distance (z.C)
   z.H    = L.AB : projection (z.C)
\end{tkzelements}

\begin{center}
  \begin{tikzpicture}
  \tkzGetNodes
  \tkzDrawLines(A,B C,H)
  \tkzDrawPoints(A,B,C,H)
  \tkzLabelPoints(A,B,C,H)
  \tkzLabelSegment[above left,draw](C,H){$CH = \tkzUseLua{d}$}
  \end{tikzpicture}
\end{center}


\end{minipage}

% \caption{Method distance with line object}
% subsubsection example_distance_and_projection (end)


\subsubsection{Method \Imeth{line}{apollonius} (Apollonius circle MA/MB = k)} % (fold)
\label{ssub: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)
   \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$}
   \tkzLabelPoints[below right](A,B,O,C,D)
   \tkzLabelPoints[above](P)
   \tkzMarkRightAngle[opacity=.3,fill=lightgray](D,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 )  
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{center}
  \begin{tikzpicture}
  \tkzGetNodes
  \tkzFillCircle[blue!20,opacity=.2](O,C)
  \tkzDrawCircle[blue!50!black](O,C)
  \tkzDrawPoints(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$}
    \tkzLabelPoints[below right](A,B,O,C,D)
    \tkzLabelPoints[above](P)
  \tkzMarkRightAngle[opacity=.3,fill=lightgray](D,P,C)
  \tkzMarkAngles[mark=||](A,P,D D,P,B)
  \end{tikzpicture}
\end{center}


Remark: |\tkzUseLua{length(z.P,z.A)/length(z.P,z.B)}| = \tkzUseLua{length(z.P,z.A)/length(z.P,z.B)}
% subsubsection apollonius_circle_ma_mb_k (end)

% subsection methods_from_class_line (end)

% section class_line (end)
\endinput
