summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-elements/doc
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-01-17 03:01:02 +0000
committerNorbert Preining <norbert@preining.info>2024-01-17 03:01:02 +0000
commit4fd81a66c82a2ba8787c6ca78bfcc14820e4017c (patch)
treebd843b1d561c776d5f54e18c0f07c05b079bb791 /macros/latex/contrib/tkz/tkz-elements/doc
parent384734a07c53090ad651e786d248c5ba8cd4606e (diff)
CTAN sync 202401170301
Diffstat (limited to 'macros/latex/contrib/tkz/tkz-elements/doc')
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-circle.tex296
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-ellipse.tex151
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-line.tex526
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-misc.tex175
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-parallelogram.tex4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-point.tex261
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-quadrilateral.tex4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-rectangle.tex4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-regular.tex26
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-square.tex4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-triangle.tex112
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes.tex1
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-examples.tex195
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-indepthstudy.tex3
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-inversion.tex4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.tex366
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-organization.tex100
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-tests.tex4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-transferts.tex47
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-why.tex4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/gold_preamble.lua46
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/sangaku.lua14
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/tkz-elements.pdfbin584764 -> 642250 bytes
23 files changed, 1809 insertions, 538 deletions
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-circle.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-circle.tex
index a945f3de7c..4dd3b75b60 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-circle.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-circle.tex
@@ -13,18 +13,20 @@ This class is also defined by two points: on the one hand, the center and on the
\bgroup
\catcode`_=12
\small
-\captionof{table}{Circle attributes.}
+\captionof{table}{Circle attributes.}\label{circle:att}
\begin{tabular}{lll}
\toprule
\textbf{Attributes} & \textbf{Application} &\\
\Iattr{circle}{center} & |z.A = C.AB.center| &\\
\Iattr{circle}{through} & |z.B = C.AB.through| &\\
-\Iattr{circle}{type} & |C.AB.type| &\tkzar |C.OA.type = 'circle'|\\
-\Iattr{circle}{radius} & |C.AB.radius| &\tkzar |r = C.OA.radius | $r$ real number\\
-\Iattr{circle}{north} & |C.AB.north| &\tkzar |z.N = C.OA.north|\\
-\Iattr{circle}{south} & |C.AB.south| & \tkzar |z.S = C.OA.south| \\
-\Iattr{circle}{east} & |C.AB.east| &\tkzar |z.E = C.OA.east| \\
-\Iattr{circle}{west} & |C.AB.west| &\tkzar |z.W = C.OA.west| \\
+\Iattr{circle}{type} & |C.AB.type| & |C.OA.type = 'circle'|\\
+\Iattr{circle}{radius} & |C.AB.radius| & |r = C.OA.radius | $r$ real number\\
+\Iattr{circle}{north} & |C.AB.north| & |z.N = C.OA.north|\\
+\Iattr{circle}{south} & |C.AB.south| & |z.S = C.OA.south| \\
+\Iattr{circle}{east} & |C.AB.east| & |z.E = C.OA.east| \\
+\Iattr{circle}{west} & |C.AB.west| & |z.W = C.OA.west| \\
+\Iattr{circle}{opp} & |z.Ap = C.AB.opp| & see (\ref{ssub:example_circle_attributes}) \\
+\Iattr{circle}{ct} & |L = C.AB.ct| & see (\ref{ssub:example_circle_attributes}) \\
\bottomrule %
\end{tabular}
\egroup
@@ -44,14 +46,16 @@ Three attributes are used (south, west, radius).
z.s = C.ab.south
z.w = C.ab.west
r = C.ab.radius
+ z.c = C.ab.opp
+ z.r,z.t = get_points (C.ab.ct : ortho_from (z.b))
\end{tkzelements}
\begin{tikzpicture}
- \tkzGetNodes
- \tkzDrawPoints(a,b,s,w)
- \tkzLabelPoints(a,b,s,w)
- \tkzDrawCircle(a,b)
- \tkzDrawSegment(a,b)
- \tkzLabelSegment[sloped](a,b){ab = \tkzUseLua{r}}
+\tkzGetNodes
+\tkzDrawPoints(a,b,c,s,w)
+\tkzLabelPoints(a,b,c,s,w)
+\tkzDrawCircle(a,b)
+\tkzDrawSegments(a,b r,t b,c)
+\tkzLabelSegment[sloped](a,b){ab = \tkzUseLua{r}}
\end{tikzpicture}
\end{tkzexample}
\end{minipage}
@@ -64,15 +68,16 @@ Three attributes are used (south, west, radius).
z.s = C.ab.south
z.w = C.ab.west
r = C.ab.radius
+ z.c = C.ab.opp
+ z.r,z.t = get_points (C.ab.ct : ortho_from (z.b))
\end{tkzelements}
-
\hspace*{\fill}
\begin{tikzpicture}
\tkzGetNodes
-\tkzDrawPoints(a,b,s,w)
-\tkzLabelPoints(a,b,s,w)
+\tkzDrawPoints(a,b,c,s,w)
+\tkzLabelPoints(a,b,c,s,w)
\tkzDrawCircle(a,b)
-\tkzDrawSegment(a,b)
+\tkzDrawSegments(a,b r,t b,c)
\tkzLabelSegment[sloped](a,b){ab = \tkzUseLua{r}}
\end{tikzpicture}
\hspace*{\fill}
@@ -86,45 +91,49 @@ Three attributes are used (south, west, radius).
\bgroup
\catcode`_=12
\small
-\captionof{table}{Circle methods.}
+\captionof{table}{Circle methods.}\label{circle:met}
\begin{tabular}{lll}
\toprule
\textbf{Methods} & \textbf{Comments} & \\
\midrule \\
\Imeth{circle}{new(O,A)} & |C.OA = circle : new (z.O,z.A)| & circle center $O$ through $A$\\
\Imeth{circle}{radius(O,r)} & |C.OA = circle : radius (z.O,2)| & circle center $O$ radius =2 cm\\
+\Imeth{circle}{diameter(A,B)} & |C.OA = circle :diameter(z.A,z.B)| & circle diameter $[AB]$ \\
\midrule
\textbf{Points} &&\\
\midrule
\Imeth{circle}{antipode (pt)} & |z.C = C.OA: antipode (z.B)| & $[BC]$ is a diameter \\
\Imeth{circle}{inversion (pt)} & |z.Bp = C.AC: inversion (z.B)|&\\
-\Imeth{circle}{midarc (z1,z2)} & |z.D = C.AB: midarc (z.B,z.C)|& $D$ is the midarc of $\widearc{BC}$\\
-\Imeth{circle}{point (t)} & |z.E = C.AB: point (0.25)|& |t| between 0 and 1\\
+\Imeth{circle}{midarc (pt,pt)} & |z.D = C.AB: midarc (z.B,z.C)|& $D$ is the midarc of $\widearc{BC}$\\
+\Imeth{circle}{point (r)} & |z.E = C.AB: point (0.25)|& |r| between 0 and 1\\
\Imeth{circle}{random\_pt(lower, upper)} & &\\
\Imeth{circle}{internal\_similitude (C)} & |z.I = C.one : internal_similitude (C.two)| &\\
\Imeth{circle}{external\_similitude (C)} & |z.J = C.one : external_similitude (C.two)| & \\
+\Imeth{circle}{radical\_center (C1<,C2>)} & or only (C1) & see \ref{sub:radical_center} \\
\midrule
\textbf{Lines} & & \\
\midrule
-\Imeth{circle}{radical\_axis (C)} & & \\
-\Imeth{circle}{tangent\_at (pt)} & |z.P = C.OA: tangent_at (z.M)| & $((PM) \perp (OM))$\\
-\Imeth{circle}{tangent\_from (pt)}& |z.M,z.N = C.OA: tangent_from (z.P)| &\\
-\Imeth{circle}{inversion (line)} & |L or C = C.AC: inversion (L.EF)|&\\
+\Imeth{circle}{radical\_axis (C)} & see ( \ref{sub:d_alembert_2} ; \ref{sub:radical_axis_v1} ; \ref{sub:radical_axis_v2} ; \ref{sub:radical_axis_v3} ; \ref{sub:radical_axis_v4})& \\
+\Imeth{circle}{tangent\_at (pt)} & |z.P = C.OA: tangent_at (z.M)| & see (\ref{ssub:lemoine} ; \ref{ssub:example_combination_of_methods})\\
+\Imeth{circle}{tangent\_from (pt)}& |z.M,z.N = C.OA: tangent_from (z.P)| & see (\ref{tangent_from})\\
+\Imeth{circle}{inversion (line)} & |L or C = C.AC: inversion (L.EF)|& see (\ref{ssub:inversion_line})\\
+\Imeth{circle}{common\_tangent (C)} & |z.a,z.b = C.AC: common_tangent (C.EF)|& see (\ref{sub:common_tangent} ; \ref{sub:common_tangent_orthogonality})\\
\midrule
\textbf{Circles}& &\\
\midrule
-\Imeth{circle}{orthogonal\_from (pt)} & |C = C.OA: orthogonal_from (z.P)| & \\
-\Imeth{circle}{orthogonal\_through (pta,ptb)} & |C = C.OA: orthogonal_through (z.z1,z.z2)|\\
+\Imeth{circle}{orthogonal\_from (pt)} & |C = C.OA: orthogonal_from (z.P)| & see (\ref{ssub:altshiller} ; \ref{sub:common_tangent_orthogonality} ; \ref{sub:orthogonal_circles_v1} ; \ref{sub:pencil_v1}) \\
+\Imeth{circle}{orthogonal\_through (pta,ptb)} & |C = C.OA: orthogonal_through (z.z1,z.z2)| & see (\ref{sub:orthogonal_circle_through})\\
\Imeth{circle}{inversion (...)} & | C.AC: inversion (pt, pts, L or C )|& see \ref{ssub:inversion}, \ref{ssub:inversion_point}, \ref{ssub:inversion_line}, \ref{ssub:inversion_circle}\\
\Imeth{circle}{midcircle (C)} & |C.inv = C.OA: midcircle (C.EF)| & see \ref{ssub:midcircle} \\
+\Imeth{circle}{radical\_circle (C1<,C2>)} & or only (C1) & see \ref{sub:radical_circle}\\
\midrule
\textbf{Miscellaneous} &&\\
\midrule
-\Imeth{circle}{power (pt)} &|p = C.OA: power (z.M)| & power with respect to a circle \\
-\Imeth{circle}{in\_out (pt)} & |C.OA : in_out (z.M)| & boolean \\
-\Imeth{circle}{in\_out\_disk (pt)} & |C.OA : in_out_disk (z.M)| & boolean \\
+\Imeth{circle}{power (pt)} &|p = C.OA: power (z.M)| & see (\ref{sub:power_v1} ; \ref{sub:power_v2} ; \ref{sub:apollonius_circle_v1_with_inversion}) \\
+\Imeth{circle}{in\_out (pt)} & |C.OA : in_out (z.M)| & see (\ref{sub:in_out_for_circle_and_disk}) \\
+\Imeth{circle}{in\_out\_disk (pt)} & |C.OA : in_out_disk (z.M)| & see (\ref{sub:in_out_for_circle_and_disk}) \\
\Imeth{circle}{draw ()} & for further use &\\
-\Imeth{circle}{circles\_position (C1,C2)} & see \ref{sub:circles_position} \\
+\Imeth{circle}{circles\_position (C1)} & result = string &see (\ref{sub:circles_position}) \\
\bottomrule
\end{tabular}
\egroup
@@ -570,7 +579,7 @@ z.X,z.Y = intersection (C.AO,C.BP)
This case is a little more complicated. We'll construct the two circles $(\alpha)$ and $(\beta)$ tangent to the two given circles. Then we construct the radical circle orthogonal to the circles $(\alpha)$ and $(\beta)$. Its center is the radical center as well as the center of internal similtude of circles of center $A$ and $B$.
\item When the two given circles are external to each other, we construct the external center of similitude of the two given circles.
-$I$ is the center of external similarity of the two given circles. To obtain the inversion circle, simply note that $H$ is such that $IH^2= IE\times IF$
+$I$ is the center of external similarity of the two given circles. To obtain the inversion circle, simply note that $H$ is such that $IH^2= IE\times IF$. \label{tangent_from}
\begin{minipage}{.4\textwidth}
\begin{verbatim}
@@ -757,13 +766,13 @@ Cette fonction retourne une chaîne qui indique la position du cercle par rappor
\begin{minipage}{.5\textwidth}
\begin{verbatim}
\begin{tkzelements}
- z.A = point : new ( 0 , 0 )
- z.a = point : new ( 3 , 0 )
- z.B = point : new ( 2 , 0 )
- z.b = point : new ( 3 , 0 )
- C.Aa = circle: new (z.A,z.a)
- C.Bb ·= circle: new (z.B,z.b)
- position = circles_position (C.Aa,C.Bb)
+ z.A = point : new ( 0 , 0 )
+ z.a = point : new ( 3 , 0 )
+ z.B = point : new ( 2 , 0 )
+ z.b = point : new ( 3 , 0 )
+ C.Aa = circle: new (z.A,z.a)
+ C.Bb = circle: new (z.B,z.b)
+ position = C.Aa : circles_position (C.Bb)
if position == "inside tangent"
then color = "orange"
else color = "blue" end
@@ -784,7 +793,7 @@ z.B = point : new ( 2 , 0 )
z.b = point : new ( 3 , 0 )
C.Aa = circle: new (z.A,z.a)
C.Bb = circle: new (z.B,z.b)
-position = circles_position (C.Aa,C.Bb)
+position = C.Aa : circles_position (C.Bb)
if position == "inside tangent" then color = "orange" else color = "blue" end
\end{tkzelements}
\hspace{\fill}
@@ -795,5 +804,214 @@ if position == "inside tangent" then color = "orange" else color = "blue" end
\end{tikzpicture}\hspace{\fill}
\end{minipage}
% subsection circles__position (end)
+
+\subsection{Common tangent: Angle of two intersecting circles} % (fold)
+\label{sub:common_tangent}
+
+Let be a tangent common to both circles at $T$ and $T'$ (closest to $C$). Let a secant parallel to this tangent pass through $C$. Then the segment $[TT']$ is seen from the other common point $D$ at an angle equal to half the angle of the two circles.
+
+\begin{verbatim}
+\begin{tkzelements}
+ z.A = point : new ( 0 , 0 )
+ z.B = point : new ( 5 , 2 )
+ L.AB = line : new ( z.A , z.B )
+ z.C = point : new ( 1 , 2 )
+ C.AC = circle : new (z.A,z.C)
+ C.BC = circle : new (z.B,z.C)
+ z.T,z.Tp = C.AC : common_tangent (C.BC)
+ L.TTp = line : new (z.T,z.Tp)
+ z.M = C.AC : point (0.45)
+ L.MC =line : new (z.M,z.C)
+ z.Mp = intersection (L.MC, C.BC)
+ L.mm = L.TTp : ll_from (z.C)
+ _,z.M = intersection (L.mm, C.AC)
+ z.Mp = intersection (L.mm, C.BC)
+ _,z.D = intersection (C.AC,C.BC)
+\end{tkzelements}
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawCircles(A,C B,C)
+ \tkzDrawSegments(M,M' A,D B,D A,B C,D T,C T',C)
+ \tkzDrawSegments[gray](D,M D,M' T,T' D,T D,T')
+ \tkzDrawPoints(A,B,C,D,M,M',T,T')
+ \tkzLabelPoints(A,B,D,M)
+ \tkzLabelPoints[above](C,M',T,T')
+ \tkzMarkAngles[mark=|,size=.75](T,C,M C,T,T' C,D,T T,D,M)
+ \tkzMarkAngles[mark=||,size=.75](M',C,T' T,T',C T',D,C M',D,T')
+\end{tikzpicture}
+\end{verbatim}
+
+
+\begin{tkzelements}
+z.A = point : new ( 0 , 0 )
+z.B = point : new ( 5 , 2 )
+L.AB = line : new ( z.A , z.B )
+z.C = point : new ( 1 , 2 )
+C.AC = circle : new (z.A,z.C)
+C.BC = circle : new (z.B,z.C)
+z.T,z.Tp = C.AC : common_tangent (C.BC)
+L.TTp = line : new (z.T,z.Tp)
+z.M = C.AC : point (0.45)
+L.MC =line : new (z.M,z.C)
+z.Mp = intersection (L.MC, C.BC)
+L.mm = L.TTp : ll_from (z.C)
+_,z.M = intersection (L.mm, C.AC)
+z.Mp = intersection (L.mm, C.BC)
+_,z.D = intersection (C.AC,C.BC)
+\end{tkzelements}
+\hspace*{\fill}
+\begin{tikzpicture}
+\tkzGetNodes
+\tkzDrawCircles(A,C B,C)
+\tkzDrawSegments(M,M' A,D B,D A,B C,D T,C T',C)
+\tkzDrawSegments[gray](D,M D,M' T,T' D,T D,T')
+\tkzDrawPoints(A,B,C,D,M,M',T,T')
+\tkzLabelPoints(A,B,D,M)
+\tkzLabelPoints[above](C,M',T,T')
+\tkzMarkAngles[mark=|,size=.75](T,C,M C,T,T' C,D,T T,D,M)
+\tkzMarkAngles[mark=||,size=.75](M',C,T' T,T',C T',D,C M',D,T')
+\end{tikzpicture}
+\hspace*{\fill}
+
+% subsection common_tangent (end)
+
+\subsection{Common tangent: orthogonality} % (fold)
+\label{sub:common_tangent_orthogonality}
+For two circles to be orthogonal, it is necessary and sufficient for a secant passing through one of their common points to be seen from the other common point at a right angle.
+
+\begin{verbatim}
+\begin{tkzelements}
+ z.A = point : new ( 0 , 0 )
+ z.B = point : new ( 4 , 2 )
+ L.AB = line : new ( z.A , z.B )
+ z.a = point : new ( 1 , 2 )
+ C.Aa = circle : new (z.A,z.a)
+ C.BC = C.Aa : orthogonal_from (z.B)
+ z.C,z.D = intersection (C.Aa,C.BC)
+ C.AC = circle : new (z.A,z.C)
+ z.T,z.Tp = C.AC : common_tangent (C.BC)
+ L.TTp = line : new (z.T,z.Tp)
+ z.M = C.AC : point (0.45)
+ L.MC =line : new (z.M,z.C)
+ z.Mp = intersection (L.MC, C.BC)
+ L.mm = L.TTp : ll_from (z.C)
+ _,z.M = intersection (L.mm, C.AC)
+ z.Mp = intersection (L.mm, C.BC)
+\end{tkzelements}
+
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawCircles(A,C B,C)
+ \tkzDrawSegments(M,M' A,C B,C A,B)
+ \tkzDrawSegments[gray](D,M D,M' T,T')
+ \tkzDrawPoints(A,B,C,D,M,M',T,T')
+ \tkzLabelPoints(A,B,D,M)
+ \tkzLabelPoints[above](C,M',T,T')
+ \tkzMarkRightAngles(M',D,M A,C,B)
+\end{tikzpicture}
+\end{verbatim}
+
+\begin{tkzelements}
+z.A = point : new ( 0 , 0 )
+z.B = point : new ( 4 , 2 )
+L.AB = line : new ( z.A , z.B )
+z.a = point : new ( 1 , 2 )
+C.Aa = circle : new (z.A,z.a)
+C.BC = C.Aa : orthogonal_from (z.B)
+z.C,z.D = intersection (C.Aa,C.BC)
+C.AC = circle : new (z.A,z.C)
+z.T,z.Tp = C.AC : common_tangent (C.BC)
+L.TTp = line : new (z.T,z.Tp)
+z.M = C.AC : point (0.45)
+L.MC =line : new (z.M,z.C)
+z.Mp = intersection (L.MC, C.BC)
+L.mm = L.TTp : ll_from (z.C)
+_,z.M = intersection (L.mm, C.AC)
+z.Mp = intersection (L.mm, C.BC)
+\end{tkzelements}
+ \hspace*{\fill}
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawCircles(A,C B,C)
+ \tkzDrawSegments(M,M' A,C B,C A,B)
+ \tkzDrawSegments[gray](D,M D,M' T,T')
+ \tkzDrawPoints(A,B,C,D,M,M',T,T')
+ \tkzLabelPoints(A,B,D,M)
+ \tkzLabelPoints[above](C,M',T,T')
+ \tkzMarkRightAngles(M',D,M A,C,B)
+\end{tikzpicture}
+\hspace*{\fill}
+% subsection common_tangent_orthogonality (end)
+
+\subsection{In\_out for circle and disk} % (fold)
+\label{sub:in_out_for_circle_and_disk}
+
+\begin{verbatim}
+\begin{tkzelements}
+z.O = point : new (0,0)
+z.A = point : new (1,2)
+C.OA = circle : new (z.O,z.A)
+z.N = point : new (-2,2)
+z.M = point : new (1,0)
+z.P = point : new (2,1)
+BCm = C.OA : in_out (z.M)
+BDm = C.OA : in_out_disk (z.M)
+BCn = C.OA : in_out (z.N)
+BDn = C.OA : in_out_disk (z.N)
+BCp = C.OA : in_out (z.P)
+BDp = C.OA : in_out_disk (z.P)
+\end{tkzelements}
+\def\tkzPosPoint#1#2#3#4{%
+\tkzLabelPoints(O,M,N,P)
+ \ifthenelse{\equal{\tkzUseLua{#1}}{true}}{
+ \tkzLabelPoint[below=#4pt,font=\scriptsize](#2){on the #3}}{%
+ \tkzLabelPoint[below=#4pt,font=\scriptsize](#2){out the #3}}}
+\begin{tikzpicture}
+\tkzGetNodes
+\tkzDrawSegments[dashed](O,M O,N O,P)
+\tkzDrawCircle(O,A)
+\tkzDrawPoints(O,M,N,P)
+\tkzPosPoint{BCm}{M}{circle}{8}
+\tkzPosPoint{BCn}{N}{circle}{8}
+\tkzPosPoint{BCp}{P}{circle}{8}
+\tkzPosPoint{BDm}{M}{disk}{14}
+\tkzPosPoint{BDn}{N}{disk}{14}
+\tkzPosPoint{BDp}{P}{disk}{14}
+\end{tikzpicture}
+\end{verbatim}
+
+\begin{tkzelements}
+z.O = point : new (0,0)
+z.A = point : new (1,2)
+C.OA = circle : new (z.O,z.A)
+z.N = point : new (-2,2)
+z.M = point : new (1,0)
+z.P = point : new (2,1)
+BCm = C.OA : in_out (z.M)
+BDm = C.OA : in_out_disk (z.M)
+BCn = C.OA : in_out (z.N)
+BDn = C.OA : in_out_disk (z.N)
+BCp = C.OA : in_out (z.P)
+BDp = C.OA : in_out_disk (z.P)
+\end{tkzelements}
+\def\tkzPosPoint#1#2#3#4{%
+\tkzLabelPoints(O,M,N,P)
+ \ifthenelse{\equal{\tkzUseLua{#1}}{true}}{
+ \tkzLabelPoint[below=#4pt,font=\scriptsize](#2){on the #3}}{%
+ \tkzLabelPoint[below=#4pt,font=\scriptsize](#2){out the #3}}
+}
+\begin{tikzpicture}
+\tkzGetNodes
+\tkzDrawSegments[dashed](O,M O,N O,P)
+\tkzDrawCircle(O,A)
+\tkzDrawPoints(O,M,N,P)
+\tkzPosPoint{BCm}{M}{circle}{8}
+\tkzPosPoint{BCn}{N}{circle}{8}
+\tkzPosPoint{BCp}{P}{circle}{8}
+\tkzPosPoint{BDm}{M}{disk}{14}
+\tkzPosPoint{BDn}{N}{disk}{14}
+\tkzPosPoint{BDp}{P}{disk}{14}
+\end{tikzpicture}
+% subsection in_out_for_circle_and_disk (end)
% section class_circle (end)
\endinput
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-ellipse.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-ellipse.tex
index e700019fa3..bbe39aa1a2 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-ellipse.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-ellipse.tex
@@ -10,7 +10,7 @@ The first attributes are the three points that define the ellipse : \Iattr{ellip
\bgroup
\catcode`_=12
\small
-\captionof{table}{Ellipse attributes.}
+\captionof{table}{Ellipse attributes.}\label{ellipse:att}
\begin{tabular}{ll}
\toprule
\textbf{Attributes} & \textbf{Application}\\
@@ -34,84 +34,85 @@ The first attributes are the three points that define the ellipse : \Iattr{ellip
\subsubsection{Atributes of an ellipse: example} % (fold)
\label{ssub:attributes_of_an_ellipse}
-\begin{tkzexample}[latex=0cm,small,code only]
-\begin{tkzelements}
- z.C = point: new (3 , 2)
- z.A = point: new (5 , 1)
- L.CA = line : new (z.C,z.A)
- z.b = L.CA.north_pa
- L = line : new (z.C,z.b)
- z.B = L : point (0.5)
- E = ellipse: new (z.C,z.A,z.B)
- a = E.Rx
- b = E.Ry
- z.F1 = E.Fa
- z.F2 = E.Fb
- slope = math.deg(E.slope)
- z.E = E.east
- z.N = E.north
- z.W = E.west
- z.S = E.south
- z.Co = E.covertex
- z.Ve = E.vertex
-\end{tkzelements}
-\begin{tikzpicture}
+\begin{minipage}{.5\textwidth}
+ \begin{verbatim}
+ \begin{tkzelements}
+ z.C = point: new (3 , 2)
+ z.A = point: new (5 , 1)
+ L.CA = line : new (z.C,z.A)
+ z.b = L.CA.north_pa
+ L = line : new (z.C,z.b)
+ z.B = L : point (0.5)
+ E = ellipse: new (z.C,z.A,z.B)
+ a = E.Rx
+ b = E.Ry
+ z.F1 = E.Fa
+ z.F2 = E.Fb
+ slope = math.deg(E.slope)
+ z.E = E.east
+ z.N = E.north
+ z.W = E.west
+ z.S = E.south
+ z.Co = E.covertex
+ z.Ve = E.vertex
+ \end{tkzelements}
+ \begin{tikzpicture}
+ \pgfkeys{/pgf/number format/.cd,fixed,precision=2}
+ \tkzGetNodes
+ \tkzDrawCircles[teal](C,A)
+ \tkzDrawEllipse[red](C,\tkzUseLua{a},\tkzUseLua{b},
+ \tkzUseLua{slope})
+ \tkzDrawPoints(C,A,B,b,W,S,F1,F2)
+ \tkzLabelPoints(C,A,B)
+ \tkzDrawLine[add = .5 and .5](A,W)
+ \tkzLabelSegment[pos=1.5,above,sloped](A,W){%
+ slope = \pgfmathprintnumber{\tkzUseLua{slope}}}
+ \tkzLabelPoint[below](S){South}
+ \tkzLabelPoint[below left](F1){Focus 1}
+ \tkzLabelPoint[below left](F2){Focus 2}
+ \tkzLabelPoint[above right](Ve){Vertex ; East}
+ \tkzLabelPoint[above right](Co){Covertex ; North}
+ \end{tikzpicture}
+ \end{verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+ \begin{tkzelements}
+ z.C = point: new (3 , 2)
+ z.A = point: new (5 , 1)
+ L.CA = line : new (z.C,z.A)
+ z.b = L.CA.north_pa
+ L = line : new (z.C,z.b)
+ z.B = L : point (0.5)
+ E = ellipse: new (z.C,z.A,z.B)
+ a = E.Rx
+ b = E.Ry
+ z.F1 = E.Fa
+ z.F2 = E.Fb
+ slope = math.deg(E.slope)
+ z.E = E.east
+ z.N = E.north
+ z.W = E.west
+ z.S = E.south
+ z.Co = E.covertex
+ z.Ve = E.vertex
+ \end{tkzelements}
+ \hspace*{\fill}
+ \begin{tikzpicture}
\pgfkeys{/pgf/number format/.cd,fixed,precision=2}
\tkzGetNodes
\tkzDrawCircles[teal](C,A)
- \tkzDrawEllipse[red](C,\tkzUseLua{a},\tkzUseLua{b},
- \tkzUseLua{slope})
+ \tkzDrawEllipse[red](C,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{slope})
\tkzDrawPoints(C,A,B,b,W,S,F1,F2)
\tkzLabelPoints(C,A,B)
\tkzDrawLine[add = .5 and .5](A,W)
- \tkzLabelSegment[pos=1.5,above,sloped](A,W){%
- slope = \pgfmathprintnumber{\tkzUseLua{slope}}}
+ \tkzLabelSegment[pos=1.25,above,sloped](A,W){slope = \pgfmathprintnumber{\tkzUseLua{slope}}}
\tkzLabelPoint[below](S){South}
\tkzLabelPoint[below left](F1){Focus 1}
\tkzLabelPoint[below left](F2){Focus 2}
\tkzLabelPoint[above right](Ve){Vertex ; East}
\tkzLabelPoint[above right](Co){Covertex ; North}
-\end{tikzpicture}
-\end{tkzexample}
-
-\begin{tkzelements}
-z.C = point: new (3 , 2)
-z.A = point: new (5 , 1)
-L.CA = line : new (z.C,z.A)
-z.b = L.CA.north_pa
-L = line : new (z.C,z.b)
-z.B = L : point (0.5)
-E = ellipse: new (z.C,z.A,z.B)
-a = E.Rx
-b = E.Ry
-z.F1 = E.Fa
-z.F2 = E.Fb
-slope = math.deg(E.slope)
-z.E = E.east
-z.N = E.north
-z.W = E.west
-z.S = E.south
-z.Co = E.covertex
-z.Ve = E.vertex
-\end{tkzelements}
-
-\hspace*{\fill}
-\begin{tikzpicture}
-\pgfkeys{/pgf/number format/.cd,fixed,precision=2}
-\tkzGetNodes
-\tkzDrawCircles[teal](C,A)
-\tkzDrawEllipse[red](C,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{slope})
-\tkzDrawPoints(C,A,B,b,W,S,F1,F2)
-\tkzLabelPoints(C,A,B)
-\tkzDrawLine[add = .5 and .5](A,W)
-\tkzLabelSegment[pos=1.5,above,sloped](A,W){slope = \pgfmathprintnumber{\tkzUseLua{slope}}}
-\tkzLabelPoint[below](S){South}
-\tkzLabelPoint[below left](F1){Focus 1}
-\tkzLabelPoint[below left](F2){Focus 2}
-\tkzLabelPoint[above right](Ve){Vertex ; East}
-\tkzLabelPoint[above right](Co){Covertex ; North}
-\end{tikzpicture}
-\hspace*{\fill}
+ \end{tikzpicture}
+\end{minipage}
% \caption{Class Ellipse}
% subsection attributes_of_an_ellipse (end)
@@ -128,7 +129,7 @@ To do this, you'll need to use a \pkg{tkz-elements }function: \Igfct{package}{se
\bgroup
\catcode`_=12
\small
-\captionof{table}{Ellipse methods.}
+\captionof{table}{Ellipse methods.}\label{ellipse:met}
\begin{tabular}{ll}
\toprule
\textbf{Methods} & \textbf{Example} \\
@@ -193,7 +194,7 @@ slope = math.deg(E.slope)
\end{tikzpicture}
\end{minipage}
-The function \Igfct{package}{set\_lua\_to\_tex (list)} is used to define the macros that will be used to draw the ellipse with \TIKZ\ or \pkg{tkz-euclide}.
+The function \Igfct{package}{tkzUseLua (variable)} is used to transfer values to \TIKZ\ or \pkg{tkz-euclide}.
% subsubsection method_imeth_ellipse_new (end)
@@ -203,7 +204,8 @@ The first two points are the foci of the ellipse. The third one is the vertex. W
\emph{The function launches the |new| method, all the characteristics of the ellipse are defined.}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{minipage}{0.6\textwidth}
+\begin{verbatim}
\begin{tkzelements}
z.A = point: new (0 , 0)
z.B = point: new (5 , 1)
@@ -227,9 +229,6 @@ The first two points are the foci of the ellipse. The third one is the vertex. W
a,b = E.Rx,E.Ry
ang = math.deg(E.slope)
\end{tkzelements}
-\end{tkzexample}
-\begin{minipage}{0.6\textwidth}
- \begin{tkzexample}[latex=0cm,small,code only]
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawPolygon(A,B,C)
@@ -245,7 +244,7 @@ The first two points are the foci of the ellipse. The third one is the vertex. W
\tkzLabelPoints[left](A)
\tkzLabelPoints[right](B,I,S,H)
\end{tikzpicture}
-\end{tkzexample}
+\end{verbatim}
\end{minipage}
\begin{minipage}{0.4\textwidth}
\begin{tkzelements}
@@ -290,7 +289,7 @@ The first two points are the foci of the ellipse. The third one is the vertex. W
% subsubsection function_tkzname_ellipse__foci (end)
\subsubsection{Method \Imeth{ellipse}{point} and \Imeth{ellipse}{radii}} % (fold)
-\label{ssub:method_point}
+\label{ssub:ellipse_method_point}
The method \Imeth{ellipse}{point} defines a point $M$ of the ellipse whose coordinates are $(a\times cos(phi), b\times sin(phi))$. |phi| angle between (center,vertex) and (center,M)
\emph{The environment \tkzNameEnv{tkzelements} uses as \tkzname{lua} the radian as unit for angles. }
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)
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-misc.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-misc.tex
index 017e3ae2d4..d0867da269 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-misc.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-misc.tex
@@ -5,7 +5,7 @@
\bgroup
\catcode`_=12
\small
-\captionof{table}{Math constants and functions.}
+\captionof{table}{Math constants and functions.}\label{misc}
\begin{tabular}{ll}
\toprule
\textbf{contants or functions} & \textbf{Comments}\\
@@ -17,21 +17,31 @@
%tkzround( num, idp ) & \\
% Cramer33(a1,a2,a3,b1,b2,b3,c1,c2,c3) & \\
% Cramer22(a1,a2,b1,b2) & \\
+\Igfct{math}{length (a,b) } & point.abs(a-b) See (\ref{ssub:report_de_distance}) \\
\Igfct{math}{islinear (z1,z2,z3) } & Are the points aligned? (z2-z1) $\parallel$ (z3-z1) ? \\
\Igfct{math}{isortho (z1,z2,z3)} & (z2-z1) $\perp$ (z3-z1) ? boolean\\
+\Igfct{math}{get\_angle (z1,z2,z3)} & the vertex is z1 See (\ref{sub:get_angle}) \\
+\Igfct{math}{bisector (z1,z2,z3)} & L.Aa = bisector (z.A,z.B,z.C) from A (\ref{sub:get_angle})\\
+\Igfct{math}{bisector\_ext (z1,z2,z3)} & L.Aa = bisector_ext (z.A,z.B,z.C) from A \\
+\Igfct{math}{altitude (z1,z2,z3)} & altitude from z1 \\
\Igfct{package}{set\_lua\_to\_tex (list)} & set\_lua\_to\_tex('a','n') defines |\a| and |\n| \\
\Igfct{package}{tkzUseLua (variable)} & |\textbackslash\tkzUseLua{a}| prints the value of a\\
%parabola (a,b,c) & to get \\
\Igfct{math}{value (v) } & apply |scale * value | \\
\Igfct{math}{real (v) } & apply | value /scale | \\
-\Igfct{math}{angle\_normalize (a) } & to get a value between 0 and $2\pi$ \\
-\Igfct{misc}{radical\_center (C1,C2,C3)} & see \ref{sub:radical_center} \\
-\Igfct{misc}{radical\_circle (C1,C2,C3)} & see \ref{sub:radical_circle} \\
+\Igfct{math}{angle\_normalize (an) } & to get a value between 0 and $2\pi$ \\
\Igfct{misc}{barycenter (\{z1,n1\},\{z2,n2\}, ...)} & barycenter of list of points \\
\bottomrule
\end{tabular}
\egroup
+\subsection{Length of a segment} % (fold)
+\label{sub:length_of_a_segment}
+|length(z.A,z.B)| is a shortcut for |point.abs(z.A-z.B)|. This avoids the need to use complexes.
+
+% subsection length_of_a_segment (end)
+
+
\subsection{Harmonic division with tkzphi } % (fold)
\label{sub:harmonic_division_with_tkzphi}
\begin{tkzexample}[latex=0cm,small,code only]
@@ -111,7 +121,7 @@
% subsection function_islinear (end)
-\subsection{Function \tkzfname{value} }% (fold)
+\subsection{Function value }% (fold)
\label{sub:function_value}
value to apply scaling if necessary
@@ -120,7 +130,7 @@ If |scale = 1.2| with a = value(5) the actual value of |a| will be $5\times 1.2
% subsubsection function_value (end)
-\subsubsection{Function \tkzfname{real} }% (fold)
+\subsubsection{Function real }% (fold)
\label{ssub:function_real}
If |scale = 1.2| with a = 6 then real(a) = $6 / 1.2 = 5$ .
@@ -135,44 +145,44 @@ It's possible to transfer variable from Lua to \TEX{} with
\begin{minipage}{.5\textwidth}
- \begin{verbatim}
- \begin{tkzelements}
- z.A = point : new (0 , 0)
- z.B = point : new (4 , 3)
- z.C = point : new (2 , 5)
- L.AB = line : new (z.A,z.B)
- d = L.AB : distance (z.C)
- l = L.AB.length
- z.H = L.AB : projection (z.C)
- \end{tkzelements}
- % possible here \tkzUseLua{L.AB.length}
- \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}$}
- \tkzLabelSegment[below left,draw](C,H){$AB = \tkzUseLua{l}$}
- \end{tikzpicture}
- \end{verbatim}
+\begin{verbatim}
+\begin{tkzelements}
+ z.A = point : new (0 , 0)
+ z.B = point : new (3 , 2)
+ z.C = point : new (2 , 5)
+ L.AB = line : new (z.A,z.B)
+ d = L.AB : distance (z.C)
+ l = L.AB.length
+ 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 right,draw](C,H){$CH = \tkzUseLua{d}$}
+\tkzLabelSegment[below right,draw](A,B){$AB = \tkzUseLua{l}$}
+\end{tikzpicture}
+\end{verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
z.A = point : new (0 , 0)
- z.B = point : new (4 , 3)
+ z.B = point : new (3 , 2)
z.C = point : new (2 , 5)
L.AB = line : new (z.A,z.B)
d = L.AB : distance (z.C)
l = L.AB.length
z.H = L.AB : projection (z.C)
\end{tkzelements}
+ \hspace*{\fill}
\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}$}
-\tkzLabelSegment[below left,draw](C,H){$AB = \tkzUseLua{l}$}
+\tkzLabelSegment[above right,draw](C,H){$CH = \tkzUseLua{d}$}
+\tkzLabelSegment[below right,draw](A,B){$AB = \tkzUseLua{l}$}
\end{tikzpicture}
\end{minipage}
% subsection transfer_from_lua_to_tex (end)
@@ -280,7 +290,6 @@ The function |get_angle (a,b,c)| gives the angle normalized of $(\overrightarro
\end{tikzpicture}
\hspace*{\fill}
\end{minipage}
-
% subsection get_angle (end)
\subsection{Dot or scalar product} % (fold)
@@ -343,59 +352,71 @@ With the functions |islinear| and |isortho|. |islinear(z.a,z.b,z.c)| gives |true
|isortho(z.a,z.b,z.c)| gives |true| if the line $(ab)$ is orthogonal to the line $(ac)$.
% subsection alignment_or_orthogonality (end)
+\subsection{Bisector and altitude} % (fold)
+\label{sub:bisector_and_altitude}
+These functions are useful if you don't need to create a useful triangle object for the rest of your code.
+
+\begin{minipage}{.5\textwidth}
+ \begin{verbatim}
+\begin{tkzelements}
+ z.a = point: new (0, 0)
+ z.b = point: new (5, -2)
+ z.c = point: new (2, 3)
+ z.i = bisector (z.a,z.c,z.b).pb
+ z.h = altitude (z.b,z.a,z.c).pb
+ angic = tkzround ( get_angle (z.a,z.i,z.c),2)
+ angci = tkzround ( get_angle (z.a,z.b,z.i),2)
+ z.e = bisector_ext (z.a,z.b,z.c).pb
+\end{tkzelements}
+
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawPolygon(a,b,c)
+ \tkzDrawSegments(a,i b,h a,e)
+ \tkzDrawPoints(a,b,c,i,h)
+ \tkzLabelPoints(a,b)
+ \tkzLabelPoints[above](c,i,h)
+ \tkzMarkAngle[->](i,a,c)
+ \tkzLabelAngle[font=\tiny,pos=.75](i,a,c){\tkzUseLua{angci}}
+ \tkzMarkAngle[<-](b,a,i)
+ \tkzLabelAngle[font=\tiny,pos=.75](b,a,i){\tkzUseLua{angic}}
+\end{tikzpicture}
+ \end{verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+\begin{tkzelements}
+ z.a = point: new (0, 0)
+ z.b = point: new (5, -2)
+ z.c = point: new (2, 3)
+ z.i = bisector (z.a,z.c,z.b).pb
+ z.h = altitude (z.b,z.a,z.c).pb
+ angic = tkzround ( get_angle (z.a,z.i,z.c),2)
+ angci = tkzround ( get_angle (z.a,z.b,z.i),2)
+ z.e = bisector_ext (z.a,z.b,z.c).pb
+\end{tkzelements}
+\hspace{\fill}
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawPolygon(a,b,c)
+ \tkzDrawSegments(a,i b,h a,e)
+ \tkzDrawPoints(a,b,c,i,h)
+ \tkzLabelPoints(a,b)
+ \tkzLabelPoints[above](c,i,h)
+ \tkzMarkAngle[->](i,a,c)
+ \tkzLabelAngle[font=\tiny,pos=.75](i,a,c){\tkzUseLua{angci}}
+ \tkzMarkAngle[<-](b,a,i)
+ \tkzLabelAngle[font=\tiny,pos=.75](b,a,i){\tkzUseLua{angic}}
+\end{tikzpicture}
+\end{minipage}
+% subsection bisector_and_altitude (end)
+
\subsection{Other functions} % (fold)
\label{sub:other_functions}
Not documented because still in beta version: |parabola|, |Cramer22|, |Cramer33|.
% subsection other_functions (end)
-
% section math_functions (end)
-% % section classes_and_objects (end)
-\endinput
-
-
+\endinput
-% \bgroup
-% \catcode`_=12
-% \begin{table}[H]
-% \small
-% \begin{center}
-% \caption{functions\_polygons.lua }
-% \begin{tabular}{lll}
-% \toprule
-% \textbf{Functions} & \textbf{Comments}\\
-% \midrule
-% function square (a,b) \\
-% function parallelogram (a,b,c) \\
-% \bottomrule
-% \end{tabular}
-% \end{center}
-% \end{table}
-% \egroup
-
-
-% \bgroup
-% \catcode`_=12
-% \begin{table}[H]
-% \small
-% \begin{center}
-% \caption{elements\_vectors.lua }
-% \begin{tabular}{lll}
-% \toprule
-% \textbf{Methods} & \textbf{Comments}\\
-% \midrule
-% vector = {} class vector \\
-% \Imeth{vector}{function vector: new (z1,z2)} & st, ed \\
-% \Imeth{vector}{function vector: normalize ()} &\\
-% \bottomrule
-% \end{tabular}
-% \end{center}
-% \end{table}
-% \egroup
-
-
-
-
-\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-parallelogram.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-parallelogram.tex
index 2b4a165a28..e818cdece0 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-parallelogram.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-parallelogram.tex
@@ -14,7 +14,7 @@ Creation | P.new = parallelogram : new (z.A,z.B,z.C,z.D)|
\bgroup
\catcode`_=12
\small
-\captionof{table}{Parallelogram attributes.}
+\captionof{table}{Parallelogram attributes.}\label{parallelogram:att}
\begin{tabular}{lll}
\toprule
\textbf{Attributes} & \textbf{Application} & \\
@@ -93,7 +93,7 @@ z.I = P.new.center
\bgroup
\catcode`_=12
\small
-\captionof{table}{Parallelogram methods.}
+\captionof{table}{Parallelogram methods.}\label{parallelogram:met}
\begin{tabular}{ll}
\toprule
\textbf{Methods} & \textbf{Comments} \\
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
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-quadrilateral.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-quadrilateral.tex
index 2171337792..8b777de57b 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-quadrilateral.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-quadrilateral.tex
@@ -13,7 +13,7 @@ Creation | Q.new = rectangle : new (z.A,z.B,z.C,z.D)|
\bgroup
\catcode`_=12
\small
-\captionof{table}{rectangle attributes.}
+\captionof{table}{rectangle attributes.}\label{quadrilateral:att}
\begin{tabular}{lll}
\toprule
\textbf{Attributes} & \textbf{Application} & \\
@@ -88,7 +88,7 @@ z.G = Q.ABCD.g
\bgroup
\catcode`_=12
\small
-\captionof{table}{Quadrilateral methods.}
+\captionof{table}{Quadrilateral methods.}\label{quadrilateral:met}
\begin{tabular}{ll}
\toprule
\textbf{Methods} & \textbf{Comments} \\
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-rectangle.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-rectangle.tex
index 418278a99f..8b591cc61e 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-rectangle.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-rectangle.tex
@@ -14,7 +14,7 @@ Creation | R.ABCD = rectangle : new (z.A,z.B,z.C,z.D)|
\bgroup
\catcode`_=12
\small
-\captionof{table}{rectangle attributes.}
+\captionof{table}{rectangle attributes.}\label{rectangle:att}
\begin{tabular}{lll}
\toprule
\textbf{Attributes} & \textbf{Application} & \\
@@ -95,7 +95,7 @@ z.I = R.new.center
\bgroup
\catcode`_=12
\small
-\captionof{table}{Rectangle methods.}
+\captionof{table}{Rectangle methods.}\label{rectangle:met}
\begin{tabular}{lll}
\toprule
\textbf{Methods} & \textbf{Comments} & \\
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-regular.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-regular.tex
index 4a25afdfe5..6460af030d 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-regular.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-regular.tex
@@ -11,20 +11,20 @@ Creation | RP.IA = regular_polygon : new (z.I,z.A,6)|
\bgroup
\catcode`_=12
\small
-\captionof{table}{Regular\_polygon attributes.}
+\captionof{table}{Regular\_polygon attributes.}\label{regular:att}
\begin{tabular}{ll}
\toprule
-\textbf{Attributes} & \textbf{Application} \\
-\Iattr{square}{center} & |z.I = RP.IA.center| \\
-\Iattr{square}{table} & array containing all vertex affixes \\
-\Iattr{square}{through} & first vertex \\
-\Iattr{square}{circle} & defines the circle with center I passing through A \\
-\Iattr{square}{type} & |RP.IA.type= 'regular\_polygon'| \\
-\Iattr{square}{side} & |s = RP.IA.side| ; s = length of side\\
-\Iattr{square}{exradius}& |S.AB.exradius| ; radius of the circumscribed circle \\
-\Iattr{square}{inradius}& |S.AB.inxradius| ; radius of the inscribed circle \\
-\Iattr{square}{proj} & |RP.IA.proj| ; projection of the center on one side \\
-\Iattr{square}{angle} & |RP.IA.angle| ; angle formed by the center and 2 consecutive vertices \\
+\textbf{Attributes} & \textbf{Application} \\
+\Iattr{regular}{center} & |z.I = RP.IA.center| \\
+\Iattr{regular}{table} & array containing all vertex affixes \\
+\Iattr{regular}{through} & first vertex \\
+\Iattr{regular}{circle} & defines the circle with center I passing through A \\
+\Iattr{regular}{type} & |RP.IA.type= 'regular\_polygon'| \\
+\Iattr{regular}{side} & |s = RP.IA.side| ; s = length of side\\
+\Iattr{regular}{exradius}& |S.AB.exradius| ; radius of the circumscribed circle \\
+\Iattr{regular}{inradius}& |S.AB.inxradius| ; radius of the inscribed circle \\
+\Iattr{regular}{proj} & |RP.IA.proj| ; projection of the center on one side \\
+\Iattr{regular}{angle} & |RP.IA.angle| ; angle formed by the center and 2 consecutive vertices \\
\bottomrule %
\end{tabular}
\egroup
@@ -81,7 +81,7 @@ z.H = RP.five.proj
\bgroup
\catcode`_=12
\small
-\captionof{table}{Circle methods.}
+\captionof{table}{Circle methods.}\label{regular:met}
\begin{tabular}{ll}
\toprule
\textbf{Methods} & \textbf{Comments} \\
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-square.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-square.tex
index 15996c203f..fae6d71b2b 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-square.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-square.tex
@@ -13,7 +13,7 @@ Creation | S.AB = square : new (z.A,z.B,z.C,z.D)|
\bgroup
\catcode`_=12
\small
-\captionof{table}{Square attributes.}
+\captionof{table}{Square attributes.}\label{square:att}
\begin{tabular}{lll}
\toprule
\textbf{Attributes} & \textbf{Application} & \\
@@ -98,7 +98,7 @@ z.H = S.new.proj
\bgroup
\catcode`_=12
\small
-\captionof{table}{Square methods.}
+\captionof{table}{Square methods.}\label{square:met}
\begin{tabular}{lll}
\toprule
\textbf{Methods} & \textbf{Comments}& \\
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-triangle.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-triangle.tex
index 9c6e822704..a65899c0ef 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-triangle.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-triangle.tex
@@ -13,7 +13,7 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp
\bgroup
\catcode`_=12
\small
-\captionof{table}{Triangle attributes.}
+\captionof{table}{Triangle attributes.}\label{triangle:att}
\begin{tabular}{ll}
\toprule
\textbf{Attributes} & \textbf{Application}\\
@@ -114,7 +114,7 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp
\catcode`_=12
\small
\begin{minipage}{\textwidth}
-\captionof{table}{triangle methods.}
+\captionof{table}{triangle methods.}\label{triangle:met}
\begin{tabular}{ll}
\toprule
\textbf{Methods} & \textbf{Comments} \\
@@ -154,6 +154,10 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp
\end{minipage}
\egroup
+Remark: If you don't need to use the triangle object several times, you can obtain a bisector or a altitude with the next functions
+
+|bisector (z.A,z.B,z.C)| and |altitude (z.A,z.B,z.C)| See (\ref{misc})
+
\clearpage\newpage
\bgroup
\catcode`_=12
@@ -210,6 +214,7 @@ Through the Lemoine point draw lines parallel to the triangle's sides. The point
\subsubsection{Euler line} % (fold)
\label{ssub:euler_line}
+\begin{minipage}{.5\textwidth}
\begin{tkzexample}[latex=0cm,small,code only]
\begin{tkzelements}
z.A = point: new (0 , 0)
@@ -229,16 +234,16 @@ Through the Lemoine point draw lines parallel to the triangle's sides. The point
\tkzDrawCircle[red](N,I)
\tkzDrawCircles[teal](O,A)
\tkzDrawSegments(A,P B,Q C,R)
- \tkzDrawSegments[red](A,I B,J C,K)
+ \tkzDrawSegments[red](A,I B,J C,K)\include{TKZdoc-elements-classes-triangle.tex}
\tkzDrawPolygons(A,B,C)
\tkzDrawPoints(A,B,C,N,I,J,K,O,P,Q,R,H,G)
\tkzLabelPoints(A,B,C,I,J,K,P,Q,R,H)
\tkzLabelPoints[below](N,O,G)
\end{tikzpicture}
\end{tkzexample}
-
+\end{minipage}
+\begin{minipage}{.5\textwidth}
\begin{tkzelements}
- scale =1
z.A = point: new (0 , 0)
z.B = point: new (6 , 0)
z.C = point: new (1.5 , 3.5)
@@ -250,7 +255,6 @@ Through the Lemoine point draw lines parallel to the triangle's sides. The point
z.P,z.Q,z.R = get_points (T.ABC: orthic())
z.K,z.I,z.J = get_points (T.ABC: medial ())
\end{tkzelements}
-
\hspace*{\fill}
\begin{tikzpicture}
\tkzGetNodes
@@ -264,54 +268,41 @@ Through the Lemoine point draw lines parallel to the triangle's sides. The point
\tkzLabelPoints(A,B,C,I,J,K,P,Q,R)
\tkzLabelPoints[below](N,O,G,H)
\end{tikzpicture}
-\hspace*{\fill}
+\end{minipage}
+
%\caption{Euler line}
% subsubsection euler_line (end)
\subsection{Harmonic division and bisector} % (fold)
\label{sub:harmonic_division_and_bisector}
-\begin{tkzexample}[small,code only]
-\begin{tkzelements}
- scale = .75
- z.A = point: new (0 , 0)
- z.B = point: new (6 , 0)
- z.M = point: new (5 , 4)
- T.AMB = triangle : new (z.A,z.M,z.B)
- L.AB = T.AMB.ca
- L.bis = T.AMB : bisector (1)
- z.C = L.bis.pb
- L.bisext = T.AMB : bisector_ext (1)
- z.D = intersection (L.bisext,L.AB)
- L.CD = line: new (z.C,z.D)
- z.O = L.CD.mid
- L.AM = line: new (z.A,z.M)
- L.LL = L.AM : ll_from (z.B)
- L.MC = line: new (z.M,z.C)
- L.MD = line: new (z.M,z.D)
- z.E = intersection (L.LL,L.MC)
- z.F = intersection (L.LL,L.MD)
-\end{tkzelements}
-\begin{tikzpicture}
- \tkzGetNodes
- \tkzDrawPolygon(A,B,M)
- \tkzDrawCircle[purple](O,C)
- \tkzDrawSegments[purple](M,E M,D E,F)
- \tkzDrawSegments(D,B)
- \tkzDrawPoints(A,B,M,C,D,E,F)
- \tkzLabelPoints[below right](A,B,C,D,E)
- \tkzLabelPoints[above](M,F)
- \tkzFillAngles[opacity=.4,cyan!20](A,M,B B,E,M)
- \tkzFillAngles[opacity=.4,purple!20](B,M,F M,F,B)
- \tkzMarkRightAngle[opacity=.4,fill=gray!20](C,M,D)
- \tkzMarkAngles[mark=||](A,M,E E,M,B B,E,M)
- \tkzMarkAngles[mark=|](B,M,F M,F,B)
- \tkzMarkSegments(B,E B,M B,F)
-\end{tikzpicture}
-\end{tkzexample}
-
+\begin{minipage}{.4\textwidth}
+ \begin{verbatim}
+ \begin{tkzelements}
+ scale = .4
+ z.A = point: new (0 , 0)
+ z.B = point: new (6 , 0)
+ z.M = point: new (5 , 4)
+ T.AMB = triangle : new (z.A,z.M,z.B)
+ L.AB = T.AMB.ca
+ L.bis = T.AMB : bisector (1)
+ z.C = L.bis.pb
+ L.bisext = T.AMB : bisector_ext (1)
+ z.D = intersection (L.bisext,L.AB)
+ L.CD = line: new (z.C,z.D)
+ z.O = L.CD.mid
+ L.AM = line: new (z.A,z.M)
+ L.LL = L.AM : ll_from (z.B)
+ L.MC = line: new (z.M,z.C)
+ L.MD = line: new (z.M,z.D)
+ z.E = intersection (L.LL,L.MC)
+ z.F = intersection (L.LL,L.MD)
+ \end{tkzelements}
+ \end{verbatim}
+\end{minipage}
+\begin{minipage}{.6\textwidth}
\begin{tkzelements}
- scale =.75
+ scale =.4
z.A = point: new (0 , 0)
z.B = point: new (6 , 0)
z.M = point: new (5 , 4)
@@ -330,9 +321,7 @@ Through the Lemoine point draw lines parallel to the triangle's sides. The point
z.E = intersection (L.LL,L.MC)
z.F = intersection (L.LL,L.MD)
\end{tkzelements}
-
-
-\hspace*{\fill}
+\hspace{\fill}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawPolygon(A,B,M)
@@ -349,7 +338,28 @@ Through the Lemoine point draw lines parallel to the triangle's sides. The point
\tkzMarkAngles[mark=|](B,M,F M,F,B)
\tkzMarkSegments(B,E B,M B,F)
\end{tikzpicture}
-\hspace*{\fill}
+\end{minipage}
+
+\begin{verbatim}
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawPolygon(A,B,M)
+ \tkzDrawCircle[purple](O,C)
+ \tkzDrawSegments[purple](M,E M,D E,F)
+ \tkzDrawSegments(D,B)
+ \tkzDrawPoints(A,B,M,C,D,E,F)
+ \tkzLabelPoints[below right](A,B,C,D,E)
+ \tkzLabelPoints[above](M,F)
+ \tkzFillAngles[opacity=.4,cyan!20](A,M,B B,E,M)
+ \tkzFillAngles[opacity=.4,purple!20](B,M,F M,F,B)
+ \tkzMarkRightAngle[opacity=.4,fill=gray!20](C,M,D)
+ \tkzMarkAngles[mark=||](A,M,E E,M,B B,E,M)
+ \tkzMarkAngles[mark=|](B,M,F M,F,B)
+ \tkzMarkSegments(B,E B,M B,F)
+\end{tikzpicture}
+\end{verbatim}
+
+
% subsection harmonic_division_and_bisector (end)
% subsection methods_of_the_class_triangle (end)
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes.tex
index e993ce9abe..5e4376b879 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes.tex
@@ -49,7 +49,6 @@ Example: The point object is used to vertically determine a new point object l
\end{tkzelements}
\end{verbatim}
-
\begin{tkzelements}
z.A = point (1,0)
z.B = z.A : north (2)
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-examples.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-examples.tex
index baaebd5d71..9e79877299 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-examples.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-examples.tex
@@ -321,10 +321,8 @@ scale=.75
\tkzMarkRightAngle[opacity=.4,fill=gray!20](C,M,D)
\end{tikzpicture}
\hspace*{\fill}
+% subsection apollonius_and_circle_circumscribed (end)
-
-%subsection apollonius_and_circle_circumscribed (end)
-%
\subsection{Apollonius circles in a triangle} % (fold)
\label{sub:apollonius_circles}
@@ -415,6 +413,26 @@ z.O3 = L.Bpt.mid
\tkzDrawLine(O1,O2)
\end{tikzpicture}
\hspace*{\fill}
+
+Same result using the function |T.ABC.ab : apollonius (k) |
+
+\begin{verbatim}
+ \begin{tkzelements}
+ scale = .75
+ z.A = point: new (0 , 0)
+ z.B = point: new (6 , 0)
+ z.C = point: new (4.5 , 1)
+ T.ABC = triangle : new (z.A,z.B,z.C)
+ z.O = T.ABC.circumcenter
+ C.AB = T.ABC.ab : apollonius (length(z.C,z.A)/length(z.C,z.B))
+ z.w1,z.t1 = get_points ( C.AB )
+ C.AC = T.ABC.ca : apollonius (length(z.B,z.C)/length(z.B,z.A))
+ z.w2,z.t2 = get_points ( C.AC )
+ C.AC = T.ABC.bc : apollonius (length(z.A,z.B)/length(z.A,z.C))
+ z.w3,z.t3 = get_points ( C.AC )
+ \end{tkzelements}
+\end{verbatim}
+
% subsection apollonius_circles (end)
\subsection{Archimedes} % (fold)
@@ -471,8 +489,9 @@ z.O3 = L.Bpt.mid
\tkzLabelPoints(A,O_1,O_2,E,F,C,D)
\end{tikzpicture}
\end{minipage}
-%\subsection{Bankoff circle} % (fold)
+% subsection archimedes (end)
+\subsection{Bankoff circle} % (fold)
\label{sub:bankoff_circle}
\begin{tkzexample}[small,code only]
\begin{tkzelements}
@@ -1722,32 +1741,33 @@ z.H = L.XY : projection (z.M)
\begin{tkzexample}[latex=0cm,small,code only]
\begin{tkzelements}
- z.O = point : new (-1,0)
- z.Op = point : new (4,-1)
- z.B = point : new (0,2)
- z.D = point : new (4,0)
- C.OB = circle : new (z.O,z.B)
- C.OpD = circle : new (z.Op,z.D)
- L.EF = C.OB : radical_axis (C.OpD)
- z.E,z.F = get_points (L.EF)
- z.M = L.EF : point (2)
- L.MT,L.MTp = C.OB : tangent_from (z.M)
- _,z.T = get_points (L.MT)
- _,z.Tp = get_points (L.MTp)
- L.MK,L.MKp = C.OpD : tangent_from (z.M)
- _,z.K = get_points (L.MK)
- _,z.Kp = get_points (L.MKp)
+scale = 1.25
+z.O = point : new (-1,0)
+z.Op = point : new (4,-1)
+z.B = point : new (0,2)
+z.D = point : new (4,0)
+C.OB = circle : new (z.O,z.B)
+C.OpD = circle : new (z.Op,z.D)
+L.EF = C.OB : radical_axis (C.OpD)
+z.E,z.F = get_points (L.EF)
+z.M = L.EF : point (.75)
+L.MT,L.MTp = C.OB : tangent_from (z.M)
+_,z.T = get_points (L.MT)
+_,z.Tp = get_points (L.MTp)
+L.MK,L.MKp = C.OpD : tangent_from (z.M)
+_,z.K = get_points (L.MK)
+_,z.Kp = get_points (L.MKp)
\end{tkzelements}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawCircles(O,B O',D)
- \tkzDrawLine[add=1 and 2](E,F)
+ \tkzDrawLine(E,F)
\tkzDrawLine[add=.5 and .5](O,O')
- \tkzDrawSegments(M,T M,T' M,K M,K')
+ \tkzDrawLines[add = 0 and .5](M,T M,T' M,K M,K')
\tkzDrawCircle(M,T)
\tkzDrawPoints(O,O',T,M,T',K,K')
\tkzLabelPoints(O,O',T,T',K,K',M)
- \end{tikzpicture}
+\end{tikzpicture}
\end{tkzexample}
\begin{tkzelements}
@@ -1760,7 +1780,7 @@ C.OB = circle : new (z.O,z.B)
C.OpD = circle : new (z.Op,z.D)
L.EF = C.OB : radical_axis (C.OpD)
z.E,z.F = get_points (L.EF)
-z.M = L.EF : point (2)
+z.M = L.EF : point (.75)
L.MT,L.MTp = C.OB : tangent_from (z.M)
_,z.T = get_points (L.MT)
_,z.Tp = get_points (L.MTp)
@@ -1768,43 +1788,43 @@ L.MK,L.MKp = C.OpD : tangent_from (z.M)
_,z.K = get_points (L.MK)
_,z.Kp = get_points (L.MKp)
\end{tkzelements}
-
\hspace*{\fill}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawCircles(O,B O',D)
-\tkzDrawLine[add=1 and 2](E,F)
+\tkzDrawLine(E,F)
\tkzDrawLine[add=.5 and .5](O,O')
-\tkzDrawSegments(M,T M,T' M,K M,K')
+\tkzDrawLines[add = 0 and .5](M,T M,T' M,K M,K')
\tkzDrawCircle(M,T)
\tkzDrawPoints(O,O',T,M,T',K,K')
\tkzLabelPoints(O,O',T,T',K,K',M)
-\end{tikzpicture}\hspace*{\fill}
+\end{tikzpicture}
+\hspace*{\fill}
% subsection radical_axis_v2 (end)
\subsection{Radical axis v3} % (fold)
\label{sub:radical_axis_v3}
\begin{tkzexample}[latex=0cm,small,code only]
-\begin{tkzelements}
- z.O = point : new (0,0)
- z.B = point : new (4,0)
- z.Op = point : new (6,0)
- C.OB = circle : new (z.O,z.B)
- C.OpB = circle : new (z.Op,z.B)
- L.EF = C.OB : radical_axis (C.OpB)
- z.E,z.F = get_points(L.EF)
- z.M = L.EF : point (2)
- _,L = C.OB : tangent_from (z.M)
- _,z.T = get_points (L)
- L,_ = C.OpB : tangent_from (z.M)
- _,z.Tp = get_points (L)
+ \begin{tkzelements}
+ z.O = point : new (0,0)
+ z.B = point : new (4,0)
+ z.Op = point : new (6,0)
+ C.OB = circle : new (z.O,z.B)
+ C.OpB = circle : new (z.Op,z.B)
+ L.EF = C.OB : radical_axis (C.OpB)
+ z.E,z.F = get_points(L.EF)
+ z.M = L.EF : point (0.2)
+ L = C.OB : tangent_from (z.M)
+ _,z.T = get_points (L)
+ L = C.OpB : tangent_from (z.M)
+ _,z.Tp = get_points (L)
\end{tkzelements}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawCircles(O,B O',B)
\tkzDrawSegments(M,T M,T')
- \tkzDrawLine[add=.5 and 1](E,F)
+ \tkzDrawSegments(E,F)
\tkzDrawLine[add=.5 and .5](O,O')
\tkzDrawPoints(O,B,O',E,F,M,T,T')
\tkzLabelPoints(O,O',B,E,F,T,T')
@@ -1813,27 +1833,25 @@ _,z.Kp = get_points (L.MKp)
\end{tkzexample}
\begin{tkzelements}
-z.O = point : new (0,0)
-z.B = point : new (4,0)
-z.Op = point : new (6,0)
-C.OB = circle : new (z.O,z.B)
-C.OpB = circle : new (z.Op,z.B)
-L.EF = C.OB : radical_axis (C.OpB)
-z.E,z.F = get_points(L.EF)
-z.M = L.EF : point (2)
-_,L = C.OB : tangent_from (z.M)
-_,z.T = get_points (L)
-L,_ = C.OpB : tangent_from (z.M)
-_,z.Tp = get_points (L)
+z.O = point : new (0,0)
+z.B = point : new (4,0)
+z.Op = point : new (6,0)
+C.OB = circle : new (z.O,z.B)
+C.OpB = circle : new (z.Op,z.B)
+L.EF = C.OB : radical_axis (C.OpB)
+z.E,z.F = get_points(L.EF)
+z.M = L.EF : point (0.2)
+L = C.OB : tangent_from (z.M)
+_,z.T = get_points (L)
+L = C.OpB : tangent_from (z.M)
+_,z.Tp = get_points (L)
\end{tkzelements}
-
-
\hspace*{\fill}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawCircles(O,B O',B)
\tkzDrawSegments(M,T M,T')
-\tkzDrawLine[add=.5 and 1](E,F)
+\tkzDrawSegments(E,F)
\tkzDrawLine[add=.5 and .5](O,O')
\tkzDrawPoints(O,B,O',E,F,M,T,T')
\tkzLabelPoints(O,O',B,E,F,T,T')
@@ -1853,21 +1871,22 @@ _,z.Tp = get_points (L)
C.OpB = circle : new (z.Op,z.B)
L.EF = C.OB : radical_axis (C.OpB)
z.E,z.F = get_points(L.EF)
- z.M = L.EF : point (1.5)
- L,_ = C.OB : tangent_from (z.M)
+ z.H = L.EF.mid
+ z.M = L.EF : point (.8)
+ _,L = C.OB : tangent_from (z.M)
_,z.T = get_points (L)
- L,_ = C.OpB : tangent_from (z.M)
+ _,L = C.OpB : tangent_from (z.M)
_,z.Tp = get_points (L)
\end{tkzelements}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawCircles(O,B O',B)
\tkzDrawSegments(M,T M,T')
- \tkzDrawLine[add=1 and 1](E,F)
- \tkzDrawLine[add=.3 and .3](O,O')
- \tkzDrawPoints(O,O',B,E,F,T,T',M)
- \tkzLabelPoints[below right](O,O',B,E,F,T,T')
- \tkzDrawArc(M,T)(B)
+ \tkzDrawSegments(E,F)
+ \tkzDrawLine[add=.3 and .3](O,H)
+ \tkzDrawPoints(O,O',B,E,H,M)
+ \tkzLabelPoints[below right](O,O',E,F,M,T,T')
+ \tkzDrawArc(M,B)(T)
\end{tikzpicture}
\end{tkzexample}
@@ -1880,23 +1899,23 @@ _,z.Tp = get_points (L)
C.OpB = circle : new (z.Op,z.B)
L.EF = C.OB : radical_axis (C.OpB)
z.E,z.F = get_points(L.EF)
- z.M = L.EF : point (1.5)
- L,_ = C.OB : tangent_from (z.M)
+ z.H = L.EF.mid
+ z.M = L.EF : point (.8)
+ _,L = C.OB : tangent_from (z.M)
_,z.T = get_points (L)
- L,_ = C.OpB : tangent_from (z.M)
+ _,L = C.OpB : tangent_from (z.M)
_,z.Tp = get_points (L)
\end{tkzelements}
-
\hspace*{\fill}
\begin{tikzpicture}
-\tkzGetNodes
-\tkzDrawCircles(O,B O',B)
-\tkzDrawSegments(M,T M,T')
-\tkzDrawLine[add=1 and 1](E,F)
-\tkzDrawLine[add=.3 and .3](O,O')
-\tkzDrawPoints(O,O',B,E,F,T,T',M)
-\tkzLabelPoints[below right](O,O',B,E,F,T,T')
-\tkzDrawArc(M,T)(B)
+ \tkzGetNodes
+ \tkzDrawCircles(O,B O',B)
+ \tkzDrawSegments(M,T M,T')
+ \tkzDrawSegments(E,F)
+ \tkzDrawLine[add=.3 and .3](O,H)
+ \tkzDrawPoints(O,O',B,E,H,M)
+ \tkzLabelPoints[below right](O,O',E,F,M,T,T')
+ \tkzDrawArc(M,B)(T)
\end{tikzpicture}
\hspace*{\fill}
% subsection radical_axis_v4 (end)
@@ -1980,7 +1999,7 @@ z.H = L.OOp : projection (z.X)
z.I_b,z.Xb = get_points (C.exb)
C.exc = T.ABC : ex_circle (2)
z.I_c,z.Xc = get_points (C.exc)
- C.ortho = radical_circle (C.exa,C.exb,C.exc)
+ C.ortho = C.exa : radical_circle (C.exb,C.exc)
z.w,z.a = get_points (C.ortho)
\end{tkzelements}
\begin{tikzpicture}
@@ -2006,7 +2025,7 @@ z.H = L.OOp : projection (z.X)
z.I_b,z.Xb = get_points (C.exb)
C.exc = T.ABC : ex_circle (2)
z.I_c,z.Xc = get_points (C.exc)
- C.ortho = radical_circle (C.exa,C.exb,C.exc)
+ C.ortho = C.exa : radical_circle (C.exb,C.exc)
z.w,z.a = get_points (C.ortho)
\end{tkzelements}
@@ -2590,7 +2609,7 @@ z.M = L.OOp.mid
C.OpD = circle : new (z.Op,z.D)
z.E,z.F = get_points (C.OB : radical_axis (C.OpD))
L.EF = line : new (z.E,z.F)
- z.M = L.EF : point (2.25)
+ z.M = L.EF : point (.25)
L.T,L.Tp = C.OB : tangent_from (z.M)
L.K,L.Kp = C.OpD : tangent_from (z.M)
z.T = L.T.pb
@@ -2601,7 +2620,7 @@ z.M = L.OOp.mid
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawCircles(O,B O',D)
- \tkzDrawLine[add=1 and 2,cyan](E,F)
+ \tkzDrawLine[cyan](E,F)
\tkzDrawLines[add=.5 and .5,orange](O,O' O,T O,T')
\tkzDrawSegments[cyan](M,T M,T' M,K M,K')
\tkzDrawCircle(M,T)
@@ -2620,7 +2639,7 @@ C.OB = circle : new (z.O,z.B)
C.OpD = circle : new (z.Op,z.D)
z.E,z.F = get_points (C.OB : radical_axis (C.OpD))
L.EF = line : new (z.E,z.F)
-z.M = L.EF : point (2.25)
+z.M = L.EF : point (.25)
L.T,L.Tp = C.OB : tangent_from (z.M)
L.K,L.Kp = C.OpD : tangent_from (z.M)
z.T = L.T.pb
@@ -2633,7 +2652,7 @@ z.Kp = L.Kp.pb
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawCircles(O,B O',D)
-\tkzDrawLine[add=1 and 2,cyan](E,F)
+\tkzDrawLine[cyan](E,F)
\tkzDrawLines[add=.5 and .5,orange](O,O' O,T O,T')
\tkzDrawSegments[cyan](M,T M,T' M,K M,K')
\tkzDrawCircle(M,T)
@@ -2877,9 +2896,9 @@ z.O = L.BA.mid
C.C0A = circle : new (z.C_0,z.A)
C.C1B = circle : new (z.C_1,z.B)
L.EF = C.C0A : radical_axis (C.C1B)
- z.M_0 = L.EF : point (2)
- z.M_1 = L.EF : point (-1)
- z.M_2 = L.EF : point (-2)
+ z.M_0 = L.EF : point (.4)
+ z.M_1 = L.EF : point (.1)
+ z.M_2 = L.EF : point (.6)
C.orth0 = C.C0A : orthogonal_from (z.M_0)
C.orth1 = C.C0A : orthogonal_from (z.M_1)
C.orth2 = C.C0A : orthogonal_from (z.M_2)
@@ -2907,9 +2926,9 @@ z.O = L.BA.mid
C.C0A = circle : new (z.C_0,z.A)
C.C1B = circle : new (z.C_1,z.B)
L.EF = C.C0A : radical_axis (C.C1B)
- z.M_0 = L.EF : point (2)
- z.M_1 = L.EF : point (-1)
- z.M_2 = L.EF : point (-2)
+ z.M_0 = L.EF : point (.4)
+ z.M_1 = L.EF : point (.1)
+ z.M_2 = L.EF : point (.6)
C.orth0 = C.C0A : orthogonal_from (z.M_0)
C.orth1 = C.C0A : orthogonal_from (z.M_1)
C.orth2 = C.C0A : orthogonal_from (z.M_2)
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-indepthstudy.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-indepthstudy.tex
index c8623799ee..935c4fdeea 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-indepthstudy.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-indepthstudy.tex
@@ -703,7 +703,8 @@ You obtain a point on the object by entering a real number between 0 and 1.
\label{sub:behind_the_objects}
Before introducing objects, I only used functions whose parameters were points (comlexes).
-For example, |z.m = midpoint_ (z.a,z.b)| defines the midpoint of points $a$ and $b$. Avec les objets, il faut d'abord définir la droite/sgment |L.ab| puis on obtient le milieu avec |z.m = L.ab.mid|.
+
+For example, |z.m = midpoint_ (z.a,z.b)| defines the midpoint of points $a$ and $b$. With objects, first define the line/sgment |L.ab| and then obtain the middle with |z.m = L.ab.mid|.
I've kept the functions (which I'll call "primary") whose only arguments are points. They are distinguished from the others by a terminal underscore. In fact, all (almost) object-related functions depend on a primary function.
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-inversion.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-inversion.tex
new file mode 100644
index 0000000000..bb067244d4
--- /dev/null
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-inversion.tex
@@ -0,0 +1,4 @@
+\section{Inversion} % (fold)
+\label{sec:inversion}
+midcircless
+% section inversion (end) \ No newline at end of file
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.tex
index c4db9a8816..862be86799 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.tex
@@ -1,6 +1,6 @@
% !TEX TS-program = lualatex
% encoding : utf8
-% Documentation of tkz-elements v1.40c
+% Documentation of tkz-elements v1.82c
% Copyright 2023 Alain Matthes
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -21,10 +21,10 @@
headings = small
]{tkz-doc}
\gdef\tkznameofpack{tkz-elements}
-\gdef\tkzversionofpack{1.72c}
+\gdef\tkzversionofpack{1.82c}
\gdef\tkzdateofpack{\today}
\gdef\tkznameofdoc{tkz-elements.pdf}
-\gdef\tkzversionofdoc{1.72c}
+\gdef\tkzversionofdoc{1.82c}
\gdef\tkzdateofdoc{\today}
\gdef\tkzauthorofpack{Alain Matthes}
\gdef\tkzadressofauthor{}
@@ -97,7 +97,7 @@
\usepackage[english]{babel}
\usepackage[normalem]{ulem}
\usepackage{multirow,multido,booktabs,cellspace}
-\usepackage{shortvrb,bookmark,caption,enumitem}
+\usepackage{shortvrb,bookmark,enumitem}
\usepackage{makeidx}
\usepackage[most]{tcolorbox}
@@ -145,16 +145,15 @@ sharp corners
\newcommand*{\tkzEHand}{\textcolor{red}{\lefthand}}
%<--------------------------------------------------------------------------->
% settings styles
-\tkzSetUpColors[background=white,text=black]
-\tkzSetUpCompass[color=orange, line width=.2pt,delta=10]
-\tkzSetUpArc[color=gray,line width=.2pt]
-\tkzSetUpPoint[size=2,color=teal]
-\tkzSetUpLine[line width=.2pt,color=teal]
-\tkzSetUpStyle[color=orange,line width=.2pt]{new}
-\tikzset{every picture/.style={line width=.2pt}}
-\tikzset{label angle style/.append style={color=teal,font=\footnotesize}}
-\tikzset{label style/.append style={below,color=teal,font=\scriptsize}}
-\tikzset{new/.style={color=orange,line width=.2pt}}
+
+\tkzSetUpColors[background=white,text=darkgray]
+\tkzSetUpPoint[size=2,color=teal,fill=teal!10]
+\tkzSetUpLine[ultra thin,color=teal]
+\tkzSetUpCompass[color=orange,ultra thin,/tkzcompass/delta=10]
+\tikzset{label style/.append style={below right,color=teal,font=\scriptsize}}
+\tikzset{new/.style={color=orange,ultra thin}}
+\tikzset{step 1/.style={color=cyan,ultra thin}}
+\tikzset{step 2/.style={color=purple,ultra thin}}
\def\tkzar{\hspace{1em}-->\hspace{1em}}
\makeatletter\let\percentchar\@percentchar\makeatother
@@ -167,8 +166,11 @@ sharp corners
\let\pmpn\pgfmathprintnumber
\AtBeginDocument{\MakeShortVerb{\|}} % link to shortvrb
+
+
+
\begin{document}
-% \LuaCodeDebugOn
+\LuaCodeDebugOn
\parindent=0pt
\tkzTitleFrame{tkz-elements \tkzversionofpack\\Euclidean Geometry}
@@ -210,6 +212,7 @@ Project Public License Distributed from \href{http://www.ctan.org/}{CTAN}\ arch
\input{TKZdoc-elements-why.tex}
\input{TKZdoc-elements-presentation.tex}
\input{TKZdoc-elements-convention.tex}
+\input{TKZdoc-elements-organization.tex}
\input{TKZdoc-elements-transferts.tex}
\input{TKZdoc-elements-classes.tex}
\input{TKZdoc-elements-classes-point.tex}
@@ -229,4 +232,337 @@ Project Public License Distributed from \href{http://www.ctan.org/}{CTAN}\ arch
\clearpage\newpage
\small\printindex
+
+\newpage
+\section{Cheat\_sheet} % (fold)
+\label{sec:cheat_sheet}
+
+% section cheat_sheet (end)
+|r| denotes a real number, |d| a positive real number, |n|an integer, |an| an angle, |b| a boolean, |s| a character string, |pt| a point, |v| variable, |L| a straight line, |C| a circle, |T| a triangle, |E| an ellipse, |Q| a quadrilateral, |P| a parallelogram, |R| a rectangle, |S| a square, |RP| a regular polygon, |O| an object (pt, L,C,T), . . a list of points or an object, < > optional argument.
+
+\begin{multicols}{3}
+
+\fbox{\textbf{Point}}\\
+\textbf{Attributes} table(\ref{point:att}) \\
+|re -> r| \\
+|im -> r| \\
+|type -> s| \\
+|argument -> r| \\
+|modulus -> d| \\
+\textbf{Methods} table(\ref{point:met}) \\
+|+ - * / -> pt| \\
+|.. -> r| \\
+|^ -> r| \\
+|conj -> pt| \\
+|abs -> | \\
+|mod -> | \\
+|norm -> | \\
+|arg -> r| \\
+|get -> r,r| \\
+|sqrt -> pt| \\
+|new -> pt| \\
+|polar -> pt| \\
+|polar_deg -> pt| \\
+|north(d) -> pt| \\
+|south(d) -> pt| \\
+|east(d) -> pt| \\
+|west(d) -> pt| \\
+|normalize(pt) -> pt| \\
+|symmetry (...) -> O| \\
+|rotation (an , ...) -> O| \\
+|homothety (r , ...) -> O| \\
+ \\
+\fbox{\textbf{line}} \\
+\textbf{Attributes} table(\ref{line:att}) \\
+|pa,pb -> pt| \\
+|type -> s| \\
+|mid -> pt| \\
+|north_pa -> pt| \\
+|north_pb -> pt| \\
+|south_pa -> pt| \\
+|south_pb -> pt| \\
+|east -> pt| \\
+|west -> pt| \\
+|slope -> r| \\
+|length -> d| \\
+\textbf{Methods} table(\ref{line:met}) \\
+|new (pt,pt) -> d| \\
+|distance (pt) -> d| \\
+|slope () -> r| \\
+|in_out (pt) -> b| \\
+|in_out_segment (pt) -> b| \\
+|barycenter (r,r) -> pt| \\
+|point (t) -> pt| \\
+|midpoint () -> pt| \\
+|harmonic_int (pt) -> pt| \\
+|harmonic_ext (pt) -> pt| \\
+|harmonic_both (d) -> pt| \\
+|gold_ratio() -> pt| \\
+|normalize () -> pt| \\
+|normalize_inv () -> pt| \\
+|_north_pa (d) -> pt| \\
+|_north_pb (d) -> pt| \\
+|_south_pa (d) -> pt| \\
+|_south_pb (d) -> pt| \\
+|_east (d) -> pt| \\
+|_west (d) -> pt| \\
+|translation (...) -> O| \\
+|projection (...) -> O| \\
+|reflection (...) -> O| \\
+|ll_from ( pt ) -> L| \\
+|ortho_from ( pt ) -> L| \\
+|mediator () -> L| \\
+|circle () -> C| \\
+|circle_swap () -> C| \\
+|diameter () -> C| \\
+|apollonius (r) -> C| \\
+|equilateral (<swap>) -> T| \\
+|isosceles (an,<swap>) -> T| \\
+|school () -> T| \\
+|two_angles (an,an) -> T| \\
+|half () -> T| \\
+|sss (r,r,r) -> T| \\
+|sas (r,an) -> T| \\
+|ssa (r,an) -> T| \\
+|gold (<swap>) -> T| \\
+|euclide (<swap>) -> T| \\
+|golden (<swap>) -> T| \\
+|devine () -> T| \\
+|cheops () -> T| \\
+|pythagoras () -> T| \\
+|sublime () -> T| \\
+|egyptian () -> T| \\
+|square (<swap>) -> T| \\
+|report (r,pt) -> T| \\
+ \\
+\fbox{\textbf{triangle}} \\
+\textbf{Attributes} table(\ref{triangle:att}) \\
+|pa,pb,pc -> pt| \\
+|circumcenter -> pt| \\
+|centroid -> pt| \\
+|incenter -> pt| \\
+|eulercenter -> pt| \\
+|orthocenter -> pt| \\
+|spiekercenter -> pt| \\
+|type -> s| \\
+|a -> d| \\
+|b -> d| \\
+|c -> d| \\
+|ab -> L| \\
+|bc -> L| \\
+|ca -> L| \\
+|alpha -> r| \\
+|beta -> r| \\
+|gamma -> r| \\
+\textbf{Methods} table(\ref{triangle:met}) \\
+|new (pt,pt,pt) -> pt| \\
+|trilinear (r,r,r) -> pt| \\
+|barycentric (r,r,r) -> pt| \\
+|bevan_point () -> pt| \\
+|mittenpunkt_point () -> pt| \\
+|gergonne_point () -> pt| \\
+|nagel_point () -> pt| \\
+|feuerbach_point () -> pt| \\
+|lemoine_point() -> pt| \\
+|symmedian_point() -> pt| \\
+|spieker_center() -> pt| \\
+|barycenter (r,r,r) -> pt| \\
+|base (u,v) -> pt| \\
+|euler_points () -> pt| \\
+|nine_points () -> pt| \\
+|point (t) -> pt| \\
+|soddy_center () -> pt| \\
+|euler_line () -> L| \\
+|symmedian_line (n) -> L| \\
+|altitude (n) -> L| \\
+|bisector (n) -> L| \\
+|bisector_ext(n) -> L| \\
+|antiparallel(pt,n) -> L| \\
+|euler_circle () -> C| \\
+|circum_circle() -> C| \\
+|in_circle () -> C| \\
+|ex_circle (n) -> C| \\
+|first_lemoine_circle() -> C| \\
+|second_lemoine_circle() -> C| \\
+|spieker_circle() -> C| \\
+|soddy_circle () -> C| \\
+|orthic() -> T| \\
+|medial() -> T| \\
+|incentral() -> T| \\
+|excentral() -> T| \\
+|intouch() -> T| \\
+|contact() -> T| \\
+|extouch() -> T| \\
+|feuerbach() -> T| \\
+|anti () -> T| \\
+|tangential () -> T| \\
+|cevian (pt) -> T| \\
+|symmedian () -> T| \\
+|euler () -> T| \\
+|projection (pt) -> pt,pt,pt| \\
+|parallelogram () -> pt| \\
+|area () -> d| \\
+|barycentric_coordinates(pt)| \\
+ |-> r,r,r| \\
+|in_out (pt) -> pt| \\
+|check_equilateral () -> b| \\
+\fbox{\textbf{circle}} \\
+\textbf{Attributes} table(\ref{circle:att}) \\
+|center -> pt| \\
+|through -> pt| \\
+|north -> pt| \\
+|south -> pt| \\
+|east -> pt| \\
+|west -> pt| \\
+|opp -> pt| \\
+|type -> s| \\
+|radius -> d| \\
+|ct -> L| \\
+\textbf{Methods} table(\ref{circle:met}) \\
+|new (pt,pt) -> C| \\
+|radius (pt, r) -> C| \\
+|diameter (pt,pt) -> C| \\
+|in_out (pt) -> b| \\
+|in_out_disk (pt) -> b| \\
+|circles_position (C) -> s| \\
+|power (pt) -> r| \\
+|antipode (pt) -> pt| \\
+|midarc (pt,pt) -> pt| \\
+|point (r) -> pt| \\
+|random_pt (lower, upper) -> pt| \\
+|internal_similitude (C) -> pt| \\
+|external_similitude (C) -> pt| \\
+|radical_center(C,<C>) -> pt| \\
+|tangent_at (pt) -> L| \\
+|radical_axis (C) -> L| \\
+|radical_circle(C,<C>) -> C| \\
+|orthogonal_from (pt) -> C| \\
+|orthogonal_through(pt,pt) -> C| \\
+|midcircle(C) -> C| \\
+|external_tangent(C) -> L,L| \\
+|internal_tangent(C) -> L,L| \\
+|common_tangent(C) -> L,L| \\
+|tangent_from (pt) -> L,L| \\
+|inversion (...) -> O | \\
+ \\
+\fbox{\textbf{ellipse}} \\
+\textbf{Attributes} table(\ref{ellipse:met}) \\
+|center -> pt| \\
+|vertex -> pt| \\
+|covertex -> pt| \\
+|Fa -> pt| \\
+|Fb -> pt| \\
+|north -> pt| \\
+|south -> pt| \\
+|east -> pt| \\
+|west -> pt| \\
+|Rx -> d| \\
+|Ry -> d| \\
+|slope -> r| \\
+|type -> s| \\
+\textbf{Methods} table(\ref{ellipse:met}) \\
+|new (pt,pt,pt) -> E| \\
+|foci (pt,pt,pt) -> E| \\
+|radii (pt,r,r,an) -> E| \\
+|in_out (pt) -> b| \\
+|tangent_at (pt) -> L| \\
+|tangent_from (pt) -> L| \\
+|point (r) -> pt| \\
+ \\
+\fbox{\textbf{square}} \\
+ \textbf{Attributes} table(\ref{square:att}) \\
+|pa,pb,pc,pd -> pt| \\
+|type -> s| \\
+|side -> d| \\
+|center -> pt| \\
+|exradius -> d| \\
+|inradius -> d| \\
+|diagonal -> d| \\
+|proj -> pt| \\
+|ab bc cd da -> L| \\
+|ac bd -> L| \\
+ \textbf{Methods} table(\ref{square:met}) \\
+|new (pt,pt,pt,pt) -> S| \\
+|rotation (pt,pt) -> S| \\
+|side (pt,pt,<swap>) -> S| \\
+ \\
+\fbox{\textbf{rectangle}} \\
+\textbf{Attributes} table(\ref{rectangle:att}) \\
+|pa,pb,pc,pd -> pt| \\
+|type -> s| \\
+|center -> pt| \\
+|exradius -> d| \\
+|length -> r| \\
+|width -> r| \\
+|diagonal -> d| \\
+|ab bc cd da -> L| \\
+|ac bd -> L| \\
+ \textbf{Methods} table(\ref{rectangle:met}) \\
+|new (pt,pt,pt,pt) -> R| \\
+|angle (pt,pt,an) -> R| \\
+|gold (pt,pt,<swap>) -> R| \\
+|diagonal (pt,pt,<swap>) -> R| \\
+|side (pt,pt,r,<swap>) -> R| \\
+|get_lengths () ->r,r| \\
+ \\
+\fbox{\textbf{quadrilateral} } \\
+ \textbf{Attributes} table(\ref{quadrilateral:att}) \\
+|pa,pb,pc,pd -> pt| \\
+|ab bc cd da -> L | \\
+|ac bd -> L | \\
+|type -> s | \\
+|i -> pt| \\
+|g -> pt| \\
+|a b c d -> r| \\
+ \textbf{Methods} table(\ref{quadrilateral:met}) \\
+|new (pt,pt,pt,pt) -> Q| \\
+|iscyclic () -> b| \\
+ \\
+\fbox{\textbf{parallelogram}} \\
+ \textbf{Attributes} table(\ref{parallelogram:att}) \\
+|pa,pb,pc,pd -> pt| \\
+|ab bc cd da -> L | \\
+|ac bd -> L | \\
+|type -> s | \\
+|center -> pt| \\
+ \textbf{Methods} table(\ref{parallelogram:met}) \\
+|new (pt,pt,pt,pt) ->| \\
+|fourth (pt,pt,pt) ->| \\
+ \\
+\fbox{\textbf{Regular\_polygon}} \\
+ \textbf{Attributes} table(\ref{regular:att}) \\
+|center -> pt| \\
+|through -> pt | \\
+|circle -> C | \\
+|type -> s | \\
+|side -> d| \\
+|exradius -> d| \\
+|inradius -> d| \\
+|proj -> pt| \\
+|nb -> i| \\
+|angle -> an| \\
+ \textbf{Methods} table(\ref{regular:met})\\
+|new (pt,pt,n) -> PR| \\
+|incircle () -> C| \\
+|name (s) -> ?| \\
+ \\
+\fbox{\textbf{Misc.}} \\
+ \textbf{Attributes} table(\ref{misc}) \\
+|tkzphi -> r| \\
+|tkzinvphi -> r | \\
+|tkzsqrtphi -> r | \\
+|length -> d | \\
+|islinear(pt,pt,pt) -> b | \\
+|isortho(pt,pt,pt) -> b | \\
+|\tkzUseLua{v} -> ?| \\
+|value{r} -> r| \\
+|real -> r| \\
+|angle_normalize (an) -> an| \\
+|barycenter (...) -> pt| \\
+|bisector (pt,pt,pt) -> L| \\
+|bisector_ext (pt,pt,pt) -> L| \\
+|altitude (pt,pt,pt) -> L| \\
+|midpoint (pt,pt) -> pt| \\
+|equilateral (pt,pt) -> T| \\
+\end{multicols}
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-organization.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-organization.tex
new file mode 100644
index 0000000000..f69e0a591d
--- /dev/null
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-organization.tex
@@ -0,0 +1,100 @@
+\section{Work organization} % (fold)
+\label{sec:work_organization}
+
+Here's a sample organization.
+
+The line |% !TEX TS-program = lualatex| ensures that you don't forget to compile with Lua\LATEX{}. The "standalone" class is useful, as all you need to do here is create a figure.
+
+The "mini" option in \pkg{tkz-euclide} allows you to load and use only plot-related macros.
+
+The package \pkg{ifthen} is useful if you need to use some Boolean.
+
+The macro \tkzcname{LuaCodeDebugOn} allows you to try and find errors in Lua code.
+
+It is of course possible to leave the Lua code in the \tkzNameEnv{tkzelements} environment, but externalizing this code has its advantages.
+
+The first advantage, if you use a good editor, is to have a good presentation of the code. Styles are different between "Lua" and \LATEX{}. This makes the code clearer. This is how I proceeded, then reintegrated the code into the main code.
+
+Another advantage is that you don't have to comment the code incorrectly. For Lua code, you comment lines with |--| (double minus sign), whereas for \LATEX{}, you comment with |%|.
+
+Third advantage: the code can be reused.
+
+
+
+\begin{verbatim}
+% !TEX TS-program = lualatex
+% Created by Alain Matthes on 2024-01-09.
+
+\documentclass[margin = 12pt]{standalone}
+\usepackage[mini]{tkz-euclide}
+\usepackage{tkz-elements,ifthen}
+
+\begin{document}
+\LuaCodeDebugOn
+\begin{tkzelements}
+ scale = 1.25
+ dofile ("sangaku.lua")
+\end{tkzelements}
+
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawCircle(I,F)
+ \tkzFillPolygon[color = purple](A,C,D)%
+ \tkzFillPolygon[color = blue!50!black](A,B,C)%
+ \tkzFillCircle[color = orange](I,F)%
+\end{tikzpicture}
+\end{document}
+\end{verbatim}
+
+And here is the code for the "Lua" part: the file |ex_sangaku.lua|
+
+\begin{verbatim}
+z.A = point : new ( 0,0 )
+z.B = point : new ( 8,0 )
+L.AB = line : new ( z.A , z.B )
+S = L.AB : square ()
+_,_,z.C,z.D = get_points (S)
+z.F = S.ac : projection (z.B)
+L.BF = line : new (z.B,z.F)
+T.ABC = triangle : new ( z.A , z.B , z.C )
+L.bi = T.ABC : bisector (2)
+z.c = L.bi.pb
+L.Cc = line : new (z.C,z.c)
+z.I = intersection (L.Cc,L.BF)
+\end{verbatim}
+
+\begin{tkzelements}
+ scale = 1.25
+ dofile ("sangaku.lua")
+\end{tkzelements}
+
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawCircle(I,F)
+ \tkzFillPolygon[color = purple](A,C,D)%
+ \tkzFillPolygon[color = blue!50!black](A,B,C)%
+ \tkzFillCircle[color = orange](I,F)%
+\end{tikzpicture}
+
+\subsection{Scale problem} % (fold)
+\label{sub:scale_problem}
+
+If necessary, it's better to do the scaling in the "Lua" section. The reason is that it will be more accurate. There is, however, a problem to be aware of. I've made it a point of honor to avoid using numerical values in my codes whenever possible. In principle, these values only appear in the definition of fixed points. If the "scale" option is used, scaling is applied when points are created. Let's imagine you want to organize your code as follows:
+
+|scale = 1.5|\\
+|xB = 8|\\
+|z.B = point : new ( xB,0 )|
+
+Scaling would then be ineffective, as the numerical values are not modified, only the point coordinates. To take scaling into account, use the function \Igfct{math}{value (v) }.
+
+|scale = 1.5|\\
+|xB = value (8)|\\
+|z.B = point : new ( xB,0 )|
+
+\subsection{Code presentation} % (fold)
+\label{sub:code_presentation}
+
+The key point is that, unlike \LATEX{} or \TEX{}, you can insert spaces absolutely anywhere.
+% subsection code_presentation (end)
+% subsection scale_problem (end)
+% section work_organization (end) \ No newline at end of file
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-tests.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-tests.tex
new file mode 100644
index 0000000000..d43cce663b
--- /dev/null
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-tests.tex
@@ -0,0 +1,4 @@
+\section{tests} % (fold)
+\label{sec:tests}
+
+% section tests (end) \ No newline at end of file
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-transferts.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-transferts.tex
index c255a1804d..39d5940e72 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-transferts.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-transferts.tex
@@ -23,49 +23,58 @@ Currently the drawing program is either \TIKZ\ or \pkg{tkz-euclide}. You have th
n = string.len(K)
if n >1 then
_,_,ft, sd = string.find( K , "(.+)(.)" )
- if sd == "p" then K=ft.."'" end
+ if sd == "p" then K=ft.."'" end
+ _,_,xft, xsd = string.find( ft , "(.+)(.)" )
+ if xsd == "p" then K=xft.."'".."'" end
end
tex.print("\\coordinate ("..K..") at ("..V.re..","..V.im..") ;\\\\")
end}
-}\end{verbatim}
+}
+\end{verbatim}
\end{mybox}
See the section In-depth Study \ref{sec:in_depth_study} for an explanation of the previous code.
-The environment \tkzNameEnv{tkzelements} allows to use the underscore |_| and the macro \tkzcname{tkzGetNodes} allows to obtain names of nodes containing \tkzname{prime}. (see the next example)
+The environment \tkzNameEnv{tkzelements} allows to use the underscore |_| and the macro \tkzcname{tkzGetNodes} allows to obtain names of nodes containing \tkzname{prime} or \tkzname{double prime}. (see the next example)
\begin{minipage}{0.5\textwidth}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{verbatim}
\begin{tkzelements}
scale = 1.2
z.o = point: new (0,0)
z.a_1 = point: new (2,1)
z.a_2 = point: new (1,2)
z.ap = z.a_1 + z.a_2
+ z.app = z.a_1 - z.a_2
\end{tkzelements}
\begin{tikzpicture}
\tkzGetNodes
- \tkzDrawSegments(o,a_1 o,a_2 o,a')
+ \tkzDrawSegments(o,a_1 o,a_2 o,a' o,a'')
\tkzDrawSegments[red](a_1,a' a_2,a')
- \tkzDrawPoints(a_1,a_2,a',o)
- \tkzLabelPoints(o,a_1,a_2,a')
+ \tkzDrawSegments[blue](a_1,a'' a_2,a'')
+ \tkzDrawPoints(a_1,a_2,a',o,a'')
+ \tkzLabelPoints(o,a_1,a_2,a',a'')
\end{tikzpicture}
-\end{tkzexample}%
-\end{minipage}%
+\end{verbatim}
+\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tkzelements}
-scale = 1.2
-z.o = point: new (0,0)
-z.a_1 = point: new (2,1)
-z.a_2 = point: new (1,2)
-z.ap = z.a_1 + z.a_2
+ scale = 1.2
+ z.o = point: new (0,0)
+ z.a_1 = point: new (2,1)
+ z.a_2 = point: new (1,2)
+ z.ap = z.a_1 + z.a_2
+ z.app = z.a_1 - z.a_2
\end{tkzelements}
+\hspace{\fill}
\begin{tikzpicture}
-\tkzGetNodes
- \tkzDrawSegments(o,a_1 o,a_2 o,a')
- \tkzDrawSegments[red](a_1,a' a_2,a')
- \tkzDrawPoints(a_1,a_2,a',o)
- \tkzLabelPoints(o,a_1,a_2,a')
+ \tkzGetNodes
+ \tkzDrawSegments(o,a_1 o,a_2 o,a' o,a'')
+ \tkzDrawSegments[red](a_1,a' a_2,a')
+ \tkzDrawSegments[blue](a_1,a'' a_2,a'')
+ \tkzDrawPoints(a_1,a_2,a',o,a'')
+ \tkzLabelPoints(o,a_1,a_2,a',a'')
\end{tikzpicture}
+\hspace{\fill}
\end{minipage}%
\newpage
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-why.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-why.tex
index afc64f416d..aa3c23d7d8 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-why.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-why.tex
@@ -69,7 +69,7 @@ The goal is to determine an inner tangent circle to the three exinscribed circle
See \href{https://mathworld.wolfram.com/ApolloniusCircle.html}{MathWorld} for more details.
-This example was my reference for testing the tkz-euclide package. With my first methods and the tools at my disposition, the results lacked precision. Now, with tkz-elements, I can use tools that are more powerful, more precise and easier to create.
+This example was my reference for testing the \pkg{tkz-euclide} package. With my first methods and the tools at my disposition, the results lacked precision. Now, with tkz-elements, I can use tools that are more powerful, more precise and easier to create.
The essential principles of figure construction with \tkzname{tkz-euclide} are kept: definitions, calculations, tracings, labels as well as the step-by-step programmation, corresponding to a construction with a ruler and a compass.
@@ -136,7 +136,7 @@ Finally, the inversion of the Euler circle with respect to the radical circle is
Now that all the points have been defined, it's time to start drawing the paths. To do this, you need to create the nodes. This is the role of the macro \Imacro{tkzGetNodes}. See \ref{ssub:points_transfer}
-The following section concerns only drawings, and is handled by tkz-euclide.
+The following section concerns only drawings, and is handled by \pkg{tkz-euclide}.
\begin{verbatim}
\begin{tikzpicture}
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/gold_preamble.lua b/macros/latex/contrib/tkz/tkz-elements/doc/latex/gold_preamble.lua
new file mode 100644
index 0000000000..9067371eb0
--- /dev/null
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/gold_preamble.lua
@@ -0,0 +1,46 @@
+z.A = point: new (0 , 0)
+z.B = point: new (10 , 0)
+L.AB = line: new ( z.A, z.B)
+z.C = L.AB : gold_ratio ()
+L.AC = line: new ( z.A, z.C)
+L.CB = line: new ( z.C, z.B)
+z.O_0 = L.AB.mid
+z.O_1 = L.AC.mid
+z.O_2 = L.CB.mid
+C.O0B = circle: new ( z.O_0, z.B)
+C.O1C = circle: new ( z.O_1, z.C)
+C.O2B = circle: new ( z.O_2, z.B)
+z.M_0 = C.O1C : external_similitude (C.O2B)
+z.M_1 = C.O0B : internal_similitude (C.O1C)
+z.M_2 = C.O0B : internal_similitude (C.O2B)
+z.Q = C.O2B.north
+z.P = C.O1C.north
+z.O = C.O0B.south
+z.W = C.O0B.north
+L.O1Q = line : new (z.O_1,z.Q)
+L.O2P = line : new (z.O_2,z.P)
+z.O_4 = intersection (L.O1Q,L.O2P)
+L.CO4 = line : new (z.C,z.O_4)
+z.D = intersection (L.CO4,C.O0B)
+L.CD = line : new (z.C,z.D)
+L.PQ = line : new (z.P,z.Q)
+L.CQ = line : new (z.C,z.Q)
+z.O_5 = intersection (L.CD,L.PQ)
+C.QC = circle: new ( z.Q, z.C)
+C.PA = circle: new ( z.P, z.A)
+z.P_0 = intersection (C.QC,C.O0B)
+z.P_1 = intersection (C.QC,C.O1C)
+_,z.P_2 = intersection (C.PA,C.O2B)
+T.P = triangle: new ( z.P_0, z.P_1, z.P_2)
+z.O_3 = T.P.circumcenter
+L.AQ = line : new (z.A,z.Q)
+L.BP = line : new (z.B,z.P)
+z.T = intersection(L.BP,L.AQ)
+z.O_6 = L.CD.mid
+C.DC = circle : new (z.D,z.C)
+z.U,z.V = intersection (C.DC,C.O0B)
+L.UV = line : new (z.U,z.V)
+z.R,z.S = L.UV : projection (z.O_1,z.O_2)
+
+
+
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/sangaku.lua b/macros/latex/contrib/tkz/tkz-elements/doc/latex/sangaku.lua
new file mode 100644
index 0000000000..777528540f
--- /dev/null
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/sangaku.lua
@@ -0,0 +1,14 @@
+xB = value(8)
+z.A = point : new ( 0,0 )
+z.B = point : new (
+xB,0 )
+L.AB = line : new ( z.A , z.B )
+S = L.AB : square ()
+_,_,z.C,z.D = get_points (S)
+z.F = S.ac : projection (z.B)
+L.BF = line : new (z.B,z.F)
+T.ABC = triangle : new ( z.A , z.B , z.C )
+L.bi = T.ABC : bisector (2)
+z.c = L.bi.pb
+L.Cc = line : new (z.C,z.c)
+z.I = intersection (L.Cc,L.BF) \ No newline at end of file
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/tkz-elements.pdf b/macros/latex/contrib/tkz/tkz-elements/doc/tkz-elements.pdf
index 3dcaf903a2..d5b920c981 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/tkz-elements.pdf
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/tkz-elements.pdf
Binary files differ