summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-03-27 03:02:20 +0000
committerNorbert Preining <norbert@preining.info>2024-03-27 03:02:20 +0000
commit31fa8cd73bab8480d38dae3a89ca578f337d6bbd (patch)
treeba550e99e0cb15dbf5405369d536b12b051c5155 /macros/latex/contrib/tkz
parent904f56f2c26edc7eb11d5a27579bccbeca29c618 (diff)
CTAN sync 202403270302
Diffstat (limited to 'macros/latex/contrib/tkz')
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/README.md19
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-circle.tex120
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-ellipse.tex229
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-line.tex261
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-matrices.tex1013
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-misc.tex80
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-parallelogram.tex14
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-point.tex195
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-quadrilateral.tex12
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-rectangle.tex22
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-regular.tex8
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-square.tex12
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-triangle.tex332
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-vectors.tex167
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes.tex18
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-convention.tex32
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-examples.tex1072
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-indepthstudy.tex182
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-intersection.tex16
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.tex127
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-organization.tex25
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-presentation.tex38
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-structure.tex10
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-transfers.tex152
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-why.tex89
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/tkz-elements.pdfbin656453 -> 696762 bytes
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz-elements.sty32
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_circle.lua13
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_class.lua4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_ellipse.lua28
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_circles.lua8
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_intersections.lua4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_lines.lua16
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_maths.lua186
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_matrices.lua374
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_points.lua4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_regular.lua4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_triangles.lua22
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_line.lua27
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_main.lua8
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_matrices.lua219
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_misc.lua4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_parallelogram.lua4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua130
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_quadrilateral.lua4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_rectangle.lua4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_regular.lua4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_square.lua4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_triangle.lua41
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_vector.lua32
50 files changed, 3930 insertions, 1491 deletions
diff --git a/macros/latex/contrib/tkz/tkz-elements/README.md b/macros/latex/contrib/tkz/tkz-elements/README.md
index bf33121af3..1f2043e435 100644
--- a/macros/latex/contrib/tkz/tkz-elements/README.md
+++ b/macros/latex/contrib/tkz/tkz-elements/README.md
@@ -1,10 +1,10 @@
# tkz-elements — for euclidean geometry
-Release 2.00c 2024/02/04
+Release 2.20c 2024/03/26
## Description
-`tkz-elements v.2.00c` is the new version of a library written in lua, allowing to make all the necessary calculations to define the objects of a Euclidean geometry figure. You need to compile with `LuaLaTeX`. With `tkz-elements`, the definitions and calculations are only done with `Lua`.
+`tkz-elements v.2.20c` is the new version of a library written in lua, allowing to make all the necessary calculations to define the objects of a Euclidean geometry figure. You need to compile with `LuaLaTeX`. With `tkz-elements`, the definitions and calculations are only done with `Lua`.
The main possibility of programmation proposed is oriented "object programming" with object classes like point, line, triangle, circle and ellipse. For the moment, once the calculations are done, it is `tkz-euclide` or `TikZ` which allows the drawings.
@@ -60,6 +60,21 @@ An important example `Golden Arbelos` using the package is on the site. All the
are on the site.
## History
+ - version 2.20c
+ - Package:
+ - Added class matrix; methods are mainly of order 2, sometimes of order 3.
+ - Added function solve_quadratic. This function can be used to solve second-degree equations with real or complex numbers.
+ - Added method print for the class point. Example z.A : print ()
+ - Correction of the macro tkzDN. I deleted a spurious space
+ - Modification of vector class attributes. Attributes h and t become head and tail.
+ - The mtx attribute is introduced for point and vector.
+ z.A.mtx represents the column matrix whose coefficients are the point's coordinates. Same for vectors.
+ - Documentation:
+ - Rewriting of all texts
+ - Correction of example: pentagon
+ - Documentation about matrices
+
+
- version 2.00c
- class development “vector”
- added attribute “vec”
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 2395f5f045..f84c58d941 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
@@ -4,7 +4,7 @@
\subsection{Attributes of a circle} % (fold)
\label{sub:attributes_of_a_circle}
-This class is also defined by two points: on the one hand, the center and on the other hand, a point through which the circle passes.
+This class is defined by two points: the center and a point through which the circle passes
\begin{mybox}
Creation |C.OA = circle: new (z.O,z.A) |
@@ -25,8 +25,8 @@ This class is also defined by two points: on the one hand, the center and on the
\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}) \\
+\Iattr{circle}{opp} & |z.Ap = C.AB.opp| & Refer to (\ref{ssub:example_circle_attributes}) \\
+\Iattr{circle}{ct} & |L = C.AB.ct| & Refer to (\ref{ssub:example_circle_attributes}) \\
\bottomrule %
\end{tabular}
\egroup
@@ -37,7 +37,7 @@ This class is also defined by two points: on the one hand, the center and on the
Three attributes are used (south, west, radius).
\begin{minipage}{0.5\textwidth}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
scale = .5
z.a = point: new (1, 1)
@@ -57,7 +57,7 @@ Three attributes are used (south, west, radius).
\tkzDrawSegments(a,b r,t b,c)
\tkzLabelSegment[sloped](a,b){ab = \tkzUseLua{r}}
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tkzelements}
@@ -96,9 +96,9 @@ Three attributes are used (south, west, radius).
\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]$ \\
+\Igfct{circle}{new(O,A)} & |C.OA = circle : new (z.O,z.A)| & circle center $O$ through $A$\\
+\Igfct{circle}{radius(O,r)} & |C.OA = circle : radius (z.O,2)| & circle center $O$ radius =2 cm\\
+\Igfct{circle}{diameter(A,B)} & |C.OA = circle :diameter(z.A,z.B)| & circle diameter $[AB]$ \\
\midrule
\textbf{Points} &&\\
\midrule
@@ -109,31 +109,31 @@ Three attributes are used (south, west, radius).
\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} \\
+\Imeth{circle}{radical\_center (C1<,C2>)} & or only (C1) & Refer to \ref{sub:radical_center} \\
\midrule
\textbf{Lines} & & \\
\midrule
-\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})\\
+\Imeth{circle}{radical\_axis (C)} & Refer to ( \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)| & Refer to (\ref{ssub:lemoine} ; \ref{ssub:example_combination_of_methods})\\
+\Imeth{circle}{tangent\_from (pt)}& |z.M,z.N = C.OA: tangent_from (z.P)| & Refer to (\ref{tangent_from})\\
+\Imeth{circle}{inversion (line)} & |L or C = C.AC: inversion (L.EF)|& Refer to (\ref{ssub:inversion_line})\\
+\Imeth{circle}{common\_tangent (C)} & |z.a,z.b = C.AC: common_tangent (C.EF)|& Refer to (\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)| & 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}\\
+\Imeth{circle}{orthogonal\_from (pt)} & |C = C.OA: orthogonal_from (z.P)| & Refer to (\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)| & Refer to (\ref{sub:orthogonal_circle_through})\\
+\Imeth{circle}{inversion (...)} & | C.AC: inversion (pt, pts, L or C )|& Refer to \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)| & Refer to \ref{ssub:midcircle} \\
+\Imeth{circle}{radical\_circle (C1<,C2>)} & or only (C1) & Refer to \ref{sub:radical_circle}\\
\midrule
\textbf{Miscellaneous} &&\\
\midrule
-\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}{power (pt)} &|p = C.OA: power (z.M)| & Refer to (\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)| & Refer to (\ref{sub:in_out_for_circle_and_disk}) \\
+\Imeth{circle}{in\_out\_disk (pt)} & |C.OA : in_out_disk (z.M)| & Refer to (\ref{sub:in_out_for_circle_and_disk}) \\
\Imeth{circle}{draw ()} & for further use &\\
-\Imeth{circle}{circles\_position (C1)} & result = string &see (\ref{sub:circles_position}) \\
+\Imeth{circle}{circles\_position (C1)} & result = string &Refer to (\ref{sub:circles_position}) \\
\bottomrule
\end{tabular}
\egroup
@@ -143,7 +143,7 @@ Three attributes are used (south, west, radius).
\label{ssub:altshiller}
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.P = point : new (0,0)
z.Q = point : new (5,0)
@@ -169,7 +169,7 @@ Three attributes are used (south, west, radius).
\tkzDrawPoints(P,Q,E,F,A,C,D)
\tkzLabelPoints(P,Q,E,F,A,C,D)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\hspace*{\fill}
\begin{minipage}{.5\textwidth}
@@ -206,7 +206,7 @@ Three attributes are used (south, west, radius).
\label{ssub:lemoine}
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale = 1.6
z.A = point: new (1,0)
@@ -232,7 +232,7 @@ Three attributes are used (south, west, radius).
\tkzDrawLines[red](A,P B,Q R,C)
\tkzDrawSegments(A,R C,P C,Q)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
@@ -270,15 +270,15 @@ z.Q = intersection (L.tB,T.ca)
\subsubsection{Inversion: point, line and circle} % (fold)
\label{ssub:inversion}
-The “inversion” method can be used on a point, a line or a circle. Depending on the type of object, the function determines the correct algorithm to use.
+The \code{inversion} method can be used on a point, a line or a circle. Depending on the type of object, the function determines the correct algorithm to use.
\subsubsection{Inversion: point} % (fold)
\label{ssub:inversion_point}
-The “inversion” method can be used on a point, a group of points, a line or a circle. Depending on the type of object, the function determines the correct algorithm to use.
+The \code{inversion} method can be used on a point, a group of points, a line or a circle. Depending on the type of object, the function determines the correct algorithm to use.
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.o = point: new (-1,2)
z.a = point: new (2,1)
@@ -296,7 +296,7 @@ The “inversion” method can be used on a point, a group of points, a line or
\tkzLabelSegment[sloped,above=1em](c,d){%
Power of c with respect to C is \tkzUseLua{p}}
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -326,7 +326,7 @@ The “inversion” method can be used on a point, a group of points, a line or
The result is either a straight line or a circle.
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.o = point: new (-1,1)
z.a = point: new (1,3)
@@ -344,7 +344,7 @@ The result is either a straight line or a circle.
\tkzDrawPoints(a,o,c,d,H)
\tkzLabelPoints(a,o,c,d,H)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -374,7 +374,7 @@ The result is either a straight line or a circle.
The result is either a straight line or a circle.
\begin{minipage}{.55\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale = .7
z.o,z.a = point: new (-1,3),point: new (2,3)
@@ -402,7 +402,7 @@ color = "orange"
\tkzDrawPoints(a,...,f,o,p,q)
\tkzLabelPoints(a,...,f,o,p,q)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.45\textwidth}
\begin{tkzelements}
@@ -450,7 +450,7 @@ Clearly the tangency cases can be seen as limit cases of the above;
\end{enumerate} }
\end{minipage}
-
+\vspace{1em}
Let's look at each of these cases:
\begin{enumerate}[label=(\roman*)]
\item If the two given circles intersect, then there are two circles of inversion through their common points, with centers at the centers of similitudes. The two midcircles bisect their angles and are orthogonal to each other. The centers of the midcircles are the internal center of similitude and the external center of similitude $I$ and $J$.
@@ -459,7 +459,7 @@ Consider two intersecting circles $(\mathcal{A})$ and $(\mathcal{B})$.
We can obtain the centers of similarity of these two circles by constructing $EH$ and $FG$ two diameters parallel of the circles $(\mathcal{A})$ and $(\mathcal{B})$. The line $(GE)$ intercepts the line $(AB)$ in $J$ and the line $(EF)$ intercepts the line $(AB)$ in $I$. The circles $(\mathcal{I})$ and $(\mathcal{J})$ are orthogonal and are the midcircles of $(\mathcal{A})$ and $(\mathcal{B})$. The division $(A,B;I,J)$ is harmonic.
\begin{minipage}{.4\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale = .8
z.A = point : new ( 1 , 0 )
@@ -477,7 +477,7 @@ z.I,z.T = get_points ( C.IT )
z.J,z.V = get_points ( C.JV )
z.X,z.Y = intersection (C.AO,C.BP)
\end{tkzelements}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.6\textwidth}
\begin{tkzelements}
@@ -522,7 +522,7 @@ z.X,z.Y = intersection (C.AO,C.BP)
\item One given circle is in the interior of the other given circle.
\begin{minipage}{.6\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale =.75
z.A = point : new ( 3 , 0 )
@@ -541,7 +541,7 @@ z.X,z.Y = intersection (C.AO,C.BP)
C.IT = C.AO : midcircle (C.BP)
z.I,z.T = get_points ( C.IT )
\end{tkzelements}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.6\textwidth}
\begin{tkzelements}
@@ -582,7 +582,7 @@ This case is a little more complicated. We'll construct the two circles $(\alpha
$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}
+\begin{Verbatim}
\begin{tkzelements}
scale=.75
local a,b,c,d
@@ -603,7 +603,7 @@ z.H = intersection (L.TF,C.IT)
z.E = intersection (L.TF,C.Aa)
z.F=L.TF.pb
\end{tkzelements}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.6\textwidth}
\begin{tkzelements}
@@ -647,7 +647,7 @@ z.F=L.TF.pb
\item $(\mathcal{B})$ being external and angent to $(\mathcal{A})$. The construction is identical to the previous one.
\begin{minipage}{.4\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale=.75
local a,b,c,d
@@ -668,7 +668,7 @@ z.H = intersection (L.TF,C.IT)
z.E = intersection (L.TF,C.Aa)
z.F=L.TF.pb
\end{tkzelements}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.6\textwidth}
\begin{tkzelements}
@@ -709,7 +709,7 @@ z.F=L.TF.pb
\item When one of the given circles is inside and tangent to the other, the construction is easy.
\begin{minipage}{.4\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new ( 2 , 0 )
z.B = point : new ( 4 , 0 )
@@ -720,7 +720,7 @@ C.Bb = circle : new (z.B,z.b)
C.IT = C.Aa : midcircle (C.Bb)
z.I,z.T = get_points ( C.IT )
\end{tkzelements}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.6\textwidth}
\begin{tkzelements}
@@ -753,18 +753,18 @@ z.I,z.T = get_points ( C.IT )
\subsection{Circles\_position} % (fold)
\label{sub:circles_position}
-Cette fonction retourne une chaîne qui indique la position du cercle par rapport à un autre. Utile pour créer une fonction. Les cas sont:
+This function returns a string indicating the position of the circle in relation to another. Useful for creating a function. Cases are:
\begin{itemize}
- \item “outside”
- \item “outside tangent”
- \item “inside tangent”
- \item “inside”
- \item “intersect”
+ \item \code{outside}
+ \item \code{outside tangent}
+ \item \code{inside tangent}
+ \item \code{inside}
+ \item \code{intersect}
\end{itemize}
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
z.a = point : new ( 3 , 0 )
@@ -783,7 +783,7 @@ Cette fonction retourne une chaîne qui indique la position du cercle par rappor
\tkzDrawCircle(A,a)
\tkzDrawCircle[color=\tkzUseLua{color}](B,b)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -810,7 +810,7 @@ if position == "inside tangent" then color = "orange" else color = "blue" end
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{Verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
z.B = point : new ( 5 , 2 )
@@ -839,7 +839,7 @@ Let be a tangent common to both circles at $T$ and $T'$ (closest to $C$). Let a
\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}
+\end{Verbatim}
\begin{tkzelements}
@@ -879,7 +879,7 @@ _,z.D = intersection (C.AC,C.BC)
\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{Verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
z.B = point : new ( 4 , 2 )
@@ -909,7 +909,7 @@ For two circles to be orthogonal, it is necessary and sufficient for a secant
\tkzLabelPoints[above](C,M',T,T')
\tkzMarkRightAngles(M',D,M A,C,B)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
@@ -946,7 +946,7 @@ z.Mp = intersection (L.mm, C.BC)
\subsection{In\_out for circle and disk} % (fold)
\label{sub:in_out_for_circle_and_disk}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.O = point : new (0,0)
z.A = point : new (1,2)
@@ -978,7 +978,7 @@ BDp = C.OA : in_out_disk (z.P)
\tkzPosPoint{BDn}{N}{disk}{14}
\tkzPosPoint{BDp}{P}{disk}{14}
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\begin{tkzelements}
z.O = point : new (0,0)
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 bbe39aa1a2..5ea44a57b7 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
@@ -1,10 +1,10 @@
\newpage
-\section{Classe \Iclass{ellipse}} % (fold)
-\label{sec:classe_ellipse}
+\section{Class \Iclass{ellipse}} % (fold)
+\label{sec:class_ellipse}
\subsection{Attributes of an ellipse} % (fold)
\label{sub:attributes_of_an_ellipse}
-The first attributes are the three points that define the ellipse : \Iattr{ellipse}{center} , \Iattr{ellipse}{vertex} and \Iattr{ellipse}{covertex}. The first method to define an ellipse is to give its center, then the point named \tkzname{vertex} which defines the major axis and finally the point named \tkzname{covertex} which defines the minor axis.
+The first attributes are the three points that define the ellipse: : the \Iattr{ellipse}{center} , the \Iattr{ellipse}{vertex} and the\Iattr{ellipse}{covertex}. The first method to define an ellipse is to give its center, then the point named \tkzname{vertex} which defines the major axis and finally the point named \tkzname{covertex} which defines the minor axis.
\bgroup
@@ -35,45 +35,45 @@ 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{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}
+\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}
@@ -121,10 +121,8 @@ The first attributes are the three points that define the ellipse : \Iattr{ellip
\label{sub:methods_of_the_class_ellipse}
Before reviewing the methods and functions related to ellipses, let's take a look at how you can draw ellipses with \pkg{tkz-elements}. The \tkzcname{tkzDrawEllipse} macro requires 4 arguments: the center of the ellipse, the long radius (on the focus axis), the short radius and the angle formed by the focus axis.
The last three arguments must be transferred from \tkzNameEnv{tkzelements} to \tkzNameEnv{tikzpicture}.
-To do this, you'll need to use a \pkg{tkz-elements }function: \Igfct{package}{set\_lua\_to\_tex}. See \ref{sec:math_functions} or the next examples.
+To do this, you'll need to use a macro: \tkzcname{tkzUseLua} defined in \pkg{tkz-elements}. Refer to \ref{ssub:other_transfers} or \ref{sub:transfer_from_lua_to_tex} or next examples.
-\vskip 1em
-\lefthand\ You need to proceed with care, because unfortunately at the moment, the macros you create are global and you can overwrite existing macros. One solution is either to choose a macro name that won't cause any problems, or to save the initial macro.
\bgroup
\catcode`_=12
@@ -139,9 +137,10 @@ To do this, you'll need to use a \pkg{tkz-elements }function: \Igfct{package}{se
\Imeth{ellipse}{foci (f1,f2,v)} & E = ellipse: foci ( focus 1, focus 2, vertex ) \\
\Imeth{ellipse}{radii (c,a,b,sl) } & E = ellipse: radii ( center, radius a, radius b, slope ) \\
\Imeth{ellipse}{in\_out (pt) } & pt in/out of the ellipse \\
-\Imeth{ellipse}{tangent\_at (pt) } & see example \ref{ssub:method_point} \\
-\Imeth{ellipse}{tangent\_from (pt) } & see example \ref{ssub:method_point} \\
-\Imeth{ellipse}{point (t) } & vertex = point (0) covertex = point (0.25) ex see \ref{ssub:method_point} \\
+\Imeth{ellipse}{tangent\_at (pt) } & Refer to ex. \ref{ssub:method_point} \\
+\Imeth{ellipse}{tangent\_from (pt) } & Refer to ex. \ref{ssub:method_point} \\
+\Imeth{ellipse}{point (t) } & vertex = point (0) covertex = point (0.25) ex Refer to \ref{ssub:method_point} \\
+\Imeth{ellipse}{orthoptic\_circle () } & Refer to ex. \ref{ssub:steiner_inellipse_and_circumellipse} \\
\bottomrule
\end{tabular}
@@ -150,10 +149,10 @@ To do this, you'll need to use a \pkg{tkz-elements }function: \Igfct{package}{se
\subsubsection{Method \Imeth{ellipse}{new}} % (fold)
\label{ssub:method_imeth_ellipse_new}
The main method for creating a new ellipse is \Imeth{ellipse}{new}. The arguments are three: \Iattr{ellipse}{center}, \Iattr{ellipse}{vertex} and \Iattr{ellipse}{covertex}
-For attributes see \ref{sec:classe_ellipse}
+For attributes Refer to \ref{sec:class_ellipse}.
\begin{minipage}{0.5\textwidth}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.C = point: new (3 , 2)
z.A = point: new (5 , 1)
@@ -172,7 +171,7 @@ For attributes see \ref{sec:classe_ellipse}
\tkzDrawPoints(C,A,B)
\tkzLabelPoints(C,A,B)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tkzelements}
@@ -200,53 +199,9 @@ The function \Igfct{package}{tkzUseLua (variable)} is used to transfer values to
\subsubsection{Method \Imeth{ellipse}{foci}} % (fold)
\label{ssub:function_tkzname_ellipse__foci}
-The first two points are the foci of the ellipse. The third one is the vertex. We can deduce all the other characteristics.
+The first two points are the foci of the ellipse, and the third one is the vertex. We can deduce all the other characteristics from these points.
+\emph{The function launches the |new| method, defining all the characteristics of the ellipse.}
-\emph{The function launches the |new| method, all the characteristics of the ellipse are defined.}
-
-\begin{minipage}{0.6\textwidth}
-\begin{verbatim}
-\begin{tkzelements}
- z.A = point: new (0 , 0)
- z.B = point: new (5 , 1)
- L.AB = line : new (z.A,z.B)
- z.C = point: new (.8 , 3)
- T.ABC = triangle: new (z.A,z.B,z.C)
- z.N = T.ABC.eulercenter
- z.H = T.ABC.orthocenter
- z.O = T.ABC.circumcenter
- _,_,z.Mc = get_points (T.ABC: medial ())
- L.euler = line: new (z.H,z.O)
- C.circum = circle: new (z.O,z.A)
- C.euler = circle: new (z.N,z.Mc)
- z.i,z.j = intersection (L.euler,C.circum)
- z.I,z.J = intersection (L.euler,C.euler)
- E = ellipse: foci (z.H,z.O,z.I)
- L.AH = line: new (z.A,z.H)
- z.X = intersection (L.AH,C.circum)
- L.XO = line: new (z.X,z.O)
- z.R,z.S = intersection (L.XO,E)
- a,b = E.Rx,E.Ry
- ang = math.deg(E.slope)
-\end{tkzelements}
-\begin{tikzpicture}
- \tkzGetNodes
- \tkzDrawPolygon(A,B,C)
- \tkzDrawCircles[cyan](O,A N,I)
- \tkzDrawSegments(X,R A,X)
- \tkzDrawEllipse[red](N,\tkzUseLua{a},
- \tkzUseLua{b},\tkzUseLua{ang})
- \tkzDrawLines[add=.2 and .5](I,H)
- \tkzDrawPoints(A,B,C,N,O,X,H,R,S,I)
- \tkzLabelPoints[above](C,X)
- \tkzLabelPoints[above right](N,O)
- \tkzLabelPoints[above left](R)
- \tkzLabelPoints[left](A)
- \tkzLabelPoints[right](B,I,S,H)
- \end{tikzpicture}
-\end{verbatim}
-\end{minipage}
-\begin{minipage}{0.4\textwidth}
\begin{tkzelements}
scale =1
z.A = point: new (0 , 0)
@@ -271,6 +226,7 @@ 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}
+\hspace*{\fill}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawPolygon(A,B,C)
@@ -285,7 +241,53 @@ 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{minipage}
+\hspace*{\fill}
+\begin{Verbatim}
+\begin{tkzelements}
+ z.A = point: new (0 , 0)
+ z.B = point: new (5 , 1)
+ L.AB = line : new (z.A,z.B)
+ z.C = point: new (.8 , 3)
+ T.ABC = triangle: new (z.A,z.B,z.C)
+ z.N = T.ABC.eulercenter
+ z.H = T.ABC.orthocenter
+ z.O = T.ABC.circumcenter
+ _,_,z.Mc = get_points (T.ABC: medial ())
+ L.euler = line: new (z.H,z.O)
+ C.circum = circle: new (z.O,z.A)
+ C.euler = circle: new (z.N,z.Mc)
+ z.i,z.j = intersection (L.euler,C.circum)
+ z.I,z.J = intersection (L.euler,C.euler)
+ E = ellipse: foci (z.H,z.O,z.I)
+ L.AH = line: new (z.A,z.H)
+ z.X = intersection (L.AH,C.circum)
+ L.XO = line: new (z.X,z.O)
+ z.R,z.S = intersection (L.XO,E)
+ a,b = E.Rx,E.Ry
+ ang = math.deg(E.slope)
+\end{tkzelements}
+\end{Verbatim}
+\begin{Verbatim}
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawPolygon(A,B,C)
+ \tkzDrawCircles[cyan](O,A N,I)
+ \tkzDrawSegments(X,R A,X)
+ \tkzDrawEllipse[red](N,\tkzUseLua{a},
+ \tkzUseLua{b},\tkzUseLua{ang})
+ \tkzDrawLines[add=.2 and .5](I,H)
+ \tkzDrawPoints(A,B,C,N,O,X,H,R,S,I)
+ \tkzLabelPoints[above](C,X)
+ \tkzLabelPoints[above right](N,O)
+ \tkzLabelPoints[above left](R)
+ \tkzLabelPoints[left](A)
+ \tkzLabelPoints[right](B,I,S,H)
+ \end{tikzpicture}
+\end{Verbatim}
+
+
+
+
% subsubsection function_tkzname_ellipse__foci (end)
\subsubsection{Method \Imeth{ellipse}{point} and \Imeth{ellipse}{radii}} % (fold)
@@ -296,7 +298,7 @@ The first two points are the foci of the ellipse. The third one is the vertex. W
\begin{minipage}{0.6\textwidth}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.C = point: new (2 , 3)
z.A = point: new (6 , 5)
@@ -316,18 +318,7 @@ The first two points are the foci of the ellipse. The third one is the vertex. W
L.K = E :tangent_at (z.K)
z.ka,z.kb = get_points(L.K)
\end{tkzelements}
-\begin{tikzpicture}
- \tkzGetNodes
- \tkzDrawSegments(C,V C,CoV)
- \tkzDrawLines(x,y A,M A,N ka,kb)
- \tkzLabelSegment(C,V){$a$}
- \tkzLabelSegment[right](C,CoV){$b$}
- \tkzDrawEllipse[teal](C,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{ang})
- \tkzDrawPoints(C,V,CoV,X,x,y,M,N,A,K)
- \tkzLabelPoints(C,V,A,M,N,K)
- \tkzLabelPoints[above left](CoV)
-\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{0.4\textwidth}
\begin{tkzelements}
@@ -362,8 +353,22 @@ z.ka,z.kb = get_points(L.K)
\tkzLabelPoints[above left](CoV)
\end{tikzpicture}
\end{minipage}
+
+\begin{Verbatim}
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawSegments(C,V C,CoV)
+ \tkzDrawLines(x,y A,M A,N ka,kb)
+ \tkzLabelSegment(C,V){$a$}
+ \tkzLabelSegment[right](C,CoV){$b$}
+ \tkzDrawEllipse[teal](C,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{ang})
+ \tkzDrawPoints(C,V,CoV,X,x,y,M,N,A,K)
+ \tkzLabelPoints(C,V,A,M,N,K)
+ \tkzLabelPoints[above left](CoV)
+\end{tikzpicture}
+\end{Verbatim}
% subsubsection method_point (end)
% subsection methods_of_the_class_ellipse (end)
-% section classe_ellipse (end)
+% section class_ellipse (end)
\endinput \ No newline at end of file
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 2aa2ce6537..741938eb66 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
@@ -5,7 +5,7 @@
\subsection{Attributes of a line} % (fold)
\label{sub:attributes_of_a_line}
-Writing |L.AB = line: new (z.A,z.B)| creates an object of the class \tkzname{line} (the notation is arbitrary for the moment). Geometrically it is, as much ,the line passing through the points $A$ and $B$ as the segment $[AB]$. Thus we can use the midpoint of |L.AB| which is, of course, the midpoint of the segment $[AB]$. This medium is obtained with |L.AB.mid|. Note that |L.AB.pa = z.A| and |L.AB.pb = z.B|. Finally, if a line $L$ is the result of a method, you can obtain the points with |z.A,z.B = get_points (L)| or with the previous remark.
+Writing |L.AB = line: new (z.A,z.B)| creates an object of the class \tkzname{line} (the notation is arbitrary for the moment). Geometrically, it represents both the line passing through the points $A$ and $B$ as the segment $[AB]$. Thus, we can use the midpoint of |L.AB|, which is, of course, the midpoint of the segment $[AB]$. This medium is obtained with |L.AB.mid|. Note that |L.AB.pa = z.A| and |L.AB.pb = z.B|. Finally, if a line $L$ is the result of a method, you can obtain the points with |z.A,z.B = get_points (L)| or with the previous remark.
\begin{mybox}
Creation |L.AB = line : new ( z.A , z.B ) |
@@ -26,15 +26,15 @@ 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 & 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}{slope} & Slope of the line & Refer to (\ref{ssub:example_class_line})\\
+\Iattr{line}{length} &|l = L.AB.length|&Refer to (\ref{sub:transfer_from_lua_to_tex} ; \ref{ssub:example_class_line})\\
+\Iattr{line}{north\_pa} & &Refer to (\ref{ssub:example_class_line}) \\
\Iattr{line}{north\_pb} & &\\
\Iattr{line}{south\_pa} & &\\
-\Iattr{line}{south\_pb} & &See (\ref{ssub:example_class_line}) \\
+\Iattr{line}{south\_pb} & &Refer to (\ref{ssub:example_class_line}) \\
\Iattr{line}{east} & &\\
\Iattr{line}{west} & &\\
-\Iattr{line}{vec} & |V.AB = L.AB.vec|& defines $\overrightarrow{AB}$ See (\ref{sec:class_vector})\\
+\Iattr{line}{vec} & |V.AB = L.AB.vec|& defines $\overrightarrow{AB}$ Refer to (\ref{sec:class_vector})\\
\bottomrule
\end{tabular}
\egroup
@@ -42,7 +42,7 @@ The attributes are :
\subsubsection{Example: attributes of class line} % (fold)
\label{ssub:example_class_line}
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale = .5
z.a = point: new (1, 1)
@@ -66,7 +66,7 @@ The attributes are :
\tkzLabelSegment[sloped](a,b){ab = \tkzUseLua{len}}
\tkzLabelSegment[above=12pt,sloped](a,b){slope of (ab) = \tkzUseLua{sl}}
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}\begin{tkzelements}
scale = .5
@@ -101,14 +101,14 @@ len = L.ab.length
\subsubsection{Method \Imeth{line}{new} and line attributes}
\label{ssub:example_line_attributes}
-Notation |L| or |L.AB| or |L.euler|. The notation is actually free.
+The notation can be |L| or |L.AB| or |L.euler|. The notation is actually free.
|L.AB| can also represent the segment.
With | L.AB = line : new (z.A,z.B)|, a line is defined.
\begin{minipage}{0.5\textwidth}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new (1,1)
z.B = point : new (3,2)
@@ -124,7 +124,7 @@ With | L.AB = line : new (z.A,z.B)|, a line is defined.
\tkzMarkRightAngle(B,A,C)
\tkzMarkSegments(A,C A,B A,D)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tkzelements}
@@ -150,7 +150,7 @@ With | L.AB = line : new (z.A,z.B)|, a line is defined.
\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. The triangles obtained are similar to the triangles defined below.
+Here's the list of methods for the \tkzNameObj{line} object. The results can be real numbers, points, lines, circles or triangles. The triangles obtained are similar to the triangles defined below.
\begin{minipage}{\textwidth}
\bgroup
@@ -161,46 +161,56 @@ Here's the list of methods for the \tkzNameObj{line} object. The results are eit
\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})\\
+\Igfct{line}{new(pt, pt)} & |L.AB = line : new(z.A,z.B)| & Create line $(AB)$ ; Refer to (\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)|}\\
+\Imeth{line}{gold\_ratio ()} & |z.C=L.AB : gold_ratio()| & Refer to (\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)$ Refer to (\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)| & Refer to (\ref{ssub:barycenter_with_a_line})\\
+\Imeth{line}{point (r)} & |z.C=L.AB : point (2)| & $\overrightarrow{AC} = 2\overrightarrow{AB}$ Refer to (\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)| & Refer to (\ref{sub:bankoff_circle})\\
+\Imeth{line}{harmonic\_ext (pt)} & |z.D=L.AB : harmonic_ext (z.C)| & Refer to (\ref{sub:bankoff_circle})\\
+\Imeth{line}{harmonic\_both (r)} & |z.C,z.D=L.AB : harmonic_both|($\varphi$) & \ref{sub:harmonic_division_with_tkzphi}\\
+\Imeth{line}{\_east(d)} & |z.M=L.AB : _east(2)| & |BM = 2| $A,B,M$ aligned \\
+\Imeth{line}{\_west(d)} & |z.M=L.AB : _east(2)| & |BM = 2| $A,B,M$ aligned \\
+\Imeth{line}{\_north\_pa(d)} &|z.M=L.AB: _north_pa(2)| &|AM=2| $AM\perp AB$ ; $\overrightarrow{AB},\overrightarrow{AM}$ counterclockwise \\
+\Imeth{line}{\_south\_pa(d)} &|z.M=L.AB:_south_pa(2)| &|AM=2|; $AM\perp AB$ ; $\overrightarrow{AB},\overrightarrow{AM}$ clockwise \\
+\Imeth{line}{\_north\_pb(d)} &|z.M=L.AB:_north_pb(2)| &|BM=2|; $BM\perp BA$ ; $\overrightarrow{BA},\overrightarrow{BM}$ clockwise \\
+\Imeth{line}{\_south\_pb(d)} &|z.M=L.AB:_south_pb(2)| &|BM=2|; $BM\perp BA$ ; $\overrightarrow{AB},\overrightarrow{AM}$ counterclockwise \\
+\Imeth{line}{report(d,pt)} &|z.M=L.AB:report(2,z.N)| &|MN=2|; $AB\parallel MN$ ; Refer to ex. (\ref{ssub:method_report})\\
\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)$\\
+\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}{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} Refer to (\ref{ssub:triangle_with_two__angles}) \\
+\Imeth{line}{school ()} & 30°,60°, 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 ()| &
+\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$ ; $(\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}{egyptian ()} & & \\
\Imeth{line}{cheops ()} & & \\
+\midrule
+\textbf{Squares}&&\\
+\midrule
+\Imeth{line}{square ()} &|S.AB=L.AB : square () | & create a square |S.AB|.\footnote{ |_,_,z.C,z.D = get_points(S.AB)|}\\
\bottomrule
\end{tabular}
\egroup
@@ -229,7 +239,7 @@ Here's the list of methods for the \tkzNameObj{line} object. The results are eit
\midrule
\textbf{Miscellaneous} &&\\
\midrule
-\Imeth{line}{distance (pt)} & |d = L.Ab : distance (z.C)| & see \ref{ssub:example_distance_and_projection}\\
+\Imeth{line}{distance (pt)} & |d = L.Ab : distance (z.C)| & Refer to \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$] \\
@@ -238,8 +248,46 @@ Here's the list of methods for the \tkzNameObj{line} object. The results are eit
\egroup
\end{minipage}
-\vspace{1 em}
-Here are a few examples.
+\subsubsection{Method report} % (fold)
+\label{ssub:method_report}
+
+|report (d,pt)| If the point is absent, the transfer is made from the first point that defines the line.
+
+\begin{minipage}{.5\textwidth}
+ \begin{Verbatim}
+ \begin{tkzelements}
+ z.A = point : new (1,-1)
+ z.B = point : new (5,0)
+ L.AB = line : new ( z.A , z.B )
+ z.M = point : new (2,3)
+ z.N = L.AB : report (3,z.M)
+ z.O = L.AB : report (3)
+ \end{tkzelements}
+ \begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawSegments(A,B M,N)
+ \tkzDrawPoints(A,B,M,N,O)
+ \tkzLabelPoints(A,B,M,N,O)
+ \end{tikzpicture}
+ \end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+ \begin{tkzelements}
+z.A = point : new (1,-1)
+z.B = point : new (5,0)
+L.AB = line : new ( z.A , z.B )
+z.M = point : new (2,3)
+z.N = L.AB : report (3,z.M)
+z.O = L.AB : report (3)
+\end{tkzelements}
+\begin{tikzpicture}
+\tkzGetNodes
+\tkzDrawSegments(A,B M,N)
+\tkzDrawPoints(A,B,M,N,O)
+\tkzLabelPoints(A,B,M,N,O)
+\end{tikzpicture}
+\end{minipage}
+% subsubsection method_report (end)
\subsubsection{Triangle with two\_angles} % (fold)
\label{ssub:triangle_with_two__angles}
@@ -247,7 +295,7 @@ Here are a few examples.
The angles are on either side of the given segment
\begin{minipage}{.4\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
z.B = point : new ( 4 , 0 )
@@ -262,7 +310,7 @@ The angles are on either side of the given segment
\tkzLabelPoints(A,B)
\tkzLabelPoints[above](C)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.6\textwidth}
\begin{tkzelements}
@@ -290,9 +338,8 @@ The angles are on either side of the given segment
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{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 )
@@ -306,18 +353,18 @@ In the following example, a small difficulty arises. The given lengths are not a
\tkzLabelPoints(A,B)
\tkzLabelPoints[above](C)
\end{tikzpicture}
-\end{verbatim}
+\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]
+\hspace{\fill}
+ \begin{tikzpicture}[gridded]
\tkzGetNodes
\tkzDrawPolygons(A,B,C)
\tkzDrawPoints(A,B,C)
@@ -333,9 +380,9 @@ In the following example, a small difficulty arises. The given lengths are not a
In some cases, two solutions are possible.
\begin{minipage}{.4\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
- scale =1.2
+ scale =1
z.A = point : new ( 0 , 0 )
z.B = point : new ( 5 , 0 )
L.AB = line : new ( z.A , z.B )
@@ -349,15 +396,15 @@ In some cases, two solutions are possible.
\tkzDrawPoints(A,B,C,D)
\tkzLabelPoints(A,B)
\tkzLabelPoints[above](C,D)
- \tkzLabelAngle(C,B,A){$\pi/3$}
+ \tkzLabelAngle[teal](C,B,A){$\pi/6$}
\tkzLabelSegment[below left](A,C){$7$}
\tkzLabelSegment[below left](A,D){$7$}
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.6\textwidth}
\begin{tkzelements}
- scale =1.2
+ scale =1
z.A = point : new ( 0 , 0 )
z.B = point : new ( 5 , 0 )
L.AB = line : new ( z.A , z.B )
@@ -371,7 +418,7 @@ In some cases, two solutions are possible.
\tkzDrawPoints(A,B,C,D)
\tkzLabelPoints(A,B)
\tkzLabelPoints[above](C,D)
- \tkzLabelAngle(C,B,A){$\pi/3$}
+ \tkzLabelAngle[teal](C,B,A){$\pi/6$}
\tkzLabelSegment[below left](A,C){$7$}
\tkzLabelSegment[below left](A,D){$7$}
\end{tikzpicture}
@@ -398,7 +445,7 @@ The side lengths are proportional to the lengths given in the table. They depend
\end{tabular}
\begin{minipage}{.4\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
z.B = point : new ( 4 , 0 )
@@ -422,7 +469,7 @@ The side lengths are proportional to the lengths given in the table. They depend
\tkzDrawPoints(A,...,H)
\tkzLabelPoints(A,...,H)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.6\textwidth}
\begin{tkzelements}
@@ -462,7 +509,7 @@ This method exists for all objects except quadrilaterals.
\begin{minipage}{.4\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new (-1,-1)
z.B = point : new (1,1)
@@ -477,7 +524,7 @@ This method exists for all objects except quadrilaterals.
\tkzDrawPoints(A,B,I,J,K)
\tkzLabelPoints(A,B,I,J,K)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.6\textwidth}
\begin{tkzelements}
@@ -502,22 +549,22 @@ 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 (5, 4)
- L.ab = line : new (z.a,z.b)
- z.c = L.ab : normalize ()
- \end{tkzelements}
+\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}
+\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}
@@ -543,7 +590,7 @@ This method exists for all objects except quadrilaterals.
\label{ssub:barycenter_with_a_line}
\begin{minipage}{.4\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , -1 )
z.B = point : new ( 4 , 2 )
@@ -556,7 +603,7 @@ This method exists for all objects except quadrilaterals.
\tkzDrawPoints(A,B,G)
\tkzLabelPoints(A,B,G)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.6\textwidth}
\begin{tkzelements}
@@ -577,7 +624,7 @@ This method exists for all objects except quadrilaterals.
\subsubsection{Example: new line from a defined line} % (fold)
\label{ssub:new_line_from_a_defined_line}
\begin{minipage}{0.5\textwidth}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
scale = 1.25
z.A = point : new (1,1)
@@ -597,7 +644,7 @@ This method exists for all objects except quadrilaterals.
\tkzMarkRightAngle(B,A,C)
\tkzMarkSegments(A,C A,B A,D)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tkzelements}
@@ -629,7 +676,7 @@ _,z.E = get_points ( L.CD: ll_from (z.B))
\subsubsection{Example: projection of several points} % (fold)
\label{ssub:example_projection_of_several_points}
\begin{minipage}{0.5\textwidth}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
scale = .8
z.a = point: new (0, 0)
@@ -645,7 +692,7 @@ _,z.E = get_points ( L.CD: ll_from (z.B))
\tkzDrawPoints(a,...,d,c',d')
\tkzLabelPoints(a,...,d,c',d')
\end{tikzpicture}
- \end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tkzelements}
@@ -674,7 +721,7 @@ z.cp,z.dp = L.ab : projection(z.c,z.d)
\label{ssub:example_combination_of_methods}
\begin{minipage}{0.6\textwidth}
-\begin{tkzexample}[small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new (0 , 0)
z.B = point: new (6 , 0)
@@ -699,9 +746,11 @@ z.cp,z.dp = L.ab : projection(z.c,z.d)
\tkzFillAngles[teal!30,opacity=.4](A,C,B b,A,B A,O,H)
\tkzMarkAngles[mark=|](A,C,B b,A,B A,O,H H,O,B)
\tkzDrawPoints(A,B,C,H,O)
- \tkzLabelPoints(A,B,C,H,O)
+ \tkzLabelPoints(B,H)
+ \tkzLabelPoints[above](O,C)
+ \tkzLabelPoints[left](A)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{0.4\textwidth}
\begin{tkzelements}
@@ -730,7 +779,9 @@ z.a,z.b = L.ab.pa,L.ab.pb
\tkzFillAngles[teal!30,opacity=.4,,size=.5](A,C,B b,A,B A,O,H)
\tkzMarkAngles[mark=|,size=.5](A,C,B b,A,B A,O,H H,O,B)
\tkzDrawPoints(A,B,C,H,O)
-\tkzLabelPoints(A,B,C,H,O)
+\tkzLabelPoints(B,H)
+\tkzLabelPoints[above](O,C)
+\tkzLabelPoints[left](A)
\end{tikzpicture}
\hspace*{\fill}
\end{minipage}
@@ -741,7 +792,7 @@ z.a,z.b = L.ab.pa,L.ab.pb
\label{ssub:example_translation}
\begin{minipage}{0.6\textwidth}
-\begin{tkzexample}[small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new (0,0)
z.B = point: new (1,2)
@@ -756,7 +807,7 @@ z.a,z.b = L.ab.pa,L.ab.pb
\tkzLabelPoints(A,...,F)
\tkzDrawSegments[->,red,> =latex](C,E D,F A,B)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{0.4\textwidth}
\begin{tkzelements}
@@ -783,7 +834,7 @@ z.a,z.b = L.ab.pa,L.ab.pb
\label{ssub:example_distance_and_projection}
\begin{minipage}{0.5\textwidth}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new (0 , 0)
z.B = point : new (5 , -2)
@@ -800,7 +851,7 @@ z.a,z.b = L.ab.pa,L.ab.pb
\tkzLabelSegment[above left,
draw](C,H){$CH = \tkzUseLua{d}$}
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tkzelements}
@@ -829,26 +880,26 @@ z.a,z.b = L.ab.pa,L.ab.pb
\label{ssub:reflection_of_object}
\begin{minipage}{.5\textwidth}
- \begin{verbatim}
- \begin{tkzelements}
- z.A = point : new ( 0 , 0 )
- z.B = point : new ( 4 , 1 )
- z.E = point : new ( 0 , 2 )
- z.F = point : new ( 3 , 3 )
- z.G = point : new ( 4 , 2 )
- L.AB = line : new ( z.A , z.B )
- T.EFG = triangle : new (z.E,z.F,z.G)
- T.new = L.AB : reflection (T.EFG)
- z.Ep,z.Fp,z.Gp = get_points(T.new)
- \end{tkzelements}
- \begin{tikzpicture}
- \tkzGetNodes
- \tkzDrawLine(A,B)
- \tkzDrawPolygon(E,F,G)
- \tkzDrawPolygon[new](E',F',G')
- \tkzDrawSegment[red,dashed](E,E')
- \end{tikzpicture}
- \end{verbatim}
+\begin{Verbatim}
+\begin{tkzelements}
+ z.A = point : new ( 0 , 0 )
+ z.B = point : new ( 4 , 1 )
+ z.E = point : new ( 0 , 2 )
+ z.F = point : new ( 3 , 3 )
+ z.G = point : new ( 4 , 2 )
+ L.AB = line : new ( z.A , z.B )
+ T.EFG = triangle : new (z.E,z.F,z.G)
+ T.new = L.AB : reflection (T.EFG)
+ z.Ep,z.Fp,z.Gp = get_points(T.new)
+\end{tkzelements}
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawLine(A,B)
+ \tkzDrawPolygon(E,F,G)
+ \tkzDrawPolygon[new](E',F',G')
+ \tkzDrawSegment[red,dashed](E,E')
+\end{tikzpicture}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -876,7 +927,7 @@ 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{Verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
z.B = point : new ( 6 , 0 )
@@ -901,7 +952,7 @@ z.a,z.b = L.ab.pa,L.ab.pb
\tkzMarkRightAngle[opacity=.3,fill=lightgray](O,P,C)
\tkzMarkAngles[mark=||](A,P,D D,P,B)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-matrices.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-matrices.tex
new file mode 100644
index 0000000000..04b874532d
--- /dev/null
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-matrices.tex
@@ -0,0 +1,1013 @@
+\newpage\section{Class \Iclass{matrix}} % (fold)
+\label{sec:matrices}
+
+The \code{matrix} class is currently experimental, and its attribute and method names have not yet been finalized, indicating that this class is still evolving. Certain connections have been made with other classes, such as the \code{point} class. Additionally, a new attribute, \code{mtx}, has been included, associating a column matrix with the point, where the elements correspond to the point's coordinates in the original base. Similarly, an attribute has been added to the \code{vector} class, where \code{mtx} represents a column matrix consisting of the two affixes that compose the vector.
+
+This \code{matrix} class has been created to avoid the need for an external library, and has been adapted to plane transformations. It allows you to use complex numbers.
+
+\lefthand\ To display matrices, you'll need to load the \pkg{amsmath} package.
+
+{\color{red}\lefthand\ } While some methods are valid for any matrix size, the majority are reserved for square matrices of order 2 and 3.
+
+
+\subsection{Matrix creation} % (fold)
+\label{sub:matrix_creation}
+
+\begin{itemize}
+
+\item The first method is: (Refer to \ref{ssub:method_new})
+
+ \begin{minipage}{.5\textwidth}
+ \begin{mybox}
+ |M = matrix: new ({{a,b},{c,d}}) | \\
+ or |M = matrix: new {{a,b},{c,d}} | \\
+ a, b, c, et d being real or complex numbers.
+ \end{mybox}
+ \end{minipage}
+ \begin{minipage}{.5\textwidth}
+ \begin{tkzelements}
+ M = matrix: new {{a,b},{c,d}}
+ tex.print('M = ') M : print ()
+ \end{tkzelements}
+
+ \end{minipage}
+
+
+\item It is also possible to obtain a square matrix with: (Refer to \ref{ssub:method_square})
+
+ \begin{mybox}
+ |M = matrix : square (2,a,b,c,d)|
+ \end{mybox}
+
+\item In the case of a column vector: (Refer to \ref{ssub:method_vector})
+
+\begin{minipage}{.5\textwidth}
+ \begin{mybox}
+ |V = matrix : vector (1,2,3)|
+ \end{mybox}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+ \begin{tkzelements}
+ V = matrix : vector (1,2,3) tex.print('V = ') V : print ()
+ \end{tkzelements}
+\end{minipage}
+
+\item Homogeneous transformation matrix (Refer to \ref{ssub:method_htm})
+
+ The objective is to generate a matrix with homogeneous coordinates capable of transforming a coordinate system through rotation, translation, and scaling. To achieve this, it is necessary to define both the rotation angle, the coordinates of the new origin ans the scaling factors.
+
+\begin{minipage}{.5\textwidth}
+ \begin{mybox}
+ |H = matrix : htm (math.pi/3,1,2,2,1)|
+ \end{mybox}
+ \end{minipage}
+\begin{minipage}{.5\textwidth}
+ \begin{tkzelements}
+ H = matrix : htm (math.pi/3,1,2,2,1)
+ tex.print('H = ') H: print ()
+ \end{tkzelements}
+ \end{minipage}
+
+\end{itemize}
+% subsection matrix_creation (end)
+
+\subsection{Display a matrix: method \code{print}} % (fold)
+\label{sub:display_a_matrix_method_print}
+
+
+This method (Refer to \ref{ssub:method_print}) is necessary to control the results, so here are a few explanations on how to use it. It can be used on real or complex matrices, square or not. A few options allow you to format the results. You need to load the \pkg{amsmath} package to use the "print" method. Without this package, it is possible to display the contents of the matrix without formatting with |print_array (M)|
+
+\begin{minipage}{.5\textwidth}
+\begin{Verbatim}
+ \begin{tkzelements}
+ M = matrix : new {{1,-1},{2,0}}
+ M : print ()
+ \end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+ \begin{tkzelements}
+ M = matrix : new {{1,-1},{2,0}}
+ M : print ()
+ \end{tkzelements}
+\end{minipage}
+
+
+% subsection display_a_matrix_method_print (end)
+
+
+\subsection{Attibutes of a matrix} % (fold)
+\label{sub:attibutes_of_a_matrix}
+
+
+
+\bgroup
+\catcode`_=12
+\small
+\captionof{table}{Matrix attributes.}\label{matrix:att}
+\begin{tabular}{lll}
+\toprule
+\textbf{Attributes} & \textbf{Application} &\\
+\Iattr{matrix}{set} & |M.set = {{a,b},{c,d}}| & table of tables\\
+\Iattr{matrix}{rows} & |M.rows| & number of rows\\
+\Iattr{matrix}{cols} & |M.cols| & number of columns\\
+\Iattr{matrix}{type} & |M.type = "matrix"| & the type of object \\
+\Iattr{matrix}{det} & |M.det| & determinant of a square matrix or |nil|\\
+\bottomrule %
+\end{tabular}
+\egroup
+
+
+
+\subsubsection{Attribute \code{set}} % (fold)
+\label{sub:attribute_set}
+A simple array such as |{{1,2},{2,-1}}| is often considered a "matrix". In "tkz-elements", we'll consider |M| defined by |matrix : new ({{1,1},{0,2}})| as a matrix and |M.set| as an array (|M.set = {{1,1},{0,2}}|).
+
+You can access a particular element of the matrix, for example: |M.set[2][1]| gives \tkzUseLua{M.set[2][2]}.
+
+|\tkzUseLua{M.set[2][1]}| is the expression that displays $2$.
+
+The number of rows is accessed with |M.rows| and the number of columns with |M.cols|, here's an example:
+
+\vspace{.5em}
+\begin{minipage}{.5\textwidth}
+\begin{Verbatim}
+\begin{tkzelements}
+M = matrix : new ({{1,2,3},{4,5,6}})
+M : print ()
+tex.print("Rows: "..M.rows)
+tex.print("Cols: "..M.cols)
+\end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+\begin{tkzelements}
+M = matrix : new ({{1,2,3},{4,5,6}})
+M : print ()
+tex.print("Rows: "..M.rows)
+tex.print("Cols: "..M.cols)
+\end{tkzelements}
+\end{minipage}
+% subsubsection attribute_set (end)
+
+\subsubsection{Determinant with real numbers} % (fold)
+\label{ssub:determinant_matrix}
+The matrix must be square. This library was created for matrices of dimension 2 or 3, but it is possible to work with larger sizes. |det| is an attribute of the "matrix" object, but the determinant can also be obtained with the function |determinant(M)|.
+
+\vspace{.5em}
+\begin{minipage}{.6\textwidth}
+\begin{Verbatim}
+ \begin{tkzelements}
+ M = matrix : square (3,1,1,0,2,-1,-2,1,-1,2)
+ M : print ()
+ tex.print ('\\\\')
+ tex.print ("Its determinant is: " .. M.det)
+ \end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.4\textwidth}
+\begin{tkzelements}
+M = matrix : square (3,1,1,0,2,-1,-2,1,-1,2)
+M : print ()
+tex.print ('\\\\')
+tex.print ("Its determinant is: "..M.det)
+\end{tkzelements}
+\end{minipage}
+% subsubsection determinant (end)
+
+\subsubsection{Determinant with complex numbers} % (fold)
+\label{ssub:determinant_with_complex_numbers}
+
+\begin{minipage}{.5\textwidth}
+\begin{Verbatim}
+\begin{tkzelements}
+ a = point :new (1,-2)
+ b = point :new (0,1)
+ c = point :new (1,1)
+ d = point :new (1,-1)
+ A = matrix : new ({{a, b}, {c,d}})
+ tex.print(tostring(A.det))
+\end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+\begin{tkzelements}
+ a = point :new (1,-2)
+ b = point :new (0,1)
+ c = point :new (1,1)
+ d = point :new (1,-1)
+ A = matrix : new ({{a, b}, {c,d}})
+ tex.print(tostring(A.det))
+\end{tkzelements}
+\end{minipage}
+% subsubsection determinant_with_complex_numbers (end)
+% subsection attibutes_of_a_matrix (end)
+
+
+
+
+\subsection{Metamethods for the matrices} % (fold)
+\label{sub:metamethods_for_the_matrices}
+Conditions on matrices must be valid for certain operations to be possible.
+
+\bgroup
+\catcode`_=12
+\small
+\begin{minipage}{\textwidth}
+\captionof{table}{Matrix metamethods.}\label{matrix:meta}
+\begin{tabular}{lll}
+ \toprule
+ \textbf{Metamethods} & \textbf{Application} \\
+ \midrule
+\_\_\Immeth{matrix}{add(M1,M2)} & |M1 + M2| & \\
+\_\_\Immeth{matrix}{sub(M1,M2)} & |M1 - M2| & \\
+\_\_\Immeth{matrix}{unm(M} & |- M| & \\
+\_\_\Immeth{matrix}{mul(M1,M2)} & |M1 * M2| & \\
+\_\_\Immeth{matrix}{pow(M,n)} & |M ^ n| & n integer > or < 0 or |'T'|\\
+\_\_\Immeth{matrix}{tostroing(M,n)} & tex.print(tostring(M)) & displays the matrix \\
+\_\_\Immeth{matrix}{eq(M1,M2)} & true or false & \\
+\bottomrule
+\end{tabular}
+\end{minipage}
+\egroup
+
+\subsubsection{Addition and subtraction of matrices} % (fold)
+\label{ssub:addition_of_matrices}
+To simplify the entries, I've used a few functions to simplify the displays.
+
+\vspace{.5em}
+\begin{minipage}{.6\textwidth}
+\begin{Verbatim}
+\begin{tkzelements}
+ A = matrix : new ({{1,2},{2,-1}})
+ B = matrix : new ({{-1,0},{1,3}})
+ S = A + B
+ D = A - B
+ dsp(A,'A')
+ nl() nl()
+ dsp(B,'B')
+ nl() nl()
+ dsp(S,'S') sym(" = ") dsp(A) sym(' + ') dsp(B)
+ nl() nl()
+ dsp(D,'D') sym(" = ") dsp(A) sym(' - ') dsp(B)
+\end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.4\textwidth}
+\begin{tkzelements}
+ local function dsp (M,name)
+ if name then
+ tex.print(name..' = ')print_matrix(M)
+ else print_matrix(M)
+ end
+ end
+ local function sym (s)
+ tex.print(' '..s..' ')
+ end
+ local function nl ()
+ tex.print('\\\\')
+ end
+
+ A = matrix : new ({{1,2},{2,-1}})
+ B = matrix : new ({{-1,0},{1,3}})
+ S = A + B
+ D = A - B
+dsp(A,'A')
+nl() nl()
+dsp(B,'B')
+nl() nl()
+dsp(S,'S') sym(" = ") dsp(A) sym(' + ') dsp(B)
+nl() nl()
+dsp(D,'D') sym(" = ") dsp(A) sym(' - ') dsp(B)
+\end{tkzelements}
+\end{minipage}
+% subsubsection addition_of_matrices (end)
+
+
+\subsubsection{Multiplication and power of matrices} % (fold)
+\label{ssub:multiplication_of_matrices}
+To simplify the entries, I've used a few functions. You can find their definitions in the sources section of this documentation.
+
+\begin{minipage}{.5\textwidth}
+ \begin{Verbatim}
+ \begin{tkzelements}
+ A = matrix : new ({{1,2},{2,-1}})
+ B = matrix : new ({{-1,0},{1,3}})
+ P = A * B
+ I = A^-1
+ C = A^3
+ K = 2 * A
+ T = A^'T'
+ \end{tkzelements}
+ \end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+\begin{tkzelements}
+ local function dsp (M,name)
+ if name then
+ tex.print(name..' = ')print_matrix(M)
+ else print_matrix(M) end
+ end
+ local function sym (s)
+ tex.print(' '..s..' ')
+ end
+ local function nl ()
+ tex.print('\\\\')
+ end
+ A = matrix : new ({{1,2},{2,-1}})
+ B = matrix : new ({{-1,0},{1,3}})
+ P = A * B
+ I = A ^-1
+ C = A ^3
+ K = 2 * A
+ dsp(P,'P') sym(" = ") dsp(A) sym(' * ') dsp(B)
+ nl() nl()
+ dsp(A^-1,'$A^{-1}$')
+ nl() nl()
+ dsp(K,'K')
+ nl() nl()
+ dsp(A^('T'),"$A^{T}$")
+ nl() nl()
+\end{tkzelements}
+\end{minipage}
+
+\subsubsection{Metamethod \code{eq}} % (fold)
+\label{ssub:metamthod_eq}
+Test whether two matrices are equal or identical.
+% subsubsection metamthod_eq (end)
+% subsubsection multiplication_of_matrices (end)
+% subsection metamethods_for_the_matrices (end)
+
+
+\subsection{Methods of the class matrix} % (fold)
+\label{sub:methods_of_the_class_matrix}
+
+\bgroup
+\catcode`_=12
+\small
+\captionof{table}{Matrix methods.}\label{matrix:met}
+\begin{tabular}{lll}
+\toprule
+\textbf{Functions} & \textbf{Comments} & \\
+\midrule
+\Igfct{matrix}{new(...)} & |M = matrix : new ({{1,2},{2,-1}})| & \\
+\Igfct{matrix}{square()} & |M = matrix : square (2,1,2,2,-1)| & \\
+\Igfct{matrix}{vector()} & |M = matrix : vector (2,1)| & \\
+\Igfct{matrix}{htm()} & |M = matrix : htm (2,1,2,2,-1)| & \\
+\midrule
+\textbf{Methods} & \textbf{Comments} & \\
+\midrule
+\Imeth{matrix}{print(s,n)} & |M : print ()| & s='matrix' or ... default 'bmatrix' \\
+\Imeth{matrix}{htm\_apply(...)} & |M : htm_apply (...)| & \\
+\Imeth{matrix}{get()} & |M : get (i,j)| & i = raws , j = cols Refer to \ref{ssub:get_an_element_of_a_matrix} \\
+\Imeth{matrix}{inverse()} & |M : inverse ()| & \\
+\Imeth{matrix}{adjugate()} & |M : adjugate ()| & \\
+\Imeth{matrix}{transpose()} & |M : transpose ()| & \\
+\Imeth{matrix}{is\_diagonal()} & |true or false| & result :boolean \\
+\Imeth{matrix}{is\_orthogonal()} & |true or false| & \\
+\Imeth{matrix}{homogenization()} & |M : homogenization ()| & \\
+\bottomrule
+\end{tabular}
+\egroup
+
+\subsubsection{Function \code{new}} % (fold)
+\label{ssub:method_new}
+
+This is the main method for creating a matrix. Here's an example of a 2x3 matrix with complex coefficients:
+
+\vspace{.5em}
+\begin{minipage}{.5\textwidth}
+ \begin{Verbatim}
+ \begin{tkzelements}
+ a = point : new (1,0)
+ b = point : new (1,1)
+ c = point : new (-1,1)
+ d = point : new (0,1)
+ e = point : new (1,-1)
+ f = point : new (0,-1)
+ M = matrix : new ({{a,b,c},{d,e,f}})
+ M : print ()
+ \end{tkzelements}
+ \end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+\begin{tkzelements}
+a = point : new (1,0)
+b = point : new (1,1)
+c = point : new (-1,1)
+d = point : new (0,1)
+e = point : new (1,-1)
+f = point : new (0,-1)
+M = matrix : new ({{a,b,c},{d,e,f}})
+M : print ()
+\end{tkzelements}
+\end{minipage}
+% subsubsection method_new (end)
+
+
+\subsubsection{Function \code{vector}} % (fold)
+\label{ssub:method_vector}
+
+The special case of a column matrix, frequently used to represent a vector, can be treated as follows:
+
+\vspace{.5em}
+\begin{minipage}{.5\textwidth}
+ \begin{Verbatim}
+ \begin{tkzelements}
+ M = matrix : vector (1,2,3)
+ M : print ()
+ \end{tkzelements}
+ \end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+ \begin{tkzelements}
+ M = matrix : vector (1,2,3)
+ M : print ()
+ \end{tkzelements}
+\end{minipage}
+% subsubsection method_vector (end)
+
+\subsubsection{Method \code{homogenization}} % (fold)
+\label{ssub:method_homogenization}
+
+\code{homogenization} of vector: the aim is to be able to use a homogeneous transformation matrix
+
+Let's take a point $A$ such that |z.A = point : new (2,-1)|. In order to apply a \code{htm} matrix, we need to perform a few operations on this point. The first is to determine the vector (matrix) associated with the point. This is straightforward, since there's a point attribute called \code{mtx} which gives this vector:
+
+\begin{mybox}
+z.A = point : new (2,-1)\\
+V = z.A.mtx : homogenization ()
+\end{mybox}
+which gives:
+
+\begin{minipage}{.5\textwidth}
+ \begin{Verbatim}
+ \begin{tkzelements}
+ pi = math.pi
+ M = matrix : htm (pi/4 , 3 , 1)
+ z.A = point : new (2,-1)
+ V = z.A.mtx : homogenization ()
+ z.A.mtx : print ()
+ tex.print ('then after homogenization: ')
+ V : print ()
+ \end{tkzelements}
+ \end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+\begin{tkzelements}
+ pi = math.pi
+ M = matrix : htm (pi/4 , 3 , 1)
+ z.A = point : new (2,-1)
+ V = z.A.mtx : homogenization ()
+ z.A.mtx : print ()
+ tex.print ('then after homogenization: ')
+ V : print ()
+\end{tkzelements}
+\end{minipage}
+% subsubsection method_homogenization (end)
+
+
+\subsubsection{Function \code{htm}: homogeneous transformation matrix} % (fold)
+\label{ssub:method_htm}
+
+There are several ways of using this transformation. First, we need to create a matrix that can associate a rotation with a translation.
+
+The main method is to create the matrix:
+
+\begin{mybox}
+ pi = math.pi\\
+ M = matrix : htm (pi/4 , 3 , 1)
+\end{mybox}
+
+A 3x3 matrix is created which combines a $\pi/4$ rotation and a $\overrightarrow{t}=(3,1)$ translation.
+
+\begin{tkzelements}
+ pi = math.pi
+ M = matrix : htm (pi/4 , 3 , 1)
+ M : print ()
+\end{tkzelements}
+
+
+Now we can apply the matrix M. Let $A$ be the point defined here: \ref{ssub:method_homogenization}. By homogenization, we obtain the column matrix $V$.
+
+
+\begin{mybox}
+W = A * V
+\end{mybox}
+
+\begin{tkzelements}
+pi = math.pi
+M = matrix : htm (pi/4 , 3 , 1)
+M :print ()
+z.A = point : new (2,-1)
+V = z.A.mtx : homogenization ()
+V : print () tex.print('=')
+W = M * V
+W : print ()
+\end{tkzelements}
+
+All that remains is to extract the coordinates of the new point.
+% subsubsection method_htm (end)
+
+\subsubsection{Method \code {get\_htm\_point}} % (fold)
+\label{ssub:method_code_get__htm__point}
+
+In the previous section, we obtained the $W$ matrix. Now we need to obtain the point it defines.
+
+The method \code{get\_htm\_point} extracts a point from a vector obtained after applying a \code{htm} matrix.
+
+\begin{minipage}{.5\textwidth}
+\begin{verbatim}
+\begin{tkzelements}
+ W : print ()
+ z.P = get_htm_point(W)
+ tex.print("The affix of $P$ is: ")
+ tex.print(display(z.P))
+\end{tkzelements}
+\end{verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+\begin{tkzelements}
+ W : print ()
+ z.P = get_htm_point(W)
+ tex.print("The affix of $P$ is: ")
+ tex.print(display(z.P))
+\end{tkzelements}
+\end{minipage}
+% subsubsection method_code_get__htm__point (end)
+
+
+\subsubsection{Method \code{htm\_apply}} % (fold)
+\label{ssub:method_code_htm__apply}
+The above operations can be simplified by using the \code{htm\_apply} method directly at point $A$.
+
+\begin{mybox}
+|z.Ap = M: htm_apply (z.A)|\\
+% display (z.Ap)
+\end{mybox}
+
+Then the method \code{htm\_apply} transforms a point, a list of points or an object.
+
+ \begin{tkzelements}
+pi = math.pi
+M = matrix : htm (pi/4 , 3 , 1 )
+z.O = point : new (0,0)
+V.ori = z.O.mtx : homogenization ()
+z.I = point : new (1,0)
+z.J = point : new (0,1)
+z.A = point: new (2,0)
+z.B = point: new (1,2)
+L.AB = line : new (z.A,z.B)
+z.Op,z.Ip,z.Jp = M : htm_apply (z.O,z.I,z.J)
+L.ApBp = M : htm_apply (L.AB)
+z.Ap = L.ApBp.pa
+z.Bp = L.ApBp.pb
+z.K = point : new (2,2)
+T = triangle : new ( z.I , z.J , z.K )
+Tp = M : htm_apply (T)
+z.Kp = Tp.pc
+\end{tkzelements}
+
+\begin{minipage}{.6\textwidth}
+\begin{Verbatim}
+\begin{tkzelements}
+ pi = math.pi
+ M = matrix : htm (pi/4 , 3 , 1 )
+ z.O = point : new (0,0)
+ V.ori = z.O.mtx : homogenization ()
+ z.I = point : new (1,0)
+ z.J = point : new (0,1)
+ z.A = point: new (2,0)
+ z.B = point: new (1,2)
+ L.AB = line : new (z.A,z.B)
+ z.Op,z.Ip,z.Jp = M : htm_apply (z.O,z.I,z.J)
+ L.ApBp = M : htm_apply (L.AB)
+ z.Ap = L.ApBp.pa
+ z.Bp = L.ApBp.pb
+ z.K = point : new (2,2)
+ T = triangle : new ( z.I , z.J , z.K )
+ Tp = M : htm_apply (T)
+ z.Kp = Tp.pc
+\end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.4\textwidth}
+\begin{tikzpicture}[gridded]
+ \tkzGetNodes
+ \tkzDrawPoints(O,O',A,B,A',B',K,K')
+ \tkzLabelPoints(O,O',A,B,A',B',I,J,I',J',K,K')
+ \tkzDrawSegments[->](O,I O,J O',I' O',J')
+ \tkzDrawLines (A,B A',B')
+ \tkzDrawPolygons[red](I,J,K I',J',K')
+\end{tikzpicture}
+\end{minipage}
+
+\vspace{.5 em}
+
+New cartesian coordinates system:
+
+\vspace{.5 em}
+\begin{minipage}{.5\textwidth}
+\begin{verbatim}
+\begin{tkzelements}
+ pi = math.pi
+ tp = tex.print
+ nl = '\\\\'
+ a = point(1,0)
+ b = point(0,1)
+ R = matrix : htm (pi/5,2,1)
+ R : print () tp(nl)
+ v = matrix : vector (1,2)
+ v : print ()
+ v.h = v : homogenization ()
+ v.h : print () tp(nl)
+ V = R * v.h
+ V : print ()
+ z.N = get_htm_point(V)
+ tex.print(display(z.N))
+\end{tkzelements}
+\end{verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+ \begin{tkzelements}
+ pi = math.pi
+ tp = tex.print
+ nl = '\\\\'
+ a = point(1,0)
+ b = point(0,1)
+ R = matrix : htm (pi/5,2,1)
+ R : print () tp(nl)
+ v = matrix : vector (1,2)
+ v : print ()
+ v.h = v : homogenization ()
+ v.h : print () tp(nl)
+ V = R * v.h
+ V : print ()
+ z.N = get_htm_point(V)
+ tex.print(display(z.N))
+ \end{tkzelements}
+\end{minipage}
+
+% subsubsection method_code_htm__apply (end)
+
+
+
+\subsubsection{Function \code{square}} % (fold)
+\label{ssub:method_square}
+
+We have already seen this method in the presentation of matrices. We first need to give the order of the matrix, then the coefficients, row by row.
+
+\begin{minipage}{.5\textwidth}
+\begin{Verbatim}
+\begin{tkzelements}
+M = matrix : square (2,2,3,-5,4)
+M : print ()
+\end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+\begin{tkzelements}
+M = matrix : square (2,2,3,-5,4)
+M : print ()
+tex.print(S)
+\end{tkzelements}
+\end{minipage}
+
+% subsubsection method_square (end)
+
+\subsubsection{Method \Imeth{matrix}{print}} % (fold)
+\label{ssub:method_print}
+
+With the \pkg{amsmath} package loaded, this method can be used. By default, the \code{bmatrix} environment is selected, although you can choose from \code{matrix}, \code{pmatrix}, \code{Bmatrix}, "vmatrix", "Vmatrix". Another option lets you set the number of digits after the decimal point. The "tkz\_dc" global variable is used to set the number of decimal places. Here's an example:
+
+\vspace{.5em}
+\begin{Verbatim}
+\begin{tkzelements}
+ M = matrix : new ({{math.sqrt(2),math.sqrt(3)},{math.sqrt(4),math.sqrt(5)}})
+ M : print ('pmatrix')
+\end{tkzelements}
+\end{Verbatim}
+
+\begin{tkzelements}
+ M = matrix : new ({{math.sqrt(2),math.sqrt(3)},{math.sqrt(4),math.sqrt(5)}})
+ tkz_dc = 3
+ M : print ('pmatrix')
+\end{tkzelements}
+
+
+\vspace{.5em}
+You can also display the matrix as a simple array using the |print_array (M)| function. refer to the next example.
+
+In the case of a square matrix, it is possible to transmit a list of values whose first element is the order of the matrix.
+
+\vspace{.5em}
+\begin{minipage}{.5\textwidth}
+ \begin{Verbatim}
+ \begin{tkzelements}
+ M = matrix : square (2,1,0,0,2)
+ M : print ()
+ \end{tkzelements}
+ \end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+ \begin{tkzelements}
+ M = matrix : square (2,1,0,0,2)
+ M : print ()
+ \end{tkzelements}
+\end{minipage}
+% subsubsection method_print (end)
+
+\subsubsection{Display a table or array: function \code{print\_array}} % (fold)
+\label{ssub:display_a_table_or_array_function_code_print_array}
+
+We'll need to display results, so let's look at the different ways of displaying them, and distinguish the differences between arrays and matrices.
+
+Below, $A$ is an array. It can be displayed as a simple array or as a matrix, but we can't use the attributes and |A : print ()| is not possible because $A$ is not an object of the class \code{matrix}. If you want to display an array like a matrix you can use the function |print_matrix| (refer to the next example).
+
+\vspace{.5em}
+\begin{minipage}{.5\textwidth}
+\begin{Verbatim}
+\begin{tkzelements}
+ A = {{1,2},{1,-1}}
+ tex.print ('A = ') print_array (A)
+ tex.print (' or ')
+ print_matrix (A)
+ M = matrix : new ({{1,1},{0,2}})
+ tex.print ('\\\\')
+ tex.print ('M = ') M : print ()
+\end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+ \begin{minipage}{.5\textwidth}
+\begin{tkzelements}
+ A = {{1,2},{1,-1}}
+ tex.print ('A = ') print_array (A)
+ tex.print (' or ')
+ print_matrix (A)
+ M = matrix : new ({{1,1},{0,2}})
+ tex.print ('\\\\')
+ tex.print ('M = ') M : print ()
+\end{tkzelements}
+ \end{minipage}
+
+
+% subsubsection display_a_table_or_array_function_code_print_array (end)
+
+\subsubsection{Get an element of a matrix: method \Imeth{matrix}{get}} % (fold)
+\label{ssub:get_an_element_of_a_matrix}
+
+\begin{minipage}{.5\textwidth}
+\begin{Verbatim}
+ \begin{tkzelements}
+ M = matrix : new {{1,2},{2,-1}}
+ S = M: get(1,1) + M: get(2,2)
+ tex.print(S)
+ \end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+\begin{tkzelements}
+M = matrix : new {{1,2},{2,-1}}
+S = M: get(1,1) + M: get(2,2)
+tex.print(S)
+\end{tkzelements}
+\end{minipage}
+
+
+% subsubsection get_an_element_of_a_matrix (end)
+
+\subsubsection{Inverse matrix: : method \Imeth{matrix}{inverse}} % (fold)
+\label{ssub:inverse_matrix}
+
+\begin{minipage}{.6\textwidth}
+\begin{Verbatim}
+\begin{tkzelements}
+ A = matrix : new ({{1,2},{2,-1}})
+ tex.print("Inverse of $A = $")
+ B = A : inverse ()
+ B : print ()
+\end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.4\textwidth}
+\begin{tkzelements}
+ A = matrix : new ({{1,2},{2,-3}})
+ tex.print("Inverse of $A = $")
+ B = A : inverse ()
+ B : print ()
+\end{tkzelements}
+\end{minipage}
+% subsubsection inverse_matrix (end)
+
+\subsubsection{Inverse matrix with power syntax} % (fold)
+\label{ssub:inverse_matrix_with_power_syntax}
+
+\begin{minipage}{.6\textwidth}
+\begin{Verbatim}
+\begin{tkzelements}
+ M = matrix : new ({{1,0,1},{1,2, 1},{0,-1,2}})
+ tex.print("$M = $") print_matrix (M)
+ tex.print('\\\\')
+ tex.print("Inverse of $M = M^{-1} = $")
+ print_matrix (M^-1)
+\end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.4\textwidth}
+\begin{tkzelements}
+ M = matrix : new ({{1,0,1},{1,2,1},{0,-1,2}})
+ tex.print("$M = $") print_matrix (M) tex.print('\\\\')
+ tex.print("Inverse of $M = M^{-1} = $")
+ print_matrix (M^-1)
+\end{tkzelements}
+\end{minipage}
+% subsubsection inverse_matrix_with_power_syntax (end)
+
+
+\subsubsection{Transpose matrix: method \Imeth{matrix}{transpose}} % (fold)
+\label{ssub:transpose_matrix}
+
+A transposed matrix can be accessed with |A: transpose ()| or with |A^{'T'}|.
+
+\vspace{.5em}
+\begin{minipage}{.6\textwidth}
+ \begin{Verbatim}
+ \begin{tkzelements}
+ A = matrix : new ({{1,2},{2,-1}})
+ AT = A : transpose ()
+ tex.print("$A^{'T'} = $")
+ AT : print ()
+ \end{tkzelements}
+ \end{Verbatim}
+\end{minipage}
+\begin{minipage}{.4\textwidth}
+ \begin{tkzelements}
+ A = matrix : new ({{1,2},{2,-1}})
+ AT = A : transpose ()
+ tex.print("$A^{'T'} = $")
+ AT : print ()
+ \end{tkzelements}
+\end{minipage}
+
+\vspace{.5em}
+Remark: |(A ^'T')^'T' = A|
+
+% subsubsection transpose_matrix (end)
+% subsection methods_of_the_class_matrix (end)
+
+\subsubsection{Method method \Imeth{matrix}{adjugate}} % (fold)
+\label{ssub:method_adjugate}
+
+\begin{minipage}{.6\textwidth}
+\begin{Verbatim}
+\begin{tkzelements}
+ N = matrix : new {{1, 0, 3},{2, 1, 0},{-1, 2, 0}}
+ tex.print('N = ') print_matrix(N)
+ tex.print('\\\\')
+ N.a = N : adjugate ()
+ N.i = N * N.a
+ tex.print('adj(N) = ') N.a : print ()
+ tex.print('\\\\')
+ tex.print('N $\\times$ adj(N) = ') print_matrix(N.i)
+ tex.print('\\\\')
+ tex.print('det(N) = ') tex.print(N.det)
+\end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.4\textwidth}
+\begin{tkzelements}
+ N = matrix : new {{1, 0, 3},{2, 1, 0},{-1, 2, 0}}
+ tex.print('N = ') print_matrix(N)
+ N.a = N : adjugate ()
+ N.i = N * N.a
+ tex.print('adj(N) = ') N.a : print ()
+ tex.print('\\\\')
+ tex.print('N $\\times$ adj(N) = ') print_matrix(N.i)
+ tex.print('\\\\')
+ tex.print('det(N) = ') tex.print(N.det)
+\end{tkzelements}
+\end{minipage}
+
+% subsubsection method_adjugate (end)
+
+\subsubsection{Method method \Imeth{matrix}{identity}}% (fold)
+\label{ssub:methode_identity}
+
+Creating the identity matrix order 3
+
+
+\begin{minipage}{.5\textwidth}
+\begin{Verbatim}
+ \begin{tkzelements}
+ Id_3 = matrix : identity (3)
+ Id_3 : print ()
+ \end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+ \begin{tkzelements}
+Id_3 = matrix : identity (3)
+Id_3 : print ()
+\end{tkzelements}
+\end{minipage}
+% subsubsection methode_identity (end)
+
+
+\newpage
+
+\subsubsection{Diagonalization: method \code{diagonalize}} % (fold)
+\label{ssub:diagonalization}
+
+For the moment, this method only concerns matrices of order 2.
+
+\begin{minipage}{.5\textwidth}
+\begin{Verbatim}
+ \begin{tkzelements}
+ A = matrix : new {{5,-3}, {6,-4}}
+ tex.print('A = ') A : print ()
+ D,P = A : diagonalize ()
+ tex.print('D = ') D : print ()
+ tex.print('P = ') P : print ()
+ R = P^(-1)*A*P
+ tex.print('\\\\')
+ tex.print('Test: $D = P^{-1}AP = $ ')
+ R : print ()
+ tex.print('\\\\')
+ tex.print('Verification: $P^{-1}P = $ ')
+ T = P^(-1)*P
+ T : print ()
+ \end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+ \begin{tkzelements}
+ A = matrix : new {{5,-3}, {6,-4}}
+ tex.print('A = ') A : print ()
+ D,P = A : diagonalize ()
+ tex.print('D = ') D : print ()
+ tex.print('P = ') P : print ()
+ R = P^(-1)*A*P
+ tex.print('\\\\')
+ tex.print('Test: $D = P^{-1}AP = $ ')
+ R : print ()
+ tex.print('\\\\')
+ tex.print('Verification: $P^{-1}P = $ ')
+ T = P^(-1)*P
+ T : print ()
+ \end{tkzelements}
+\end{minipage}
+% subsubsection diagonalization (end)
+
+\subsubsection{Method \Imeth{matrix}{is\_orthogonal}} % (fold)
+\label{ssub:method_is_orthogonal}
+
+The method returns \code{true} if the matrix is orthogonal and \code{false} otherwise.
+
+\begin{Verbatim}
+ \begin{tkzelements}
+ local cos = math.cos
+ local sin = math.sin
+ local pi = math.pi
+ A = matrix : new ({{cos(pi/6),-sin(pi/6)}, {sin(pi/6),cos(pi/6)}})
+ A : print ()
+ bool = A : is_orthogonal ()
+ tex.print('\\\\')
+ if bool
+ then
+ tex.print("The matrix is orthogonal")
+ else
+ tex.print("The matrix is not orthogonal")
+ end
+ tex.print('\\\\')
+ tex.print('Test: $A^T = A^{-1} ?$')
+ print_matrix(transposeMatrix (A))
+ tex.print('=')
+ inv_matrix (A) : print ()
+ \end{tkzelements}
+\end{Verbatim}
+
+\begin{tkzelements}
+local cos = math.cos
+local sin = math.sin
+local pi = math.pi
+A = matrix : new ({{cos(pi/6),-sin(pi/6)}, {sin(pi/6),cos(pi/6)}})
+A : print ()
+bool = A : is_orthogonal ()
+tex.print('\\\\')
+if bool then tex.print("The matrix is orthogonal") else tex.print("The matrix is not orthogonal") end
+tex.print('\\\\')
+tex.print('Test: $A^T = A^{-1} ?$')
+print_matrix(transposeMatrix (A))
+tex.print('=')
+inv_matrix (A) : print ()
+\end{tkzelements}
+% subsubsection method_is_orthogonal (end)
+
+\subsubsection{Method \Imeth{matrix}{is\_diagonal}} % (fold)
+\label{ssub:method_is_diagonal}
+
+The method returns \code{true} if the matrix is diagonal and \code{false} otherwise.
+
+% subsubsection method_is_diagonal (end)
+
+% section matrices (end) \ No newline at end of file
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 d0867da269..c8c5cccd8f 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
@@ -17,10 +17,10 @@
%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}{length (a,b) } & point.abs(a-b) Refer to (\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}{get\_angle (z1,z2,z3)} & the vertex is z1 Refer to (\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 \\
@@ -31,6 +31,7 @@
\Igfct{math}{real (v) } & apply | value /scale | \\
\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 \\
+\Igfct{math}{solve\_quadratic (a,b,c) } & gives the solution of $ax^2+bx+c =0$ a,b,c real or complex (Refer to \ref{ssub:function_solve__quadratic})\\
\bottomrule
\end{tabular}
\egroup
@@ -44,7 +45,7 @@
\subsection{Harmonic division with tkzphi } % (fold)
\label{sub:harmonic_division_with_tkzphi}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
scale =.5
z.a = point: new(0,0)
@@ -58,7 +59,7 @@
\tkzDrawPoints(a,b,n,m)
\tkzLabelPoints(a,b,n,m)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
@@ -81,7 +82,7 @@
\subsection{Function islinear} % (fold)
\label{sub:function_islinear}
\begin{minipage}{0.5\textwidth}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.a = point: new (1, 1)
z.b = point: new (2, 2)
@@ -97,7 +98,7 @@
\tkzDrawPoints(a,...,d)
\tkzLabelPoints(a,...,d)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tkzelements}
@@ -130,7 +131,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 real }% (fold)
+\subsection{Function real }% (fold)
\label{ssub:function_real}
If |scale = 1.2| with a = 6 then real(a) = $6 / 1.2 = 5$ .
@@ -145,7 +146,7 @@ It's possible to transfer variable from Lua to \TEX{} with
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new (0 , 0)
z.B = point : new (3 , 2)
@@ -163,7 +164,7 @@ It's possible to transfer variable from Lua to \TEX{} with
\tkzLabelSegment[above right,draw](C,H){$CH = \tkzUseLua{d}$}
\tkzLabelSegment[below right,draw](A,B){$AB = \tkzUseLua{l}$}
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -189,7 +190,7 @@ It's possible to transfer variable from Lua to \TEX{} with
\subsection{Normalized angles : Slope of lines (ab), (ac) and (ad)} % (fold)
\label{sub:normalized_angles}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.a = point: new(0, 0)
z.b = point: new(-3, -3)
@@ -211,7 +212,7 @@ It's possible to transfer variable from Lua to \TEX{} with
\tkzDrawPoints(a,b,c,d)
\tkzLabelPoints(a,b,c,d)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
scale = .75
z.a = point: new(0, 0)
@@ -246,7 +247,7 @@ tex.print('slope normalized of (ad) : '..tostring(angle_normalize(angle))..'\\\\
The function |get_angle (a,b,c)| gives the angle normalized of $(\overrightarrow{ab},\overrightarrow{ac})$.
\begin{minipage}{0.6\textwidth}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.a = point: new(0, 0)
z.b = point: new(-2, -2)
@@ -265,7 +266,7 @@ The function |get_angle (a,b,c)| gives the angle normalized of $(\overrightarro
\tkzMarkAngle[->](b,a,c)
\tkzLabelAngle(b,a,c){\tkzUseLua{angbc}}
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{0.4\textwidth}
\begin{tkzelements}
@@ -296,7 +297,7 @@ The function |get_angle (a,b,c)| gives the angle normalized of $(\overrightarro
\label{sub:dot_or_scalar_product}
\begin{minipage}{0.5\textwidth}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new(0,0)
z.B = point: new(5,0)
@@ -315,7 +316,7 @@ The function |get_angle (a,b,c)| gives the angle normalized of $(\overrightarro
\tkzDrawPolygon[blue](A_1,B_1,C_1)
\tkzText[right](0,-1){dot product =\tkzUseLua{x}}
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tkzelements}
@@ -357,7 +358,7 @@ With the functions |islinear| and |isortho|. |islinear(z.a,z.b,z.c)| gives |true
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{Verbatim}
\begin{tkzelements}
z.a = point: new (0, 0)
z.b = point: new (5, -2)
@@ -381,7 +382,7 @@ These functions are useful if you don't need to create a useful triangle object
\tkzMarkAngle[<-](b,a,i)
\tkzLabelAngle[font=\tiny,pos=.75](b,a,i){\tkzUseLua{angic}}
\end{tikzpicture}
- \end{verbatim}
+ \end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -416,6 +417,51 @@ These functions are useful if you don't need to create a useful triangle object
Not documented because still in beta version: |parabola|, |Cramer22|, |Cramer33|.
% subsection other_functions (end)
+
+\subsubsection{Function solve\_quadratic} % (fold)
+\label{ssub:function_solve__quadratic}
+
+This function solves the equation $ax^2+bx+c= 0$ with real or complex numbers.
+
+\begin{minipage}{.6\textwidth}
+\begin{Verbatim}
+\begin{tkzelements}
+ tex.sprint('Solve : $x^2+1=0$ The solution set is ')
+ r1,r2 = solve_quadratic(1,0,1)
+ tex.print('\\{'..tostring(r1)..' , '..tostring(r2)..'\\}')
+ tex.print('\\\\')
+ tex.sprint('Solve : $x^2+2x-3=0$ The solution set is ')
+ r1,r2 = solve_quadratic(1,2,-3)
+ tex.print('\\{'..tostring(r1)..' , '..tostring(r2)..'\\}')
+ tex.print('\\\\')
+ a = point (0,1)
+ b = point (1,1)
+ c = point (-1,1)
+ tex.sprint('Solve : $ix^2+(1+i)x+(-1+i)=0$ The solution set is ')
+ r1,r2 = solve_quadratic(a,b,c)
+ tex.print('\\{'..tostring(r1)..' , '..tostring(r2)..'\\}')
+\end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+
+\begin{tkzelements}
+ tex.sprint('Solve : $x^2+1=0$ The solution set is ')
+ r1,r2 = solve_quadratic(1,0,1)
+ tex.print('\\{'..tostring(r1)..' , '..tostring(r2)..'\\}')
+ tex.print('\\\\')
+ tex.sprint('Solve : $x^2+2x-3=0$ The solution set is ')
+ r1,r2 = solve_quadratic(1,2,-3)
+ tex.print('\\{'..tostring(r1)..' , '..tostring(r2)..'\\}')
+ tex.print('\\\\')
+ a = point (0,1)
+ b = point (1,1)
+ c = point (-1,1)
+ tex.sprint('Solve : $ix^2+(1+i)x+(-1+i)=0$ The solution set is ')
+ r1,r2 = solve_quadratic(a,b,c)
+ tex.print('\\{'..tostring(r1)..' , '..tostring(r2)..'\\}')
+\end{tkzelements}
+
+% subsubsection function_solve__quadratic (end)
% section math_functions (end)
\endinput
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 e818cdece0..6088f6cfb3 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
@@ -1,5 +1,5 @@
\newpage
-\section{Classe \Iclass{parallelogram}} % (fold)
+\section{Class \Iclass{parallelogram}} % (fold)
\subsection{Parallelogram attributes} % (fold)
\label{sub:parallelogram_attributes}
@@ -38,7 +38,7 @@ Creation | P.new = parallelogram : new (z.A,z.B,z.C,z.D)|
% subsubsection example_attributes (end)
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
z.B = point : new ( 4 , 1 )
@@ -58,7 +58,7 @@ z.I = P.new.center
\tkzLabelPoints[above](C,D)
\tkzDrawPoints[red](I)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -98,7 +98,7 @@ z.I = P.new.center
\toprule
\textbf{Methods} & \textbf{Comments} \\
\midrule \\
-\Imeth{parallelogram}{fourth (za,zb,zc)} & completes a triangle by parallelogram (see next example)\\
+\Imeth{parallelogram}{fourth (za,zb,zc)} & completes a triangle by parallelogram (Refer to next example)\\
\bottomrule %
\end{tabular}
\egroup
@@ -108,7 +108,7 @@ z.I = P.new.center
% subsubsection parallelogram_with_fourth_method (end)
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale = .75
z.A = point : new ( 0 , 0 )
@@ -120,13 +120,13 @@ z.I = P.four.center
\end{tkzelements}
\begin{tikzpicture}
\tkzGetNodes
-\tkzDrawPolygon(A,D,B,C)
+\tkzDrawPolygon(A,B,C,D)
\tkzDrawPoints(A,B,C,D)
\tkzLabelPoints(A,B)
\tkzLabelPoints[above](C,D)
\tkzDrawPoints[red](I)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
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 4efd21328f..68c5a73e5a 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
@@ -3,7 +3,7 @@
\section{Class \Iclass{point}} % (fold)
\label{sec:class_point}
-The class on which the whole edifice rests, it's the class \Iclass{point}. This class is hybrid in the sense that it is as much about points of a plane as complex numbers. The principle is the following: the plane is provided with an orthonormal basis which allows us to determine the placement of a point using its abscissa and ordinate coordinates; in the same way any complex number can simply be considered as a pair of real numbers (its real part and its imaginary part). We can then designate the plane as the complex plane, and the complex number $x+iy$ is represented by the point of the plane with coordinates $(x,y)$. Thus the point $A$ will have coordinates stored in the object $z.A$. Coordinates are attributes of the "point" object, like type, argument and modulus.
+The foundation of the entire framework is the \Iclass{point} class. This class is hybrid in the sense that it deals with both points in a plane and complex numbers. The principle is as follows: the plane is equipped with an orthonormal basis, which allows us to determine the position of a point using its abscissa and ordinate coordinate. Similarly, any complex number can be viewed simply as a pair of real numbers (its real part and its imaginary part). We can then designate the plane as the complex plane, and the complex number $x+iy$ is represented by the point of the plane with coordinates $(x,y)$. Thus the point $A$ will have coordinates stored in the object $z.A$. Coordinates are attributes of the "point" object, along with type, argument, and modulus.
@@ -88,27 +88,31 @@ The creation of a point is done using the following method, but there are other
\begin{mybox}
Creation |z.A = point: new (1,2) |
\end{mybox}
- The point $A$ has coordinates $x=1$ and $y=2$. If you use the notation |z.A| then $A$ will be the reference of a node in \TIKZ\ or in \pkg{tkz-euclide}.
+ The point $A$ has coordinates $x=1$ and $y=2$. If you use the notation |z.A|, then $A$ will be referenced as a node in \TIKZ\ or in \pkg{tkz-euclide}.
+
+This is the creation of a fixed point with coordinates 1 and 2 and which is named $A$. The notation |z.A| indicates that the coordinates will be stored in a table denoted as |z| (reference to the notation of the affixes of the complex numbers) that $A$ is the name of the point and the key allowing access to the values.
+
+
+\begin{center}
+ \bgroup
+ \small
+ \catcode`_=12
+ \captionof{table}{Point attributes.}\label{point:att}
+ \begin{tabular}{lll}
+ \toprule
+ \textbf{Attributes} & \textbf{Application}& \textbf{Example}\\
+ \Iattr{point}{re} & |z.A.re = 1| & Refer to (\ref{ssub:methods}) \\
+ \Iattr{point}{im} & |z.A.im = 2| & Refer to (\ref{ssub:methods}) \\
+ \Iattr{point}{type} & |z.A.type = 'point'| & \\
+ \Iattr{point}{argument} & |z.A.argument $\approx$ 0.78539816339745| & Refer to (\ref{ssub:example_point_attributes})\\
+ \Iattr{point}{modulus} & |z.A.modulus| $\approx$ |2.2360...| =$\sqrt{5}$ & Refer to (\ref{ssub:example_point_attributes})\\
+ \bottomrule
+ \end{tabular}
+ \egroup
+\end{center}
-This is the creation of a fixed point with coordinates 1 and 2 and which is named $A$. The notation |z.A| indicates that the coordinates will be stored in a table noted |z| (reference to the notation of the affixes of the complex numbers) that A is the name of the point and the key allowing access to the values.
-\vspace{1em}
-\bgroup
-\small
-\catcode`_=12
-\captionof{table}{Point attributes.}\label{point:att}
-\begin{tabular}{lll}
-\toprule
-\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}{modulus} & |z.A.modulus| $\approx$ |2.2360...| =$\sqrt{5}$ & see (\ref{ssub:example_point_attributes})\\
-\bottomrule
-\end{tabular}
-\egroup
\newpage
\subsubsection{Example:point attributes} % (fold)
@@ -120,16 +124,16 @@ This is the creation of a fixed point with coordinates 1 and 2 and which is name
\hspace*{\fill}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.M = point: new (1,2)
\end{tkzelements}
-\end{verbatim}
+\end{Verbatim}
\pgfkeys{/pgf/number format/.cd,std,precision=2}
\let\pmpn\pgfmathprintnumber
\DeleteShortVerb{\|}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tikzpicture}[scale = 1]
\pgfkeys{/pgf/number format/.cd,std,precision=2}
\let\pmpn\pgfmathprintnumber
@@ -148,7 +152,7 @@ $|z_M| =\sqrt{5}\approx \pmpn{\tkzUseLua{z.M.modulus}}$ cm}
\tkzLabelPoint[left,teal](B){$\tkzUseLua{z.M.im}$}
\tkzDrawSegments[->,add = 0 and 0.25](O,B O,A)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\begin{center}
@@ -186,7 +190,7 @@ Attributes of \texttt{z.M}
\MakeShortVerb{\|}
\hspace*{\fill}
- % \caption{Class Point}
+% \caption{Class Point}
% subsubsection example_point_attributes (end)
% subsection attributes_of_a_point (end)
@@ -194,25 +198,25 @@ Attributes of \texttt{z.M}
\label{ssub:argand_diagram}
\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 )
- \end{tkzelements}
- \hspace{\fill}\begin{tikzpicture}
- \tkzGetNodes
- \tkzInit[xmin=-4,ymin=-4,xmax=4,ymax=4]
- \tkzDrawCircle[dashed,red](O,A)
- \tkzPointShowCoord(A)
- \tkzDrawPoint(A)
- \tkzLabelPoint[above right](A){\normalsize $a+ib$}
- \tkzDrawX\tkzDrawY
- \tkzDrawSegment(O,A)
- \tkzLabelSegment[above,anchor=south,sloped](O,A){ OA = modulus of $z_A$}
- \tkzLabelAngle[anchor=west,pos=.5](I,O,A){$\theta$ = argument of $z_A$}
- \end{tikzpicture}
- \end{verbatim}
+\begin{Verbatim}
+\begin{tkzelements}
+ z.A = point : new ( 2 , 3 )
+ z.O = point : new ( 0 , 0 )
+ z.I = point : new ( 1 , 0 )
+\end{tkzelements}
+\hspace{\fill}\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzInit[xmin=-4,ymin=-4,xmax=4,ymax=4]
+ \tkzDrawCircle[dashed,red](O,A)
+ \tkzPointShowCoord(A)
+ \tkzDrawPoint(A)
+ \tkzLabelPoint[above right](A){\normalsize $a+ib$}
+ \tkzDrawX\tkzDrawY
+ \tkzDrawSegment(O,A)
+ \tkzLabelSegment[above,anchor=south,sloped](O,A){ OA = modulus of $z_A$}
+ \tkzLabelAngle[anchor=west,pos=.5](I,O,A){$\theta$ = argument of $z_A$}
+\end{tikzpicture}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{\textwidth}
@@ -242,49 +246,55 @@ 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}. See section (\ref{sub:complex_numbers}) for the metamethods.
+The methods described in the following table are standard and can be found 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}. Refer to section (\ref{sub:complex_numbers}) for the metamethods.
\vspace{1em}
\bgroup
\catcode`_=12
\small
-\captionof{table}{Methods of the class point.}\label{point:met}
+\captionof{table}{Functions \& Methods of the class point.}\label{point:met}
\begin{tabular}{lll}
\toprule
-\textbf{Methods} & \textbf{Application}& \\
+\textbf{Functions} & \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 \\
+\Igfct{point}{new(r,r)} & |z.A = point : new(1,2)| & Refer to (\ref{ssub:method_normalize}) \\
+\Igfct{point}{polar (d,an)} & |z.A = point : polar(1,math.pi/3)| & Refer to (\ref{sub:archimedes} )\\
+\Igfct{point}{polar\_deg (d,an)} & an in deg & polar coordinates an deg \\
+\midrule
+\textbf{Methods} & \textbf{Application}& \\
\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}{north(r)} & |r| distance to the point (1 if empty) & Refer to (\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}{normalize()} & |z.b = z.a: normalize ()| & Refer to (\ref{ssub:method_normalize}) \\
\Imeth{point}{get\_points (obj)} & retrieves points from the object & \\
\Imeth{point}{orthogonal (d)} & |z.B=z.A:orthogonal(d)| & $\overrightarrow{OB}\perp \overrightarrow{OA}$ and $OB=d$\\
\Imeth{point}{at ()} & |z.X = z.B : at (z.A)| & $\overrightarrow{OB}= \overrightarrow{AX}$ and $OB=d$\\
\midrule
\textbf{Transformations} &&\\
\midrule
- \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}) \\
+ \Imeth{point}{symmetry(obj)} & obj : point, line, etc. & Refer to (\ref{ssub:object_symmetry}) \\
+ \Imeth{point}{rotation(an , obj)} & point, line, etc. & Refer to (\ref{ssub:object_rotation})\\
+ \Imeth{point}{homothety(r,obj)} & |z.c = z.a : homothety (2,z.b)| & Refer to (\ref{sub:homothety}) \\
+ \midrule
+ \textbf{Misc.} &&\\
+ \midrule
+ \Imeth{point}{print()} & displays the affix of the point & Refer to (\ref{ssub:object_symmetry}) \\
\bottomrule %
\end{tabular}
\egroup
-\subsubsection{Example: method \Imeth{point}{north (d)} } % (fold)
+\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).
+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 (Refer to the following example).
If |d| is absent then it is considered equal to 1.
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.O = point : new ( 0, 0 )
z.A = z.O : east ()
@@ -298,7 +308,7 @@ If |d| is absent then it is considered equal to 1.
\tkzDrawPolygon(A,B,C,D)
\tkzDrawPoints(A,B,C,D,O,A')
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -324,10 +334,10 @@ If |d| is absent then it is considered equal to 1.
\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})
+Use of |north and east| functions linked to points, to transfer lengths, Refer to (\ref{sub:length_of_a_segment})
\begin{minipage}{.4\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
z.B = point : new ( 3 , 0 )
@@ -347,7 +357,7 @@ Use of |north and east| functions linked to points, to transfer lengths, see (\r
\tkzLabelPoints(A,B,E,M)
\tkzLabelPoints[above right](C,D,F)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.6\textwidth}
\begin{tkzelements}
@@ -380,7 +390,7 @@ Use of |north and east| functions linked to points, to transfer lengths, see (\r
This involves defining a point using its modulus and argument.
\begin{minipage}{0.6\textwidth}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.O = point: new (0, 0)
z.A = point: new (3, 0)
@@ -394,7 +404,7 @@ This involves defining a point using its modulus and argument.
\tkzDrawPoints(A,O,F)
\tkzLabelPoints[below right=6pt](A,O,F)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{0.4\textwidth}
\begin{tkzelements}
@@ -422,7 +432,7 @@ This involves defining a point using its modulus and argument.
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{Verbatim}
\begin{tkzelements}
scale = 1.5
z.O = point : new (0,0)
@@ -438,7 +448,7 @@ The result is a point located between the origin and the initial point at a dist
\tkzLabelPoints(O,A,B)
\tkzLabelPoint[below right](I){$1$}
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.6\textwidth}
\begin{tkzelements}
@@ -467,7 +477,7 @@ z.I = point : new (1,0)
Let $O$ be the origin of the plane. The "orthogonal (d)" method is used to obtain a point $B$ from a point $A$ such that $\overrightarrow{OB}\perp \overrightarrow{OA}$ with $OB=OA$ if $d$ is empty, otherwise $OB = d$.
\begin{minipage}{.6\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new ( 3 , 1 )
z.B = z.A : orthogonal (1)
@@ -480,7 +490,7 @@ Let $O$ be the origin of the plane. The "orthogonal (d)" method is used to obtai
\tkzDrawPoints(O,A,B,C)
\tkzLabelPoints[below right](O,A,B,C)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.4\textwidth}
\begin{tkzelements}
@@ -501,10 +511,10 @@ Let $O$ be the origin of the plane. The "orthogonal (d)" method is used to obtai
\subsubsection{\Imeth{point}{at} method} % (fold)
\label{ssub:_imeth_point_at_method}
-Cette méthode est complémentaire de la précédente, ainsi on peut souhaiter non pas avoir $\overrightarrow{OB}\perp \overrightarrow{OA}$ mais $\overrightarrow{AB}\perp \overrightarrow{OA}$.
+This method is complementary to the previous one, so you may not wish to have $\overrightarrow{OB}\perp \overrightarrow{OA}$ but $\overrightarrow{AB}\perp \overrightarrow{OA}$.
\begin{minipage}{.6\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new ( 3 , 1 )
z.B = z.A : orthogonal (1)
@@ -520,7 +530,7 @@ Cette méthode est complémentaire de la précédente, ainsi on peut souhaiter n
\tkzDrawSegments(O,A A,B A,C C,D)
\tkzDrawPoints(O,A,B,C,D)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.4\textwidth}
\begin{tkzelements}
@@ -548,7 +558,7 @@ z.D =(z.C-z.A):orthogonal(2) : at (z.C)
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{Verbatim}
\begin{tkzelements}
z.a = point: new(0, -1)
z.b = point: new(4, 0)
@@ -564,7 +574,7 @@ The arguments are the angle of rotation in radians, and here a list of points.
\tkzDrawArc(o,a)(a')
\tkzDrawArc(o,b)(b')
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.4\textwidth}
\begin{tkzelements}
@@ -584,6 +594,7 @@ The arguments are the angle of rotation in radians, and here a list of points.
\tkzDrawArc(o,a)(a')
\tkzDrawArc(o,b)(b')
\end{tikzpicture}
+\hspace*{\fill}
\end{minipage}
% subsubsection example_rotation_of_points (end)
@@ -592,7 +603,7 @@ The arguments are the angle of rotation in radians, and here a list of points.
Rotate a triangle by an angle of $\pi/6$ around $O$.
\begin{minipage}{.5\textwidth}
- \begin{verbatim}
+ \begin{Verbatim}
\begin{tkzelements}
z.O = point : new ( -1 , -1 )
z.A = point : new ( 2 , 0 )
@@ -615,7 +626,7 @@ Rotate a triangle by an angle of $\pi/6$ around $O$.
\tkzLabelPoints (A,B,C,A',B',C',O)
\tkzDrawArc[delta=0,->](O,A)(A')
\end{tikzpicture}
- \end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -650,25 +661,25 @@ z.Ap,z.Bp,z.Cp = get_points ( T.ApBpCp)
\subsubsection{Object \Imeth{point}{symmetry}} % (fold)
\label{ssub:object_symmetry}
\begin{minipage}{.5\textwidth}
- \begin{verbatim}
- \begin{tkzelements}
- z.a = point: new(0,-1)
- z.b = point: new(2, 0)
- L.ab = line : new (z.a,z.b)
- C.ab = circle : new (z.a,z.b)
- z.o = point: new(1,1)
- z.ap,z.bp = get_points (z.o: symmetry (C.ab))
- \end{tkzelements}
+\begin{Verbatim}
+\begin{tkzelements}
+ z.a = point: new(0,-1)
+ z.b = point: new(2, 0)
+ L.ab = line : new (z.a,z.b)
+ C.ab = circle : new (z.a,z.b)
+ 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')
- \tkzDrawLines(a,a' b,b')
- \tkzDrawLines[red](a,b a',b')
- \tkzDrawPoints(a,a',b,b',o)
- \tkzLabelPoints(a,a',b,b',o)
- \end{tikzpicture}
- \end{verbatim}
+\begin{tikzpicture}
+\tkzGetNodes
+\tkzDrawCircles(a,b a',b')
+\tkzDrawLines(a,a' b,b')
+\tkzDrawLines[red](a,b a',b')
+\tkzDrawPoints(a,a',b,b',o)
+\tkzLabelPoints(a,a',b,b',o)
+\end{tikzpicture}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
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 8b777de57b..30ee773eba 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
@@ -1,5 +1,5 @@
\newpage
-\section{Classe \Iclass{Quadrilateral}} % (fold)
+\section{Class \Iclass{Quadrilateral}} % (fold)
\subsection{Quadrilateral Attributes} % (fold)
\label{sub:quadrilateral_attributes}
@@ -41,7 +41,7 @@ Creation | Q.new = rectangle : new (z.A,z.B,z.C,z.D)|
\subsubsection{Quadrilateral attributes} % (fold)
\label{ssub:quadrilateral_attributes}
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
z.B = point : new ( 4 , 0 )
@@ -58,7 +58,7 @@ z.G = Q.ABCD.g
\tkzDrawSegments(A,C B,D)
\tkzDrawPoints(A,B,C,D,I,G)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -93,7 +93,7 @@ z.G = Q.ABCD.g
\toprule
\textbf{Methods} & \textbf{Comments} \\
\midrule \\
-\Imeth{quadrilateral}{iscyclic ()} & inscribed ? (see next example)\\
+\Imeth{quadrilateral}{iscyclic ()} & inscribed ? (Refer to next example)\\
\bottomrule %
\end{tabular}
\egroup
@@ -101,7 +101,7 @@ z.G = Q.ABCD.g
\subsubsection{Inscribed quadrilateral} % (fold)
\label{ssub:inscribed_quadrilateral}
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
z.B = point : new ( 4 , 0 )
@@ -126,7 +126,7 @@ end
\ifthenelse{\equal{\tkzUseLua{bool}}{true}}{
\tkzDrawCircle(O,A)}{}
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
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 e232980e64..cd0ae2981c 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
@@ -1,5 +1,5 @@
\newpage
-\section{Classe \Iclass{rectangle}} % (fold)
+\section{Class \Iclass{rectangle}} % (fold)
\subsection{Rectangle attributes} % (fold)
\label{sub:rectangle_attributes}
@@ -40,7 +40,7 @@ Creation | R.ABCD = rectangle : new (z.A,z.B,z.C,z.D)|
\subsubsection{Example} % (fold)
\label{ssub:example}
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
z.B = point : new ( 4 , 0 )
@@ -58,7 +58,7 @@ z.I = R.new.center
\tkzLabelPoints[above](C,D)
\tkzDrawPoints[red](I)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\hspace{\fill}\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -117,7 +117,7 @@ z.I = R.new.center
\label{ssub:angle_method}
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale = .5
z.A = point : new ( 0 , 0 )
@@ -136,7 +136,7 @@ z.D = P.ABCD.pd
\tkzLabelPoints(A,B,C,D)
\tkzDrawPoints[new](I)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -164,7 +164,7 @@ z.D = P.ABCD.pd
\subsubsection{Side method} % (fold)
\label{ssub:side_method}
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
z.B = point : new ( 4 , 3 )
@@ -181,7 +181,7 @@ z.I = R.side.center
\tkzLabelPoints[above](C,D)
\tkzDrawPoints[red](I)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -207,7 +207,7 @@ z.I = R.side.center
\subsubsection{Diagonal method} % (fold)
\label{ssub:diagonal_method}
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
z.C = point : new ( 4 , 3 )
@@ -226,7 +226,7 @@ z.I = R.diag.center
\tkzDrawPoints[red](I)
\tkzLabelSegment[sloped,above](A,B){|rectangle : diagonal (z.A,z.C)|}
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -253,7 +253,7 @@ z.I = R.diag.center
\subsubsection{Gold method} % (fold)
\label{ssub:gold_method}
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.X = point : new ( 0 , 0 )
z.Y = point : new ( 4 , 2 )
@@ -272,7 +272,7 @@ z.I = R.gold.center
\tkzDrawPoints[red](I)
\tkzLabelSegment[sloped,above](X,Y){rectangle : gold (z.X,z.Y)}
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
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 6460af030d..2413a97d91 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
@@ -1,5 +1,5 @@
\newpage
-\section{Classe \Iclass{Regular Polygon}} % (fold)
+\section{Class \Iclass{regular polygon}} % (fold)
\subsection{regular\_polygon attributes} % (fold)
\label{sub:regular_polygon_attributes}
@@ -32,7 +32,7 @@ Creation | RP.IA = regular_polygon : new (z.I,z.A,6)|
\subsubsection{Pentagon} % (fold)
\label{ssub:pentagon}
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.O = point: new (0,0)
z.I = point: new (1,3)
@@ -50,7 +50,7 @@ z.H = RP.five.proj
\tkzDrawPoints[red](P_1,P_...,P_\nb,H,I)
\tkzLabelPoints[red](I,A,H)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -94,7 +94,7 @@ z.H = RP.five.proj
\midrule
\textbf{Points} &\\
\midrule
-\Imeth{regular\_polygon}{name (string)} & see\ref{ssub:pentagon} \\
+\Imeth{regular\_polygon}{name (string)} & Refer to\ref{ssub:pentagon} \\
\bottomrule %
\end{tabular}
\egroup
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 fae6d71b2b..17e26d105f 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
@@ -1,11 +1,11 @@
\newpage
-\section{Classe \Iclass{square}} % (fold)
+\section{Class \Iclass{square}} % (fold)
\subsection{Square attributes} % (fold)
\label{sub:square_attributes}
% subsection square_attributes (end)
-Points are created in the direct direction. A test is performed to check whether the points form a square, otherwise compilation is blocked.
+Points are created in the direct direction. A test is performed to check whether the points form a square. Otherwise, compilation is blocked."
\begin{mybox}
Creation | S.AB = square : new (z.A,z.B,z.C,z.D)|
\end{mybox}
@@ -40,7 +40,7 @@ Creation | S.AB = square : new (z.A,z.B,z.C,z.D)|
\label{ssub:example_square_attributes}
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
z.B = point : new ( 4 , 0 )
@@ -62,7 +62,7 @@ z.H = S.new.proj
\tkzLabelSegment[sloped](I,H){\pmpn{\tkzUseLua{S.new.inradius}}}
\tkzLabelSegment[sloped](D,C){\pmpn{\tkzUseLua{S.new.side}}}
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -114,7 +114,7 @@ z.H = S.new.proj
\label{ssub:square_with_side_method}
%
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale = 2
z.A = point : new ( 0 , 0 )
@@ -134,7 +134,7 @@ z.H = S.new.proj
\tkzLabelPoints[above](C,D)
\tkzDrawPoints[red](I)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
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 9261d6fbe7..f54a53f39e 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
@@ -1,6 +1,6 @@
\newpage
-\section{Classe \Iclass{triangle}} % (fold)
-\label{sec:classe_triangle}
+\section{Class \Iclass{triangle}} % (fold)
+\label{sec:class_triangle}
\subsection{Attributes of a triangle} % (fold)
\label{sub:attributes_of_a_triangle}
@@ -8,7 +8,7 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp
\begin{mybox}
Creation | T.ABC = triangle : new ( z.A , z.B , z.C ) |
\end{mybox}
-(See examples: \ref{sub:alternate}; \ref{sub:apollonius_circle}; \ref{sub:excircles} ). Multiple attributes are then created.
+(Refer to examples: \ref{sub:alternate}; \ref{sub:apollonius_circle}; \ref{sub:excircles} ). Multiple attributes are then created.
\bgroup
\catcode`_=12
@@ -44,7 +44,7 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp
\label{sub:triangle_attributes_angles}
\begin{minipage}{.6\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new(0,0)
z.B = point: new(5,0)
@@ -60,7 +60,7 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp
\tkzLabelAngle(C,B,A){$\wangle{beta}^\circ$}
\tkzLabelAngle(A,C,B){$\wangle{gamma}^\circ$}
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.4\textwidth}
\begin{tkzelements}
@@ -83,64 +83,64 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp
\subsubsection{Example: triangle attributes} % (fold)
\label{ssub:example_triangle_attributes}
\begin{minipage}{.5\textwidth}
- \begin{verbatim}
- \begin{tkzelements}
- z.a = point: new (0 , 0)
- z.b = point: new (4 , 0)
- z.c = point: new (0 , 3)
- T.abc = triangle : new (z.a,z.b,z.c)
- z.O = T.abc.circumcenter
- z.I = T.abc.incenter
- z.H = T.abc.orthocenter
- z.G = T.abc.centroid
- a = T.abc.a
- b = T.abc.b
- c = T.abc.c
- alpha = T.abc.alpha
- beta = T.abc.beta
- gamma = T.abc.gamma
- \end{tkzelements}
- \begin{tikzpicture}
- \tkzGetNodes
- \tkzDrawPolygon(a,b,c)
- \tkzDrawPoints(a,b,c,O,G,I,H)
- \tkzLabelPoints(a,b,c,O,G,I)
- \tkzLabelPoints[above right](H)
- \tkzDrawCircles(O,a)
- \tkzLabelSegment[sloped](a,b){\tkzUseLua{c}}
- \tkzLabelSegment[sloped,above](b,c){\tkzUseLua{a}}
- \end{tikzpicture}
- \end{verbatim}
+\begin{Verbatim}
+\begin{tkzelements}
+ z.A = point: new (0 , 0)
+ z.B = point: new (4 , 0)
+ z.C = point: new (0 , 3)
+ T.ABC = triangle : new (z.A,z.B,z.C)
+ z.O = T.ABC.circumcenter
+ z.I = T.ABC.incenter
+ z.H = T.ABC.orthocenter
+ z.G = T.ABC.centroid
+ a = T.ABC.a
+ b = T.ABC.b
+ c = T.ABC.c
+ alpha = T.ABC.alpha
+ beta = T.ABC.beta
+ gamma = T.ABC.gamma
+\end{tkzelements}
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawPolygon(A,B,C)
+ \tkzDrawPoints(A,B,C,O,G,I,H)
+ \tkzLabelPoints[below](A,B,O,G,I)
+ \tkzLabelPoints[above right](H,C)
+ \tkzDrawCircles(O,A)
+ \tkzLabelSegment[sloped](A,B){\tkzUseLua{c}}
+ \tkzLabelSegment[sloped,above](B,C){\tkzUseLua{a}}
+\end{tikzpicture}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
- scale = 1.2
- z.a = point: new (0 , 0)
- z.b = point: new (4 , 0)
- z.c = point: new (0 , 3)
- T.abc = triangle : new (z.a,z.b,z.c)
- z.O = T.abc.circumcenter
- z.I = T.abc.incenter
- z.H = T.abc.orthocenter
- z.G = T.abc.centroid
- a = T.abc.a
- b = T.abc.b
- c = T.abc.c
- alpha = T.abc.alpha
- beta = T.abc.beta
- gamma = T.abc.gamma
-\end{tkzelements}
+ z.A = point: new (0 , 0)
+ z.B = point: new (4 , 0)
+ z.C = point: new (0 , 3)
+ T.ABC = triangle : new (z.A,z.B,z.C)
+ z.O = T.ABC.circumcenter
+ z.I = T.ABC.incenter
+ z.H = T.ABC.orthocenter
+ z.G = T.ABC.centroid
+ a = T.ABC.a
+ b = T.ABC.b
+ c = T.ABC.c
+ alpha = T.ABC.alpha
+ beta = T.ABC.beta
+ gamma = T.ABC.gamma
+\end{tkzelements}
\hspace*{\fill}
\begin{tikzpicture}
-\tkzGetNodes
-\tkzDrawPolygon(a,b,c)
-\tkzDrawPoints(a,b,c,O,G,I,H)
-\tkzLabelPoints(a,b,c,O,G,I)
-\tkzLabelPoints[above right](H)
-\tkzDrawCircles(O,a)
-\tkzLabelSegment[sloped](a,b){\tkzUseLua{c}}
-\tkzLabelSegment[sloped,above](b,c){\tkzUseLua{a}}
+ \tkzGetNodes
+ \tkzDrawPolygon(A,B,C)
+ \tkzDrawPoints(A,B,C,O,G,I,H)
+ \tkzLabelPoints[below](A,B,O,G,I)
+ \tkzLabelPoints[above right](H,C)
+ \tkzDrawCircles(O,A)
+ \tkzLabelSegment[sloped](A,B){\tkzUseLua{c}}
+ \tkzLabelSegment[sloped,above](B,C){\tkzUseLua{a}}
\end{tikzpicture}
+\hspace*{\fill}
\end{minipage}
% subsubsection example_triangle_attributes (end)
@@ -200,7 +200,7 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp
\Imeth{triangle}{first\_lemoine\_circle ()} & The center is the midpoint between Lemoine point and the circumcenter.\footnote{
Through the Lemoine point draw lines parallel to the triangle's sides. The points where the parallel lines intersect the sides of ABC
then lie on a circle known as the first Lemoine circle. } \\
-\Imeth{triangle}{second\_lemoine\_circle ()} & see example \ref{sub:antiparallel_through_lemoine_point}\\
+\Imeth{triangle}{second\_lemoine\_circle ()} & Refer to example \ref{sub:antiparallel_through_lemoine_point}\\
\Imeth{triangle}{spieker\_circle ()} & The incircle of the medial triangle\\
\bottomrule
@@ -210,7 +210,7 @@ Through the Lemoine point draw lines parallel to the triangle's sides. The point
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})
+|bisector (z.A,z.B,z.C)| and |altitude (z.A,z.B,z.C)| Refer to (\ref{misc})
\clearpage\newpage
\bgroup
@@ -238,7 +238,11 @@ Remark: If you don't need to use the triangle object several times, you can obta
\Imeth{triangle}{symmedian ()} & Triangle formed with the intersection points of the symmedians. \\
\Imeth{triangle}{euler ()} & Triangle formed with the euler points \\
\midrule
-\midrule
+ \textbf{Ellipses} &\\
+\Imeth{triangle}{steiner\_inellipse ()} & Refer to ex. (\ref{ssub:steiner_inellipse_and_circumellipse})\\
+\Imeth{triangle}{steiner\_circumellipse ()} & Refer to ex. (\ref{ssub:steiner_inellipse_and_circumellipse})\\
+\Imeth{triangle}{euler\_ellipse ()} & Refer to ex. (\ref{sub:euler_ellipse})\\
+ \midrule
\textbf{Miscellaneous} &\\
\midrule
\Imeth{triangle}{area ()} & $ \mathcal{A}$| = T.ABC: area ()|\\
@@ -256,7 +260,7 @@ Remark: If you don't need to use the triangle object several times, you can obta
\label{ssub:euler_line}
\begin{minipage}{.5\textwidth}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new (0 , 0)
z.B = point: new (6 , 0)
@@ -281,7 +285,7 @@ Remark: If you don't need to use the triangle object several times, you can obta
\tkzLabelPoints(A,B,C,I,J,K,P,Q,R,H)
\tkzLabelPoints[below](N,O,G)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -310,36 +314,186 @@ Remark: If you don't need to use the triangle object several times, you can obta
\tkzLabelPoints[below](N,O,G,H)
\end{tikzpicture}
\end{minipage}
-
-%\caption{Euler line}
% subsubsection euler_line (end)
+\subsection{Euler ellipse} % (fold)
+\label{sub:euler_ellipse}
+Example of obtaining the Euler circle as well as the Euler ellipse.
+
+\begin{tkzelements}
+z.A = point: new (2,3.8)
+z.B = point: new (0 ,0)
+z.C = point: new (6.2 ,0)
+L.AB = line : new ( z.A , z.B )
+T.ABC = triangle: new (z.A,z.B,z.C)
+z.K = midpoint (z.B,z.C)
+E.euler = T.ABC : euler_ellipse ()
+z.N = T.ABC.eulercenter
+C.euler = circle : new (z.N,z.K)
+ang = math.deg(E.euler.slope)
+z.O = T.ABC.circumcenter
+z.G = T.ABC.centroid
+z.H = T.ABC.orthocenter
+\end{tkzelements}
+
+\begin{minipage}{.5\textwidth}
+\begin{Verbatim}
+\begin{tkzelements}
+z.A = point: new (2,3.8)
+z.B = point: new (0 ,0)
+z.C = point: new (6.2 ,0)
+L.AB = line : new ( z.A , z.B )
+T.ABC = triangle: new (z.A,z.B,z.C)
+z.K = midpoint (z.B,z.C)
+E.euler = T.ABC : euler_ellipse ()
+z.N = T.ABC.eulercenter
+C.euler = circle : new (z.N,z.K)
+ang = math.deg(E.euler.slope)
+z.O = T.ABC.circumcenter
+z.G = T.ABC.centroid
+z.H = T.ABC.orthocenter
+\end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+\begin{tikzpicture}
+\tkzGetNodes
+\tkzDrawPolygon(A,B,C)
+\tkzDrawCircle(N,K)
+\tkzDrawEllipse[teal](N,\tkzUseLua{E.euler.Rx},
+ \tkzUseLua{E.euler.Ry},\tkzUseLua{ang})
+\tkzDrawLine(O,H)
+\tkzDrawPoints(A,B,C,N,O,H,G)
+\tkzLabelPoints[below left](B,C,N,O,H,G)
+\tkzLabelPoints[above](A)
+\end{tikzpicture}
+\end{minipage}
+
+\begin{Verbatim}
+\begin{tikzpicture}
+\tkzGetNodes
+\tkzDrawPolygon(A,B,C)
+\tkzDrawCircle(N,K)
+\tkzDrawEllipse[teal](N,\tkzUseLua{E.euler.Rx},
+ \tkzUseLua{E.euler.Ry},\tkzUseLua{ang})
+\tkzDrawLine(O,H)
+\tkzDrawPoints(A,B,C,N,O,H,G)
+\tkzLabelPoints[below left](B,C,N,O,H,G)
+\tkzLabelPoints[above](A)
+\end{tikzpicture}
+\end{Verbatim}
+% subsection euler_ellipse (end)
+
+\subsubsection{Steiner inellipse and circumellipse} % (fold)
+\label{ssub:steiner_inellipse_and_circumellipse}
+In this example, the inner and outer Steiner ellipses, referred to as the "inellipse" and "circumellipse" (Mathworld.com), respectively, along with the orthoptic circle, are depicted.. The triangle must be acutangle.
+
+\begin{minipage}{.5\textwidth}
+\begin{Verbatim}
+\begin{tkzelements}
+ scale = .5
+ z.A = point: new (1 , 4)
+ z.B = point: new (11 , 1)
+ z.C = point: new (5 , 12)
+ T.ABC = triangle: new(z.A,z.B,z.C)
+ E = T.ABC: steiner_inellipse ()
+ z.G = E.center
+ ang = math.deg(E.slope)
+ z.F = E.Fa
+ z.E = E.Fb
+ C = E: orthoptic_circle ()
+ z.w = C.center
+ z.o = C.through
+ EE = T.ABC : steiner_circumellipse ()
+ z.M = C : point (0)
+ L.T1,L.T2= E : tangent_from (z.M)
+ z.T1 = L.T1.pb
+ z.T2 = L.T2.pb
+\end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}\begin{tkzelements}
+ scale = .5
+z.A = point: new (1 , 4)
+z.B = point: new (11 , 1)
+z.C = point: new (5 , 12)
+T.ABC = triangle: new(z.A,z.B,z.C)
+E = T.ABC: steiner_inellipse ()
+z.G = E.center
+ang = math.deg(E.slope)
+z.F = E.Fa
+z.E = E.Fb
+C = E: orthoptic_circle ()
+z.w = C.center
+z.o = C.through
+EE = T.ABC : steiner_circumellipse ()
+z.M = C : point (0)
+L.T1,L.T2= E : tangent_from (z.M)
+z.T1 = L.T1.pb
+z.T2 = L.T2.pb
+\end{tkzelements}
+
+\begin{tikzpicture}
+\tkzGetNodes
+\tkzDrawPolygon(A,B,C)
+\tkzDrawCircles(w,o)
+\tkzDrawEllipse[teal](G,\tkzUseLua{E.Rx},
+ \tkzUseLua{E.Ry},\tkzUseLua{ang})
+\tkzDrawEllipse[red](G,\tkzUseLua{EE.Rx},
+ \tkzUseLua{EE.Ry},\tkzUseLua{ang})
+\tkzDrawLines(F,E M,T1 M,T2) %
+\tkzDrawPoints(A,B,C,F,E,G,M,T1,T2)
+\tkzLabelPoints[above](C,M,T1)
+\tkzLabelPoints[right](T2,B)
+\tkzLabelPoints[below left](A,F,E,G)
+\end{tikzpicture}
+\end{minipage}
+
+\begin{Verbatim}
+\begin{tikzpicture}
+\tkzGetNodes
+\tkzDrawPolygon(A,B,C)
+\tkzDrawCircles(w,o)
+\tkzDrawEllipse[teal](G,\tkzUseLua{E.Rx},
+ \tkzUseLua{E.Ry},\tkzUseLua{ang})
+\tkzDrawEllipse[red](G,\tkzUseLua{EE.Rx},
+ \tkzUseLua{EE.Ry},\tkzUseLua{ang})
+\tkzDrawLines(F,E M,T1 M,T2) %
+\tkzDrawPoints(A,B,C,F,E,G,M,T1,T2)
+\tkzLabelPoints[above](C,M,T1)
+\tkzLabelPoints[right](T2,B)
+\tkzLabelPoints[below left](A,F,E,G)
+\end{tikzpicture}
+\end{Verbatim}
+% subsubsection steiner_inellipse_and_circumellipse (end)
+
+
\subsection{Harmonic division and bisector} % (fold)
\label{sub:harmonic_division_and_bisector}
\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}
+\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}
@@ -379,7 +533,7 @@ Remark: If you don't need to use the triangle object several times, you can obta
\end{tikzpicture}
\end{minipage}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawPolygon(A,B,M)
@@ -394,11 +548,11 @@ Remark: If you don't need to use the triangle object several times, you can obta
\tkzMarkAngles[mark=|,size=.5](B,M,F M,F,B)
\tkzMarkSegments(B,E B,M B,F)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
% subsection harmonic_division_and_bisector (end)
% subsection methods_of_the_class_triangle (end)
-% section classe_triangle (end)
+% section class_triangle (end)
\endinput
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-vectors.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-vectors.tex
index 00d924bb83..b981ef555a 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-vectors.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-vectors.tex
@@ -18,7 +18,7 @@ If $\overrightarrow{CD} = \overrightarrow{BE} $ then $\overrightarrow{AB} + \ove
Creation |V.AB = vector: new (z.A,z.B)|
\end{mybox}
-\begin{verbatim}
+\begin{Verbatim}
z.A = ...
z.B = ...
z.C = ...
@@ -26,8 +26,8 @@ z.D = ...
V.AB = vector : new (z.A,z.B)
V.CD = vector : new (z.C,z.D)
V.AE = V.AB + V.CD -- possible V.AB : add (V.CD)
-z.E = V.AE.h -- we recover the final point (h = head)
-\end{verbatim}
+z.E = V.AE.head -- we recover the final point (head)
+\end{Verbatim}
\subsection{Attributes of a vector} % (fold)
\label{sub:attributes_of_a_vector}
@@ -41,11 +41,12 @@ z.E = V.AE.h -- we recover the final point (h = head)
\begin{tabular}{lll}
\toprule
\textbf{Attributes} & \textbf{Application}& \textbf{Example}\\
-\Iattr{vector}{pa} & |V.AB.t = z.A| t for tail & see (\ref{ssub:methods}) \\
-\Iattr{vector}{pb} & |V.AB.h = z.B| h for head & see (\ref{ssub:methods}) \\
+\Iattr{vector}{tail} & |V.AB.t = z.A| & Refer to (\ref{ssub:methods}) \\
+\Iattr{vector}{head} & |V.AB.head = z.B| & Refer to (\ref{ssub:methods}) \\
\Iattr{vector}{type} & |V.AB.type = 'vector'| & \\
-\Iattr{vector}{slope} & |V.AB.slope| & see (\ref{ssub:example_vector_attributes})\\
-\Iattr{vector}{length} & |V.AB.norm|& see (\ref{ssub:example_vector_attributes})\\
+\Iattr{vector}{slope} & |V.AB.slope| & Refer to (\ref{ssub:example_vector_attributes})\\
+\Iattr{vector}{length} & |V.AB.norm|& Refer to (\ref{ssub:example_vector_attributes})\\
+\Iattr{vector}{mtx} & |V.AB.mtx| & The result is a column matrix |{{V.AB.t},{V.AB.h}}|\\
\bottomrule
\end{tabular}
\egroup
@@ -54,30 +55,30 @@ z.E = V.AE.h -- we recover the final point (h = head)
\label{ssub:example_vector_attributes}
\begin{minipage}{.6\textwidth}
- \begin{verbatim}
- \begin{tkzelements}
- z.O = point: new (0,0)
- z.A = point: new (0,1)
- z.B = point: new (3,4)
- L.AB = line : new ( z.A , z.B )
- z.C = point: new (1,2)
- z.D = point: new (2,1)
- u = vector : new (z.A,z.B)
- v = vector : new (z.C,z.D)
- w =u+v
- z.E = w.h
- \end{tkzelements}
- \begin{tikzpicture}[gridded]
- \tkzGetNodes
- \tkzLabelPoints(A,B,C,D,O,E)
- \tkzDrawSegments[->,red](A,B C,D A,E)
- \tkzLabelSegment(A,B){$\overrightarrow{u}$}
- \tkzLabelSegment(C,D){$\overrightarrow{v}$}
- \tkzLabelSegment(A,E){$\overrightarrow{w}$}
- \end{tikzpicture}
- $\overrightarrow{w}$ has slope :
- $\tkzDN{\tkzUseLua{math.deg(w.slope)}}^\circ$
- \end{verbatim}
+\begin{Verbatim}
+\begin{tkzelements}
+ z.O = point: new (0,0)
+ z.A = point: new (0,1)
+ z.B = point: new (3,4)
+ L.AB = line : new ( z.A , z.B )
+ z.C = point: new (1,2)
+ z.D = point: new (2,1)
+ u = vector : new (z.A,z.B)
+ v = vector : new (z.C,z.D)
+ w =u+v
+ z.E = w.head
+\end{tkzelements}
+\begin{tikzpicture}[gridded]
+ \tkzGetNodes
+ \tkzLabelPoints(A,B,C,D,O,E)
+ \tkzDrawSegments[->,red](A,B C,D A,E)
+ \tkzLabelSegment(A,B){$\overrightarrow{u}$}
+ \tkzLabelSegment(C,D){$\overrightarrow{v}$}
+ \tkzLabelSegment(A,E){$\overrightarrow{w}$}
+\end{tikzpicture}
+$\overrightarrow{w}$ has slope :
+$\tkzDN{\tkzUseLua{math.deg(w.slope)}}^\circ$
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.4\textwidth}
\begin{tkzelements}
@@ -90,7 +91,7 @@ z.E = V.AE.h -- we recover the final point (h = head)
u = vector : new (z.A,z.B)
v = vector : new (z.C,z.D)
w = u+v
- z.E = w.h
+ z.E = w.head
\end{tkzelements}
\begin{tikzpicture}[gridded]
\tkzGetNodes
@@ -125,9 +126,9 @@ $\tkzDN{\tkzUseLua{math.deg(w.slope)}}^\circ$
\midrule
\textbf{Methods} & \textbf{Application}& \\
\Imeth{vector}{new(pt, pt)} & |V.AB = vector: new (z.A,z.B) | & \\
-\Imeth{vector}{normalize(V)} & |V.AB : normalize () | & \\
-\Imeth{vector}{orthogonal(d)} & |V.AB : orthogonal (d) | & \\
-\Imeth{vector}{scale(d)} & |V.CD = V.AB : scale (2) | & $\overrightarrow{CD} = 2\overrightarrow{AB} $ \\
+\Imeth{vector}{normalize(V)} & |V.AB : normalize () | & \\
+\Imeth{vector}{orthogonal(d)} & |V.AB : orthogonal (d) | & \\
+\Imeth{vector}{scale(d)} & |V.CD = V.AB : scale (2) | & $\overrightarrow{CD} = 2\overrightarrow{AB} $ \\
\Imeth{vector}{at (V)} & |V.DB = V.AC : at (z.D) | & $\overrightarrow{DB} = \overrightarrow{AC} $ \\
\bottomrule
\end{tabular}
@@ -137,56 +138,56 @@ $\tkzDN{\tkzUseLua{math.deg(w.slope)}}^\circ$
\label{ssub:example_of_methods}
\begin{minipage}{.5\textwidth}
- \begin{verbatim}
- \begin{tkzelements}
- z.O = point: new (0,0)
- z.A = point: new (0,1)
- z.B = point: new (3,4)
- V.AB = vector: new (z.A,z.B)
- V.AC = V.AB : scale (.5)
- z.C = V.AC.h
- V.AD = V.AB : orthogonal ()
- z.D = V.AD.h
- V.AN = V.AB : normalize ()
- z.N = V.AN.h
- V.AR = V.AB : orthogonal (2*math.sqrt(2))
- z.R = V.AR.h
- V.AX = 2*V.AC - V.AR
- z.X = V.AX.h
- V.OY = V.AX : at (z.O)
- z.Y = V.OY.h
- \end{tkzelements}
- \begin{tikzpicture}[gridded]
- \tkzGetNodes
- \tkzDrawSegments[>=stealth,->,red](A,B A,C A,D A,N A,R A,X O,Y)
- \tkzLabelPoints(A,B,C,D,O,N,R,X,Y)
- \end{tikzpicture}
- \end{verbatim}
+\begin{Verbatim}
+\begin{tkzelements}
+ z.O = point: new (0,0)
+ z.A = point: new (0,1)
+ z.B = point: new (3,4)
+ V.AB = vector: new (z.A,z.B)
+ V.AC = V.AB : scale (.5)
+ z.C = V.AC.head
+ V.AD = V.AB : orthogonal ()
+ z.D = V.AD.head
+ V.AN = V.AB : normalize ()
+ z.N = V.AN.head
+ V.AR = V.AB : orthogonal(2*math.sqrt(2))
+ z.R = V.AR.head
+ V.AX = 2*V.AC - V.AR
+ z.X = V.AX.head
+ V.OY = V.AX : at (z.O)
+ z.Y = V.OY.head
+\end{tkzelements}
+\begin{tikzpicture}[gridded]
+ \tkzGetNodes
+ \tkzDrawSegments[>=stealth,->,red](A,B A,C A,D A,N A,R A,X O,Y)
+ \tkzLabelPoints(A,B,C,D,O,N,R,X,Y)
+\end{tikzpicture}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
- \begin{tkzelements}
- z.O = point: new (0,0)
- z.A = point: new (0,1)
- z.B = point: new (3,4)
- V.AB = vector: new (z.A,z.B)
- V.AC = V.AB : scale (.5)
- z.C = V.AC.h
- V.AD = V.AB : orthogonal ()
- z.D = V.AD.h
- V.AN = V.AB : normalize ()
- z.N = V.AN.h
- V.AR = V.AB : orthogonal (2*math.sqrt(2))
- z.R = V.AR.h
- V.AX = 2*V.AC - V.AR
- z.X = V.AX.h
- V.OY = V.AX : at (z.O)
- z.Y = V.OY.h
- \end{tkzelements}
- \begin{tikzpicture}[gridded]
- \tkzGetNodes
- \tkzDrawSegments[>=stealth,->,red](A,B A,C A,D A,N A,R A,X O,Y)
- \tkzLabelPoints(A,B,C,D,O,N,R,X,Y)
- \end{tikzpicture}
+\begin{tkzelements}
+ z.O = point: new (0,0)
+ z.A = point: new (0,1)
+ z.B = point: new (3,4)
+ V.AB = vector: new (z.A,z.B)
+ V.AC = V.AB : scale (.5)
+ z.C = V.AC.head
+ V.AD = V.AB : orthogonal ()
+ z.D = V.AD.head
+ V.AN = V.AB : normalize ()
+ z.N = V.AN.head
+ V.AR = V.AB : orthogonal (2*math.sqrt(2))
+ z.R = V.AR.head
+ V.AX = 2*V.AC - V.AR
+ z.X = V.AX.head
+ V.OY = V.AX : at (z.O)
+ z.Y = V.OY.head
+\end{tkzelements}
+\begin{tikzpicture}[gridded]
+ \tkzGetNodes
+ \tkzDrawSegments[>=stealth,->,red](A,B A,C A,D A,N A,R A,X O,Y)
+ \tkzLabelPoints(A,B,C,D,O,N,R,X,Y)
+\end{tikzpicture}
\end{minipage}
% subsubsection example_of_methods (end)
% section class_vector (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 5e4376b879..1228c60e08 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
@@ -6,31 +6,31 @@
\subsection{Class} % (fold)
\label{sub:class}
- Object-oriented programming (OOP) is defined as a programming model built on the concept of objects. An object can be defined as a data table that has unique attributes and methods (operations) that define its behavior.
+ Object-oriented programming (OOP) is a programming model based on the concept of objects. An object can be defined as a data table that has unique attributes and methods (operations) that define its behavior.
\vspace{1em}
-A class is essentially a user-defined data type. It describes the contents of the objects that belong to it. A class is a blueprint of an object, providing initial values for attributes and implementations of methods\footnote{action which an object is able to perform.} common to all objects of a certain kind.
+A class is essentially a user-defined data type. It describes the contents of the objects that belong to it. A class serves as a blueprint for creating objects, providing initial values for attributes and implementations of methods\footnote{action which an object is able to perform.} cthat are common to all objects of a certain kind.
% subsection class (end)
\subsection{Object} % (fold)
\label{sub:object}
- An Object is an instance of a class. Each object contains attributes and methods. Attributes are information or object characteristics stored in the date table (called field). The methods define behavior.
+ An Object is an instance of a class. Each object contains attributes and methods. Attributes are information or object characteristics of the object stored in the data table (called fields), while methods define the object's behavior.
\vspace{1em}
All objects in the package are typed. The object types currently defined and used are: \tkzNameObj{point}, \tkzNameObj{line}, \tkzNameObj{circle}, \tkzNameObj{triangle}, \tkzNameObj{ellipse}, \tkzNameObj{quadrilateral}, \tkzNameObj{square}, \tkzNameObj{rectangle}, \tkzNameObj{parallelogram} and \tkzNameObj{regular\_polygon}.
-They can be created directly using the method \Imeth{obj}{new} by giving points, with the exception of the \Iclass{class}{point} class which requires a pair of reals, and \Iclass{class}{regular\_polygon} which needs two points and an integer.
+These objects can be created directly using the method \Imeth{obj}{new} by giving points, with the exception of the \Iclass{class}{point} class which requires a pair of reals, and \Iclass{class}{regular\_polygon} which needs two points and an integer.
- Objects can also be obtained by applying methods to other objects. For example, |T.ABC : circum_circle ()| creates an object \tkzNameObj{circle}. Some object attributes are also objects, such as |T.ABC.bc| which creates the object \tkzNameObj{line}, a straight line passing through the last two points defining the triangle.
+ Objects can also be obtained by applying methods to other objects. For example, |T.ABC : circum_circle ()| creates an object \tkzNameObj{circle}. Some object attributes are also objects themselves, such as |T.ABC.bc| which creates the \tkzNameObj{line} object, representing a straight line passing through the last two points defining the triangle.
\vspace{1em}
\subsubsection{Attributes} % (fold)
\label{ssub:attributes}
- Attributes are accessed using the classic method, so |T.pc| gives the third point of the triangle and |C.OH.center| gives the center of the circle, but I've added a |get_points| function that returns the points of an object. This applies to straight lines (pa and pc), triangles (pa, pb and pc) and circles (center and through).
+ Attributes are accessed using the classic method, so |T.pc| retrieves the third point of the triangle and |C.OH.center| retrieves the center of the circle. Additionally, I've added a |get_points| function that returns the points of an object. This function applies to straight lines (pa and pc), triangles (pa, pb and pc) and circles (center and through).
\vspace{1em}
- Example: |z.O,z.T = get_points (C)| recovers the center and a point of the circle.
+ Example: |z.O,z.T = get_points (C)| retrieves the center and a point of the circle.
% subsubsection attributes (end)
\subsubsection{Methods} % (fold)
@@ -40,14 +40,14 @@ A method is an operation (function or procedure) associated (linked) with an obj
Example: The point object is used to vertically determine a new point object located at a certain distance from it (here 2). Then it is possible to rotate objects around it.
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point (1,0)
z.B = z.A : north (2)
z.C = z.A : rotation (math.pi/3,z.B)
tex.print(tostring(z.C))
\end{tkzelements}
-\end{verbatim}
+\end{Verbatim}
\begin{tkzelements}
z.A = point (1,0)
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-convention.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-convention.tex
index 90e07b1ef7..70b61fb902 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-convention.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-convention.tex
@@ -8,7 +8,7 @@
\begin{itemize}
\item Numerical variable: the writing conventions for real numbers are the same as for \pkg{Lua}.
- \item Complex numbers: as for real numbers but to define them you must write |za = point (1,2)|. Mathematically, this corresponds to 1+2i, which you can find with |tex.print(tostring(za))|.(see \ref{sub:complex_numbers})
+ \item Complex numbers: Similar to real numbers, but to define them, you must write |za = point (1,2)|. Mathematically, this corresponds to 1+2i, which you can find with |tex.print(tostring(za))|.(Refer \ref{sub:complex_numbers})
\item Boolean: you can write |bool = true| or |bool = false| then with Lua you can use the code :\\
\begin{mybox}
|if bool == ... then ... else ... end|
@@ -32,16 +32,16 @@
\subsection{Assigning a Name to a Point} % (fold)
\label{sub:assigning_a_name_to_a_point}
-Currently the only obligation is to store the points in the table |z| \footnote{To place the point M in the table, simply write |z.M| = \ldots or |z["M"]|= \ldots} if you want to use them in \TIKZ\ or \pkg{tkz-euclide}. If it is a point which will not be used, then you can designate it as you wish by respecting the conventions of Lua.
+At present, the only obligation is to store the points in the table |z| \footnote{To place the point M in the table, simply write |z.M| = \ldots or |z["M"]|= \ldots} if you intend to use them in \TIKZ\ or \pkg{tkz-euclide}. f a point will not be used, you can designate it as you wish while adhering to Lua conventions.
- The points which occur in the environment \tkzNameEnv{tkzelements} must respect a convention which is |z.name| such that |name| will be the name of the corresponding \tkzname{node}.
+ Points within the \tkzNameEnv{tkzelements} environment must follow a convention in the form |z.name|, where |name| represents the name of the corresponding \tkzname{node}.
-What are the conventions for designating |name|? You have to respect the Lua conventions in particular cases.
+As for the conventions for designating |name| you must adhere to Lua conventions in particular cases.
\begin{enumerate}
- \item The use of prime is problematic. If the point name contains more than one symbol and ends with |p| then when passing into \pkg{TikZ} or \pkg{tkz-euclide}, the letters |p| will be replaced by |'| using the macro \tkzcname{tkzGetNodes}; \index{prime}
+ \item The use of prime can be problematic. If the point name contains more than one symbol and ends with |p| then when passing into \pkg{TikZ} or \pkg{tkz-euclide}, the letters |p| will be replaced by |'| using the macro \tkzcname{tkzGetNodes}; \index{prime}
- \item One possibility, however, in order to have a more explicit code is to suppose that you want to designate a point by "euler". It would be possible for example to write |euler = ...|, and at the end of the code for the transfer, |z.E = euler|. It is also possible to use a temporary name |euler| and to replace it in \TIKZ{}. Either at the time of placing the labels, or for example by using |pgfnodealias{E}{euler}|. This possibility also applies in other cases: prime, double prime, etc.
+ \item Alternatively, for a more explicit code, suppose you want to designate a point as "euler". You could, for example, write |euler = ...|, and at the end of the code for the transfer, |z.E = euler|. It is also possible to use a temporary name |euler| and to replace it in \TIKZ{}. Either at the time of placing the labels, or for example by using |pgfnodealias{E}{euler}|. This possibility also applies in other cases: prime, double prime, etc.
\end{enumerate}
@@ -58,16 +58,24 @@ Here are some different ways of naming a point:
\subsection{Assigning a Name to Other Objects} % (fold)
\label{sub:assigning_a_name_to_other_objects}
-You have the choice to give a name to objects other than points. That said, it is preferable to respect certain rules in order to make the code easier to read.
-I have chosen for my examples the following conventions: first of all I store the objects in tables: |L.name| for lines and segments, |C.name| for circles, |T.name| for triangles, |E.name| for ellipses.
+You have the flexibility to assign names to objects other than points. However, it's advisable to adhere to certain conventions to enhance code readability. For my examples, I've chosen the following conventions: first of all, I store the objects in tables: |L| for lines and segments, |C| for circles, |T| for triangles, |E| for ellipses.
-For lines, I use the names of the two points. So if a line passes through points $A$ and $B$, I name the line |L.AB|.
+\begin{itemize}
+ \item
+ For lines, I use the names of the two points they pass through. For example, if a line passes through points $A$ and $B$, I name the line |L.AB|.
+
+\item Circles are stored in table named |C|.
+ For example, I name |C.AB| the circle of center $A$ passing through $B$. Other names like C.euler or C.external are also acceptable.
-For circles, I name |C.AB| the circle of center $A$ passing through $B$, but something like |C.euler| or |C.external| is fine.
+\item Triangles are stored in table named |T|.
+ For example, I name |T.ABC| the triangle whose vertices are $A$, $B$ and $C$. However, names like |T.feuerbach| are also acceptable.
+
+\item Ellipses are stored in table named |E|.
+ For ellipses, I name |E.ABC| the ellipse with center $A$ through vertex $B$ and covertex $C$.
+\end{itemize}
-For triangles, I name |T.ABC| the triangle whose vertices are $A$, $B$ and $C$ but |T.feuerbach|.
+Adhering to these conventions can help improve the readability of the code.
-For ellipses, I name |E.ABC| the ellipse with center $A$ through vertex $B$ and covertex $C$.
% subsection assigning_a_name_to_other_objects(end)
\subsection{Writing conventions for attributes, methods.} % (fold)
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 5efb52381f..1b35c27263 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
@@ -7,33 +7,33 @@
\label{sub:d_alembert_1}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
- \begin{verbatim}
- \begin{tkzelements}
- z.A = point : new (0,0)
- z.a = point : new (4,0)
- z.B = point : new (7,-1)
- z.b = point : new (5.5,-1)
- z.C = point : new (5,-4)
- z.c = point : new (4.25,-4)
- C.Aa = circle : new (z.A,z.a)
- C.Bb = circle : new (z.B,z.b)
- C.Cc = circle : new (z.C,z.c)
- z.I = C.Aa : external_similitude (C.Bb)
- z.J = C.Aa : external_similitude (C.Cc)
- z.K = C.Cc : external_similitude (C.Bb)
- z.Ip = C.Aa : internal_similitude (C.Bb)
- z.Jp = C.Aa : internal_similitude (C.Cc)
- z.Kp = C.Cc : internal_similitude (C.Bb)
- \end{tkzelements}
- \begin{tikzpicture}[rotate=-60]
- \tkzGetNodes
- \tkzDrawCircles(A,a B,b C,c)
- \tkzDrawPoints(A,B,C,I,J,K,I',J',K')
- \tkzDrawSegments[new](I,K A,I A,J B,I B,K C,J C,K)
- \tkzDrawSegments[purple](I,J' I',J I',K)
- \tkzLabelPoints(I,J,K,I',J',K')
- \end{tikzpicture}
- \end{verbatim}
+\begin{Verbatim}
+\begin{tkzelements}
+ z.A = point : new (0,0)
+ z.a = point : new (4,0)
+ z.B = point : new (7,-1)
+ z.b = point : new (5.5,-1)
+ z.C = point : new (5,-4)
+ z.c = point : new (4.25,-4)
+ C.Aa = circle : new (z.A,z.a)
+ C.Bb = circle : new (z.B,z.b)
+ C.Cc = circle : new (z.C,z.c)
+ z.I = C.Aa : external_similitude (C.Bb)
+ z.J = C.Aa : external_similitude (C.Cc)
+ z.K = C.Cc : external_similitude (C.Bb)
+ z.Ip = C.Aa : internal_similitude (C.Bb)
+ z.Jp = C.Aa : internal_similitude (C.Cc)
+ z.Kp = C.Cc : internal_similitude (C.Bb)
+\end{tkzelements}
+\begin{tikzpicture}[rotate=-60]
+ \tkzGetNodes
+ \tkzDrawCircles(A,a B,b C,c)
+ \tkzDrawPoints(A,B,C,I,J,K,I',J',K')
+ \tkzDrawSegments[new](I,K A,I A,J B,I B,K C,J C,K)
+ \tkzDrawSegments[purple](I,J' I',J I',K)
+ \tkzLabelPoints(I,J,K,I',J',K')
+\end{tikzpicture}
+\end{Verbatim}
\end{minipage}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
\begin{tkzelements}
@@ -70,28 +70,28 @@ z.Kp = C.Cc : internal_similitude (C.Bb)
\label{sub:d_alembert_2}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
- \begin{verbatim}
- \begin{tkzelements}
- scale = .75
- z.A = point : new (0,0)
- z.a = point : new (5,0)
- z.B = point : new (7,-1)
- z.b = point : new (3,-1)
- z.C = point : new (5,-4)
- z.c = point : new (2,-4)
- C.Aa = circle : new (z.A,z.a)
- C.Bb = circle : new (z.B,z.b)
- C.Cc = circle : new (z.C,z.c)
- z.i,z.j = get_points (C.Aa : radical_axis (C.Bb))
- z.k,z.l = get_points (C.Aa : radical_axis (C.Cc))
- z.m,z.n = get_points (C.Bb : radical_axis (C.Cc))
- \end{tkzelements}
- \begin{tikzpicture}
- \tkzGetNodes
- \tkzDrawCircles(A,a B,b C,c)
- \tkzDrawLines[new](i,j k,l m,n)
- \end{tikzpicture}
- \end{verbatim}
+\begin{Verbatim}
+\begin{tkzelements}
+ scale = .75
+ z.A = point : new (0,0)
+ z.a = point : new (5,0)
+ z.B = point : new (7,-1)
+ z.b = point : new (3,-1)
+ z.C = point : new (5,-4)
+ z.c = point : new (2,-4)
+ C.Aa = circle : new (z.A,z.a)
+ C.Bb = circle : new (z.B,z.b)
+ C.Cc = circle : new (z.C,z.c)
+ z.i,z.j = get_points (C.Aa : radical_axis (C.Bb))
+ z.k,z.l = get_points (C.Aa : radical_axis (C.Cc))
+ z.m,z.n = get_points (C.Bb : radical_axis (C.Cc))
+\end{tkzelements}
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawCircles(A,a B,b C,c)
+ \tkzDrawLines[new](i,j k,l m,n)
+\end{tikzpicture}
+\end{Verbatim}
\end{minipage}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
\begin{tkzelements}
@@ -122,7 +122,7 @@ z.Kp = C.Cc : internal_similitude (C.Bb)
\subsection{Alternate} % (fold)
\label{sub:alternate}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new (0 , 0)
z.B = point: new (6 , 0)
@@ -146,7 +146,7 @@ z.Kp = C.Cc : internal_similitude (C.Bb)
\tkzLabelPoints[above](C,D,E)
\tkzMarkSegments(A,C C,E)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\hspace*{\fill}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
@@ -195,25 +195,8 @@ scale=.75
z.E = z.M : symmetry (z.A)
\end{tkzelements}
-\hspace*{\fill}
-\begin{tikzpicture}
- \tkzGetNodes
- \tkzDrawSegment[add=0 and 1](A,M)
- \tkzDrawSegments[purple](M,C M,D)
- \tkzDrawCircle[purple](O,C)
- \tkzDrawSegments(A,B B,M D,B)
- \tkzDrawPoints(A,B,M,C,D)
- \tkzLabelPoints[below right](A,B,C,D)
- \tkzLabelPoints[above](M)
- \tkzFillAngles[opacity=.4,cyan!20](A,M,B)
- \tkzFillAngles[opacity=.4,purple!20](B,M,E)
- \tkzMarkRightAngle[opacity=.4,fill=gray!20](C,M,D)
- \tkzMarkAngles[mark=|](A,M,C C,M,B)
- \tkzMarkAngles[mark=||](B,M,D D,M,E)
-\end{tikzpicture}
-\hspace*{\fill}
-
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{minipage}{.5\textwidth}
+\begin{Verbatim}
\begin{tkzelements}
scale=.75
z.A = point: new (0 , 0)
@@ -229,6 +212,31 @@ scale=.75
L.AM = T.MAB.ab
z.E = z.M : symmetry (z.A)
\end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+ \hspace*{\fill}
+ \begin{tikzpicture}[scale=.8]
+ \tkzGetNodes
+ \tkzDrawSegment[add=0 and 1](A,M)
+ \tkzDrawSegments[purple](M,C M,D)
+ \tkzDrawCircle[purple](O,C)
+ \tkzDrawSegments(A,B B,M D,B)
+ \tkzDrawPoints(A,B,M,C,D)
+ \tkzLabelPoints[below right](A,B,C,D)
+ \tkzLabelPoints[above](M)
+ \tkzFillAngles[opacity=.4,cyan!20](A,M,B)
+ \tkzFillAngles[opacity=.4,purple!20](B,M,E)
+ \tkzMarkRightAngle[opacity=.4,fill=gray!20](C,M,D)
+ \tkzMarkAngles[mark=|](A,M,C C,M,B)
+ \tkzMarkAngles[mark=||](B,M,D D,M,E)
+ \end{tikzpicture}
+ \hspace*{\fill}
+\end{minipage}
+
+
+
+\begin{Verbatim}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawSegment[add=0 and 1](A,M)
@@ -244,7 +252,7 @@ scale=.75
\tkzMarkAngles[mark=|](A,M,C C,M,B)
\tkzMarkAngles[mark=||](B,M,D D,M,E)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
Remark : The circle can be obtained with:
@@ -256,7 +264,7 @@ Remark : The circle can be obtained with:
\subsection{Apollonius and circle circumscribed } % (fold)
\label{sub:apollonius_and_circle_circumscribed}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
scale =.75
z.A = point: new (0 , 0)
@@ -288,7 +296,7 @@ Remark : The circle can be obtained with:
\tkzLabelPoints[above](M)
\tkzMarkRightAngle[opacity=.4,fill=gray!20](C,M,D)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
@@ -331,7 +339,7 @@ Remark : The circle can be obtained with:
\label{sub:apollonius_circles}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new (0 , 0)
z.B = point: new (6 , 0)
@@ -361,6 +369,8 @@ Remark : The circle can be obtained with:
L.Bpt = line: new (z.Bp,z.T)
z.O3 = L.Bpt.mid
\end{tkzelements}
+\end{Verbatim}
+\begin{Verbatim}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawCircles[blue!50!black](O1,C' O2,A' O3,B')
@@ -372,7 +382,7 @@ Remark : The circle can be obtained with:
\tkzDrawCircle[purple](O,A)
\tkzDrawLine(O1,O2)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
z.A = point: new (0 , 0)
@@ -420,7 +430,7 @@ z.O3 = L.Bpt.mid
Same result using the function |T.ABC.ab : apollonius (k) |
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale = .75
z.A = point: new (0 , 0)
@@ -435,7 +445,7 @@ Same result using the function |T.ABC.ab : apollonius (k) |
C.BC = T.ABC.bc : apollonius (length(z.A,z.B)/length(z.A,z.C))
z.w3,z.t3 = get_points ( C.BC )
\end{tkzelements}
-\end{verbatim}
+\end{Verbatim}
% subsection apollonius_circles (end)
@@ -443,30 +453,30 @@ Same result using the function |T.ABC.ab : apollonius (k) |
\label{sub:archimedes}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
- \begin{verbatim}
- \begin{tkzelements}
- z.O_1 = point: new (0, 0)
- z.O_2 = point: new (0, 1)
- z.A = point: new (0, 3)
- z.F = point: polar (3, math.pi/6)
- L = line: new (z.F,z.O_1)
- C = circle: new (z.O_1,z.A)
- z.E = intersection (L,C)
- T = triangle: new (z.F,z.E,z.O_2)
- z.x = T: parallelogram ()
- L = line: new (z.x,z.O_2)
- C = circle: new (z.O_2,z.A)
- z.C,z.D = intersection (L ,C)
- \end{tkzelements}
- \begin{tikzpicture}
- \tkzGetNodes
- \tkzDrawCircles(O_1,A O_2,A)
- \tkzDrawSegments[new](O_1,A E,F C,D)
- \tkzDrawSegments[purple](A,E A,F)
- \tkzDrawPoints(A,O_1,O_2,E,F,C,D)
- \tkzLabelPoints(A,O_1,O_2,E,F,C,D)
- \end{tikzpicture}
- \end{verbatim}
+\begin{Verbatim}
+\begin{tkzelements}
+ z.O_1 = point: new (0, 0)
+ z.O_2 = point: new (0, 1)
+ z.A = point: new (0, 3)
+ z.F = point: polar (3, math.pi/6)
+ L = line: new (z.F,z.O_1)
+ C = circle: new (z.O_1,z.A)
+ z.E = intersection (L,C)
+ T = triangle: new (z.F,z.E,z.O_2)
+ z.x = T: parallelogram ()
+ L = line: new (z.x,z.O_2)
+ C = circle: new (z.O_2,z.A)
+ z.C,z.D = intersection (L ,C)
+\end{tkzelements}
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawCircles(O_1,A O_2,A)
+ \tkzDrawSegments[new](O_1,A E,F C,D)
+ \tkzDrawSegments[purple](A,E A,F)
+ \tkzDrawPoints(A,O_1,O_2,E,F,C,D)
+ \tkzLabelPoints(A,O_1,O_2,E,F,C,D)
+\end{tikzpicture}
+\end{Verbatim}
\end{minipage}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
\begin{tkzelements}
@@ -497,7 +507,7 @@ Same result using the function |T.ABC.ab : apollonius (k) |
\subsection{Bankoff circle} % (fold)
\label{sub:bankoff_circle}
-\begin{tkzexample}[small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new (0 , 0)
z.B = point: new (10 , 0)
@@ -537,6 +547,9 @@ Same result using the function |T.ABC.ab : apollonius (k) |
T.CP1P2 = triangle : new (z.C,z.P_1,z.P_2)
z.O_5 = T.CP1P2.circumcenter
\end{tkzelements}
+\end{Verbatim}
+
+\begin{Verbatim}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawSemiCircles[teal](O_0,B)
@@ -558,7 +571,7 @@ Same result using the function |T.ABC.ab : apollonius (k) |
\tkzLabelCircle[left](O_5,C)(140){$(\epsilon)$}
\end{scope}
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
@@ -630,8 +643,7 @@ Same result using the function |T.ABC.ab : apollonius (k) |
\subsection{Excircles} % (fold)
\label{sub:excircles}
-
-\begin{tkzexample}[small,code only]
+\begin{Verbatim}
\begin{tkzelements}
scale = 0.7
z.A = point: new (0,0)
@@ -665,7 +677,7 @@ Same result using the function |T.ABC.ab : apollonius (k) |
\tkzLabelPoints[new,right=6pt](T_a)
\tkzMarkRightAngles[fill=gray!15](J_a,T_a,B J_b,T_b,C J_c,T_c,A)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
scale=0.7
@@ -708,7 +720,7 @@ Same result using the function |T.ABC.ab : apollonius (k) |
\subsection{Orthogonal circle through} % (fold)
\label{sub:orthogonal_circle_through}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.O = point: new (0,1)
z.A = point: new (1,0)
@@ -725,7 +737,7 @@ Same result using the function |T.ABC.ab : apollonius (k) |
\tkzDrawPoints[new](O,A,z1,z2,c)
\tkzLabelPoints[right](O,A,z1,z2,c)
\end{tikzpicture}
-\end{tkzexample}%
+\end{Verbatim}
\begin{tkzelements}
z.O = point: new (0,1)
@@ -751,7 +763,7 @@ Same result using the function |T.ABC.ab : apollonius (k) |
\subsection{Divine ratio} % (fold)
\label{sub:divine_ratio}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new (0 , 0)
z.B = point: new (8 , 0)
@@ -785,7 +797,7 @@ z.L = intersection (L.AR,L.BG)
\tkzDrawPoints(A,B,C,K,E,F,G,H,O_0,O_1,O_2,R,S,T,L)
\tkzLabelPoints(A,B,C,K,E,F,G,H,O_0,O_1,O_2,R,S,T,L)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
z.A = point: new (0 , 0)
@@ -829,7 +841,7 @@ z.L = intersection (L.AR,L.BG)
\label{sub:director_circle}
% modif C: point (0.25) instead of 2
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale = .5
z.O = point: new (0 , 0)
@@ -859,7 +871,7 @@ z.L = intersection (L.AR,L.BG)
\tkzLabelPoints[above](L)
\tkzMarkRightAngles(A,P,H J,L,K)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
\begin{tkzelements}
@@ -900,7 +912,7 @@ z.K = L.K.pb
\subsection{Gold division} % (fold)
\label{sub:gold_division}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new (0,0)
z.B = point: new (2.5,0)
@@ -928,7 +940,7 @@ z.O = C.AB: antipode (z.B)
\tkzDrawPoints(A,B,C,E,I,J,G,O,K)
\tkzLabelPoints(A,B,C,E,I,J,G,O,K)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
z.A = point: new (0,0)
@@ -965,7 +977,7 @@ z.O = C.AB: antipode (z.B)
\subsection{Ellipse} % (fold)
\label{sub:ellipse}
\begin{minipage}{.5\textwidth}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.C = point: new (3 , 2)
z.A = point: new (5 , 1)
@@ -985,7 +997,7 @@ z.O = C.AB: antipode (z.B)
\tkzDrawPoints(C,A,B,b)
\tkzLabelPoints(C,A,B)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -1016,7 +1028,7 @@ slope = math.deg(E.slope)
\subsection{Ellipse with radii} % (fold)
\label{sub:ellipse_with_radii}
\begin{minipage}{.5\textwidth}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
scale=.5
z.C = point: new (0 , 4)
@@ -1033,7 +1045,7 @@ z.CoV = E : point (math.pi/2)
\tkzUseLua{b},\tkzUseLua{ang})
\tkzDrawPoints(C,V,CoV)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -1059,7 +1071,7 @@ z.CoV = E : point (math.pi/2)
\subsection{Ellipse\_with\_foci} % (fold)
\label{sub:ellipse_with_foci}
\begin{minipage}{.5\textwidth}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
local e
e = .8
@@ -1086,7 +1098,7 @@ z.CoV = E : point (math.pi/2)
\tkzDrawEllipse[teal](C,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{ang})
\tkzDrawLines(K,F K,G)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -1124,7 +1136,7 @@ z.G = L.tb.pb
\subsection{Euler relation} % (fold)
\label{sub:euler_relation}
\begin{minipage}{.5\textwidth}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
scale = .75
z.A = point: new (0 , 0)
@@ -1152,7 +1164,7 @@ z.G = L.tb.pb
\tkzLabelPoints(A,B,C,J,I,w,H,K,E,O)
\tkzMarkRightAngles[fill=gray!20,opacity=.4](C,H,I A,K,J)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -1190,7 +1202,7 @@ _,z.E = intersection (L.Ow, C.OA)
\subsection{External angle} % (fold)
\label{sub:external_angle}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale = .75
z.A = point: new (0 , 0)
@@ -1214,7 +1226,7 @@ _,z.E = intersection (L.Ow, C.OA)
\tkzLabelPoints[above](C)
\tkzLabelPoints(A,B,D)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
\begin{tkzelements}
@@ -1249,7 +1261,7 @@ z.E = z.C: symmetry (z.B)
\subsection{Internal angle} % (fold)
\label{sub:internal_angle}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale = .8
z.A = point: new (0 , 0)
@@ -1275,7 +1287,7 @@ z.E = z.C: symmetry (z.B)
\tkzLabelPoints[above](C,D,E)
\tkzMarkSegments(A,C C,E)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
\begin{tkzelements}
@@ -1310,7 +1322,7 @@ z.E = intersection (L.LL,L.AD)
\subsection{Feuerbach theorem} % (fold)
\label{sub:nine_points}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale = 1.5
z.A = point: new (0 , 0)
@@ -1350,7 +1362,7 @@ z.E = intersection (L.LL,L.AD)
\tkzDrawPoints(A,B,C,N,H,A',B',C',U,L,M,P,Q,F,I)
\tkzLabelPoints(A,B,C,N,H,A',B',C',U,L,M,P,Q,F,I)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
\begin{tkzelements}
@@ -1397,7 +1409,7 @@ z.F = intersection (L.LH,C.IH) -- feuerbach
\subsection{Gold ratio with segment} % (fold)
\label{sub:gold_ratio_with_segment}
\begin{minipage}{.5\textwidth}
- \begin{verbatim}
+ \begin{Verbatim}
\begin{tkzelements}
z.A = point: new (0 , 0)
z.B = point: new (8 , 0)
@@ -1418,7 +1430,7 @@ z.F = intersection (L.LH,C.IH) -- feuerbach
\tkzDrawArc[delta=20](M,A)(K)
\tkzLabelPoints(A,B,C)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -1450,7 +1462,7 @@ z.C = intersection (L.AK,L.AB)
\subsection{Gold Arbelos} % (fold)
\label{sub:gold_arbelos}
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale = .6
z.A = point: new (0 , 0)
@@ -1471,7 +1483,7 @@ z.C = intersection (L.AK,L.AB)
\tkzDrawPoints(A,C,B,O_1,O_2,O_0)
\tkzLabelPoints(A,C,B)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -1502,7 +1514,7 @@ z.O_0 = L.AB.mid
\subsection{Harmonic division v1} % (fold)
\label{sub:harmonic_division_v1}
\begin{minipage}[t]{.4\textwidth}\vspace{0pt}%
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale=.75
z.A = point: new (0 , 0)
@@ -1534,7 +1546,7 @@ z.C = intersection (L.XG,L.AB)
\tkzLabelPoints(A,B,G,E,F,C,D)
\tkzMarkSegments(F,B B,E)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}[t]{.6\textwidth}\vspace{0pt}%
\begin{tkzelements}
@@ -1576,7 +1588,7 @@ z.C = intersection (L.XG,L.AB)
\subsection{Harmonic division v2} % (fold)
\label{sub:harmonic_division_v2}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale = .5
z.A = point: new (0 , 0)
@@ -1601,7 +1613,7 @@ z.C = intersection (L.XG,L.AB)
\tkzDrawPoints(A,...,G,X)
\tkzLabelPoints(A,...,G,X)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
\begin{tkzelements}
@@ -1636,7 +1648,7 @@ z.C = intersection (L.GX,L.AB)
\subsection{Menelaus} % (fold)
\label{sub:menelaus}
\begin{minipage}{.4\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new (0 , 0)
z.B = point: new (6 , 0)
@@ -1657,7 +1669,7 @@ z.C = intersection (L.GX,L.AB)
\tkzDrawPoints(P,Q,R,A,B,C)
\tkzLabelPoints(A,B,C,P,Q,R)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.6\textwidth}
\begin{tkzelements}
@@ -1689,7 +1701,7 @@ z.R = intersection (L.BC,L.PX)
\subsection{Radical axis v1} % (fold)
\label{sub:radical_axis_v1}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
scale = .75
z.X = point : new (0,0)
@@ -1718,7 +1730,7 @@ z.H = L.XY : projection (z.M)
\tkzDrawLines[red](A,M A',M X,Y E,F)
\tkzDrawLines[red,add=1 and 3](M,H)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
scale = .75
@@ -1754,7 +1766,7 @@ z.H = L.XY : projection (z.M)
\subsection{Radical axis v2} % (fold)
\label{sub:radical_axis_v2}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
scale = 1.25
z.O = point : new (-1,0)
@@ -1783,7 +1795,7 @@ _,z.Kp = get_points (L.MKp)
\tkzDrawPoints(O,O',T,M,T',K,K')
\tkzLabelPoints(O,O',T,T',K,K',M)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
scale =1.25
@@ -1820,7 +1832,7 @@ _,z.Kp = get_points (L.MKp)
\subsection{Radical axis v3} % (fold)
\label{sub:radical_axis_v3}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.O = point : new (0,0)
z.B = point : new (4,0)
@@ -1845,7 +1857,7 @@ _,z.Kp = get_points (L.MKp)
\tkzLabelPoints(O,O',B,E,F,T,T')
\tkzDrawArc(M,T')(T)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
z.O = point : new (0,0)
@@ -1877,7 +1889,7 @@ _,z.Tp = get_points (L)
\subsection{Radical axis v4} % (fold)
\label{sub:radical_axis_v4}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.O = point : new (0,0)
z.B = point : new (5,0)
@@ -1903,7 +1915,7 @@ _,z.Tp = get_points (L)
\tkzLabelPoints[below right](O,O',E,F,M,T,T')
\tkzDrawArc(M,B)(T)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
@@ -1938,7 +1950,7 @@ _,z.Tp = get_points (L)
\subsection{Radical center} % (fold)
\label{sub:radical_center}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.O = point : new (0,0)
z.x = point : new (1,0)
@@ -1965,7 +1977,7 @@ _,z.Tp = get_points (L)
\tkzDrawPoints(O,O',P,a,a',b,b',X,H)
\tkzLabelPoints[below right](O,O',P,H)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
\begin{tkzelements}
@@ -2001,7 +2013,7 @@ z.H = L.OOp : projection (z.X)
\subsection{Radical circle} % (fold)
\label{sub:radical_circle}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale = .25
z.A = point: new (0,0)
@@ -2025,11 +2037,11 @@ z.H = L.OOp : projection (z.X)
\tkzDrawPoints(A,B,C)
\tkzLabelPoints(A,B,C)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
\begin{tkzelements}
- scale = .25
+ scale = .5
z.A = point: new (0,0)
z.B = point: new (6,0)
z.C = point: new (0.8,4)
@@ -2053,79 +2065,23 @@ z.H = L.OOp : projection (z.X)
\tkzDrawPoints(A,B,C)
\tkzLabelPoints(A,B,C)
\end{tikzpicture}
+\hspace*{\fill}
\end{minipage}
% subsection radical_circle (end)
\subsection{Euler ellipse} % (fold)
\label{sub:hexagram}
-\begin{tkzexample}[latex=0cm,small,code only]
-\begin{tkzelements}
- z.A = point: new (0 , 0)
- z.B = point: new (5 , 1)
- L.AB = line : new (z.A,z.B)
- z.C = point: new (.8 , 3)
- T.ABC = triangle: new (z.A,z.B,z.C)
- z.N = T.ABC.eulercenter
- z.G = T.ABC.centroid
- z.O = T.ABC.circumcenter
- z.H = T.ABC.orthocenter
- z.Ma,z.Mb,z.Mc = get_points (T.ABC : medial ())
- z.Ha,z.Hb,z.Hc = get_points (T.ABC : orthic ())
- z.Ea,z.Eb,z.Ec = get_points (T.ABC: extouch())
- L.euler = T.ABC : euler_line ()
- C.circum = T.ABC : circum_circle ()
- C.euler = T.ABC : euler_circle ()
- z.I,z.J = intersection (L.euler,C.euler)
- E = ellipse: foci (z.H,z.O,z.I)
- a = E.Rx
- b = E.Ry
- ang = math.deg(E.slope)
- L.AH = line: new (z.A,z.H)
- L.BH = line: new (z.B,z.H)
- L.CH = line: new (z.C,z.H)
- z.X = intersection (L.AH,C.circum)
- _,z.Y = intersection (L.BH,C.circum)
- _,z.Z = intersection (L.CH,C.circum)
- L.BC = line: new (z.B,z.C)
- L.XO = line: new (z.X,z.O)
- L.YO = line: new (z.Y,z.O)
- L.ZO = line: new (z.Z,z.O)
- z.x = intersection (L.BC,L.XO)
- z.U = intersection (L.XO,E)
- _,z.V = intersection (L.YO,E)
- _,z.W = intersection (L.ZO,E)
- \end{tkzelements}
- \end{tkzexample}
-
-\begin{tkzexample}[latex=0cm,small,code only]
-\begin{tikzpicture}
- \tkzGetNodes
- \tkzDrawPolygon(A,B,C)
- \tkzDrawCircles[red](N,Ma O,A)
- \tkzDrawSegments(A,X B,Y C,Z B,Hb C,Hc X,O Y,O Z,O)
- \tkzDrawPolygon[red](U,V,W)
- \tkzLabelPoints[red](U,V,W)
- \tkzLabelPoints(A,B,C,X,Y,Z)
- \tkzDrawLine[blue](I,J)
- \tkzLabelPoints[blue,right](O,N,G,H,I,J)
- \tkzDrawPoints(I,J,U,V,W)
- \tkzDrawPoints(A,B,C,N,G,H,O,X,Y,Z,Ma,Mb,Mc,Ha,Hb,Hc)
- \tkzDrawEllipse[blue](N,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{ang})
-\end{tikzpicture}
-\end{tkzexample}
-
\begin{tkzelements}
-scale = 2
-E = {}
+ scale =1.3
z.A = point: new (0 , 0)
z.B = point: new (5 , 1)
L.AB = line : new (z.A,z.B)
z.C = point: new (.8 , 3)
T.ABC = triangle: new (z.A,z.B,z.C)
-z.N = T.ABC.eulercenter
-z.G = T.ABC.centroid
-z.O = T.ABC.circumcenter
-z.H = T.ABC.orthocenter
+z.N = T.ABC.eulercenter
+z.G = T.ABC.centroid
+z.O = T.ABC.circumcenter
+z.H = T.ABC.orthocenter
z.Ma,z.Mb,z.Mc = get_points (T.ABC : medial ())
z.Ha,z.Hb,z.Hc = get_points (T.ABC : orthic ())
z.Ea,z.Eb,z.Ec = get_points (T.ABC: extouch())
@@ -2133,7 +2089,7 @@ L.euler = T.ABC : euler_line ()
C.circum = T.ABC : circum_circle ()
C.euler = T.ABC : euler_circle ()
z.I,z.J = intersection (L.euler,C.euler)
- E = ellipse: foci (z.H,z.O,z.I)
+E = ellipse: foci (z.H,z.O,z.I)
a = E.Rx
b = E.Ry
ang = math.deg(E.slope)
@@ -2153,6 +2109,51 @@ _,z.V = intersection (L.YO,E)
_,z.W = intersection (L.ZO,E)
\end{tkzelements}
+\begin{minipage}{.4\textwidth}
+\begin{Verbatim}
+\begin{tkzelements}
+ scale = 1.3
+ z.A = point: new (0 , 0)
+ z.B = point: new (5 , 1)
+ L.AB = line : new (z.A,z.B)
+ z.C = point: new (.8 , 3)
+ T.ABC = triangle: new (z.A,z.B,z.C)
+ z.N = T.ABC.eulercenter
+ z.G = T.ABC.centroid
+ z.O = T.ABC.circumcenter
+ z.H = T.ABC.orthocenter
+ z.Ma,z.Mb,
+ z.Mc = get_points (T.ABC : medial ())
+ z.Ha,z.Hb,
+ z.Hc = get_points (T.ABC : orthic ())
+ z.Ea,z.Eb,
+ z.Ec = get_points (T.ABC: extouch())
+ L.euler = T.ABC : euler_line ()
+ C.circum = T.ABC : circum_circle ()
+ C.euler = T.ABC : euler_circle ()
+ z.I,z.J = intersection (L.euler,C.euler)
+ E = ellipse: foci (z.H,z.O,z.I)
+ a = E.Rx
+ b = E.Ry
+ ang = math.deg(E.slope)
+ L.AH = line: new (z.A,z.H)
+ L.BH = line: new (z.B,z.H)
+ L.CH = line: new (z.C,z.H)
+ z.X = intersection (L.AH,C.circum)
+ _,z.Y = intersection (L.BH,C.circum)
+ _,z.Z = intersection (L.CH,C.circum)
+ L.BC = line: new (z.B,z.C)
+ L.XO = line: new (z.X,z.O)
+ L.YO = line: new (z.Y,z.O)
+ L.ZO = line: new (z.Z,z.O)
+ z.x = intersection (L.BC,L.XO)
+ z.U = intersection (L.XO,E)
+ _,z.V = intersection (L.YO,E)
+ _,z.W = intersection (L.ZO,E)
+\end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.6\textwidth}
\hspace*{\fill}
\begin{tikzpicture}
\tkzGetNodes
@@ -2169,80 +2170,32 @@ _,z.W = intersection (L.ZO,E)
\tkzDrawEllipse[blue](N,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{ang})
\end{tikzpicture}
\hspace*{\fill}
-% subsection hexagram (end)
-
-\subsection{Gold Arbelos properties} % (fold)
-\label{sub:gold_arbelos_properties}
+\end{minipage}
-\begin{tkzexample}[latex=0cm,small,code only]
-\begin{tkzelements}
- z.A = point : new(0,0)
- z.B = point : new(10,0)
- z.C = gold_segment_ (z.A,z.B)
- L.AB = line:new (z.A,z.B)
- z.O_1 = L.AB.mid
- L.AC = line:new (z.A,z.C)
- z.O_2 = L.AC.mid
- L.CB = line:new (z.C,z.B)
- z.O_3 = L.CB.mid
- C1 = circle:new (z.O_1,z.B)
- C2 = circle:new (z.O_2,z.C)
- C3 = circle:new (z.O_3,z.B)
- z.Q = C2.north
- z.P = C3.north
- L1 = line:new (z.O_2,z.O_3)
- z.M_0 = L1:harmonic_ext (z.C)
- L2 = line:new (z.O_1,z.O_2)
- z.M_1 = L2:harmonic_int (z.A)
- L3 = line:new (z.O_1,z.O_3)
- z.M_2 = L3:harmonic_int (z.B)
- Lbq = line:new (z.B,z.Q)
- Lap = line:new (z.A,z.P)
- z.S = intersection (Lbq,Lap)
- z.x = z.C: north ()
- L = line : new (z.C,z.x)
- z.D,_ = intersection (L,C1)
- L.CD = line :new (z.C,z.D)
- z.O_7 = L.CD.mid
- C.DC = circle: new (z.D,z.C)
- z.U,z.V = intersection (C.DC,C1)
- L.UV = line :new (z.U,z.V)
- z.R ,z.S = L.UV : projection (z.O_2,z.O_3)
- L.O1D = line : new (z.O_1,z.D)
- z.W = intersection (L.UV,L.O1D)
- z.O = C.DC : inversion (z.W)
-\end{tkzelements}
+\begin{Verbatim}
\begin{tikzpicture}
\tkzGetNodes
- \tkzDrawCircles[teal](O_1,B)
- \tkzDrawSemiCircles[thin,teal](O_2,C O_3,B)
- \tkzDrawArc[purple,delta=0](D,V)(U)
- \tkzDrawCircle[new](O_7,C)
- \tkzDrawSegments[thin,purple](A,D D,B C,R C,S C,D U,V)
- \tkzDrawSegments[thin,red](O,D A,O O,B)
- \tkzDrawPoints(A,B,C,D,O_7) %,
- \tkzDrawPoints(O_1,O_2,O_3,U,V,R,S,W,O)
- \tkzDrawSegments[cyan](O_3,S O_2,R)
- \tkzDrawSegments[very thin](A,B)
- \tkzDrawSegments[cyan,thin](C,U U,D)
- \tkzMarkRightAngles[size=.2,fill=gray!40,opacity=.4](D,C,A A,D,B
- D,S,C D,W,V O_3,S,U O_2,R,U)
- \tkzFillAngles[cyan!40,opacity=.4](B,A,D A,D,O_1
- C,D,B D,C,R B,C,S A,R,O_2)
- \tkzFillAngles[green!40,opacity=.4](S,C,D W,R,D
- D,B,C R,C,A O_3,S,B)
- \tkzLabelPoints[below](C,O_2,O_3,O_1)
- \tkzLabelPoints[above](D)
- \tkzLabelPoints[below](O)
- \tkzLabelPoints[below left](A)
- \tkzLabelPoints[above left](R)
- \tkzLabelPoints[above right](S)
- \tkzLabelPoints[left](V)
- \tkzLabelPoints[below right](B,U,W,O_7)
+ \tkzDrawPolygon(A,B,C)
+ \tkzDrawCircles[red](N,Ma O,A)
+ \tkzDrawSegments(A,X B,Y C,Z B,Hb C,Hc X,O Y,O Z,O)
+ \tkzDrawPolygon[red](U,V,W)
+ \tkzLabelPoints[red](U,V,W)
+ \tkzLabelPoints(A,B,C,X,Y,Z)
+ \tkzDrawLine[blue](I,J)
+ \tkzLabelPoints[blue,right](O,N,G,H,I,J)
+ \tkzDrawPoints(I,J,U,V,W)
+ \tkzDrawPoints(A,B,C,N,G,H,O,X,Y,Z,Ma,Mb,Mc,Ha,Hb,Hc)
+ \tkzDrawEllipse[blue](N,\tkzUseLua{a},\tkzUseLua{b},\tkzUseLua{ang})
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
+
+% subsection hexagram (end)
+
+\subsection{Gold Arbelos properties} % (fold)
+\label{sub:gold_arbelos_properties}
\begin{tkzelements}
+scale = .7
z.A = point : new(0,0)
z.B = point : new(10,0)
z.C = gold_segment_ (z.A,z.B)
@@ -2280,6 +2233,48 @@ z.W = intersection (L.UV,L.O1D)
z.O = C.DC : inversion (z.W)
\end{tkzelements}
+\begin{minipage}{.4\textwidth}
+\begin{Verbatim}
+\begin{tkzelements}
+ z.A = point : new(0,0)
+ z.B = point : new(10,0)
+ z.C = gold_segment_ (z.A,z.B)
+ L.AB = line:new (z.A,z.B)
+ z.O_1 = L.AB.mid
+ L.AC = line:new (z.A,z.C)
+ z.O_2 = L.AC.mid
+ L.CB = line:new (z.C,z.B)
+ z.O_3 = L.CB.mid
+ C1 = circle:new (z.O_1,z.B)
+ C2 = circle:new (z.O_2,z.C)
+ C3 = circle:new (z.O_3,z.B)
+ z.Q = C2.north
+ z.P = C3.north
+ L1 = line:new (z.O_2,z.O_3)
+ z.M_0 = L1:harmonic_ext (z.C)
+ L2 = line:new (z.O_1,z.O_2)
+ z.M_1 = L2:harmonic_int (z.A)
+ L3 = line:new (z.O_1,z.O_3)
+ z.M_2 = L3:harmonic_int (z.B)
+ Lbq = line:new (z.B,z.Q)
+ Lap = line:new (z.A,z.P)
+ z.S = intersection (Lbq,Lap)
+ z.x = z.C: north ()
+ L = line : new (z.C,z.x)
+ z.D,_ = intersection (L,C1)
+ L.CD = line :new (z.C,z.D)
+ z.O_7 = L.CD.mid
+ C.DC = circle: new (z.D,z.C)
+ z.U,z.V = intersection (C.DC,C1)
+ L.UV = line :new (z.U,z.V)
+ z.R ,z.S = L.UV : projection (z.O_2,z.O_3)
+ L.O1D = line : new (z.O_1,z.D)
+ z.W = intersection (L.UV,L.O1D)
+ z.O = C.DC : inversion (z.W)
+\end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.6\textwidth}
\hspace*{\fill}
\begin{tikzpicture}
\tkzGetNodes
@@ -2310,11 +2305,43 @@ z.O = C.DC : inversion (z.W)
\tkzLabelPoints[below right](B,U,W,O_7)
\end{tikzpicture}
\hspace*{\fill}
+\end{minipage}
+
+\begin{Verbatim}
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawCircles[teal](O_1,B)
+ \tkzDrawSemiCircles[thin,teal](O_2,C O_3,B)
+ \tkzDrawArc[purple,delta=0](D,V)(U)
+ \tkzDrawCircle[new](O_7,C)
+ \tkzDrawSegments[thin,purple](A,D D,B C,R C,S C,D U,V)
+ \tkzDrawSegments[thin,red](O,D A,O O,B)
+ \tkzDrawPoints(A,B,C,D,O_7) %,
+ \tkzDrawPoints(O_1,O_2,O_3,U,V,R,S,W,O)
+ \tkzDrawSegments[cyan](O_3,S O_2,R)
+ \tkzDrawSegments[very thin](A,B)
+ \tkzDrawSegments[cyan,thin](C,U U,D)
+ \tkzMarkRightAngles[size=.2,fill=gray!40,opacity=.4](D,C,A A,D,B
+ D,S,C D,W,V O_3,S,U O_2,R,U)
+ \tkzFillAngles[cyan!40,opacity=.4](B,A,D A,D,O_1
+ C,D,B D,C,R B,C,S A,R,O_2)
+ \tkzFillAngles[green!40,opacity=.4](S,C,D W,R,D
+ D,B,C R,C,A O_3,S,B)
+ \tkzLabelPoints[below](C,O_2,O_3,O_1)
+ \tkzLabelPoints[above](D)
+ \tkzLabelPoints[below](O)
+ \tkzLabelPoints[below left](A)
+ \tkzLabelPoints[above left](R)
+ \tkzLabelPoints[above right](S)
+ \tkzLabelPoints[left](V)
+ \tkzLabelPoints[below right](B,U,W,O_7)
+\end{tikzpicture}
+\end{Verbatim}
% subsection gold_arbelos_properties (end)
\subsection{Apollonius circle v1 with inversion} % (fold)
\label{sub:apollonius_circle_v1_with_inversion}
-\begin{tkzexample}[code only,small]
+\begin{Verbatim}
\begin{tkzelements}
scale = .7
z.A = point: new (0,0)
@@ -2350,7 +2377,7 @@ z.O = C.DC : inversion (z.W)
\tkzDrawPoints[teal](S)
\tkzLabelPoints(A,B,C,O,S,N)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
scale = .5
@@ -2394,7 +2421,7 @@ z.O = C.DC : inversion (z.W)
\subsection{Apollonius circle v2} % (fold)
\label{sub:apollonius_circle_v2}
- \begin{tkzexample}[small,code only]
+\begin{Verbatim}
\begin{tkzelements}
scale = .5
z.A = point: new (0,0)
@@ -2434,7 +2461,7 @@ z.O = C.DC : inversion (z.W)
\tkzDrawPoints[red](N,O,L,S,o,t)
\tkzLabelPoints[right,font=\tiny](A,B,C,Ja,Jb,Jc,O,N,L,S,Ma,o)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
scale =.5
@@ -2484,7 +2511,7 @@ z.t = intersection (L.ox,L.MaS) -- through
\subsection{Orthogonal circles v1} % (fold)
\label{sub:orthogonal_circles_v1}
-\begin{tkzexample}[small,code only]
+\begin{Verbatim}
\begin{tkzelements}
scale = .6
z.C_1 = point: new (0,0)
@@ -2509,7 +2536,7 @@ z.t = intersection (L.ox,L.MaS) -- through
\tkzLabelCircle[left=10pt](C_1,T)(180){Circle 1}
\tkzLabelCircle[right=10pt](C_2,T)(180){Circle 2}
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
scale = .6
@@ -2542,7 +2569,7 @@ z.S,z.T = get_points (C: orthogonal_from (z.C_2))
\subsection{Orthogonal circles v2} % (fold)
\label{sub:orthogonal_circles_v2}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
scale = .75
z.O = point: new (2,2)
@@ -2575,7 +2602,7 @@ z.M = L.OOp.mid
\tkzLabelPoint[below](T'){$T'$}
\tkzLabelPoint[above left](O'){$O'$}
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
scale = .75
@@ -2617,7 +2644,7 @@ z.M = L.OOp.mid
\subsection{Orthogonal circle to two circles} % (fold)
\label{sub:orthogonal_circle_to_two_circles}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.O = point : new (-1,0)
z.B = point : new (0,2)
@@ -2645,7 +2672,7 @@ z.M = L.OOp.mid
\tkzDrawPoints(O,O',T,M,T',K,K')
\tkzLabelPoints(O,O',T,T',M,K,K')
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
scale = 1.25
@@ -2761,7 +2788,7 @@ z.H_4,z.F,z.E,z.H_0 = L.AB : projection (z.O_4,z.G,z.H,z.P_0)
\end{tikzpicture}
\hspace*{\fill}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new (0 , 0)
z.B = point: new (10 , 0)
@@ -2808,9 +2835,9 @@ z.H_4,z.F,z.E,z.H_0 = L.AB : projection (z.O_4,z.G,z.H,z.P_0)
z.Ap = z.M_1: symmetry (z.A)
z.H_4,z.F,z.E,z.H_0 = L.AB : projection (z.O_4,z.G,z.H,z.P_0)
\end{tkzelements}
-\end{tkzexample}
+\end{Verbatim}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawCircle[thin,fill=green!10](O_4,P_0)
@@ -2839,14 +2866,14 @@ z.H_4,z.F,z.E,z.H_0 = L.AB : projection (z.O_4,z.G,z.H,z.P_0)
\tkzLabelCircle[left,font=\scriptsize](O_4,P_2)(60){$(\delta)$}
\tkzLabelCircle[above left,font=\scriptsize](O_5,C)(40){$(\epsilon)$}
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
% subsection midcircles (end)
\subsection{Pencil v1} % (fold)
\label{sub:pencil_v1}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
scale = .75
z.A = point : new (0,2)
@@ -2873,7 +2900,7 @@ z.H_4,z.F,z.E,z.H_0 = L.AB : projection (z.O_4,z.G,z.H,z.P_0)
\tkzLabelPoints[below right](A,B,C_0,C_1,M_0,M_1,x,y)
\tkzLabelLine[pos=1.25,right]( M_0,M_1){$(\Delta)$}
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
scale=.75
@@ -2908,7 +2935,7 @@ z.O = L.BA.mid
\subsection{Pencil v2} % (fold)
\label{sub:pencil_v2}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
scale=.75
z.A = point : new (0,0)
@@ -2937,7 +2964,7 @@ z.O = L.BA.mid
\tkzLabelPoints[below right](A,B,C_0,C_1,M_0,M_1,M_2)
\tkzLabelLine[pos=2,right]( M_0,M_1){$(\Delta)$}
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
scale=.75
@@ -2975,7 +3002,7 @@ z.O = L.BA.mid
\subsection{Power v1} % (fold)
\label{sub:power_v1}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.O = point : new (0,0)
z.A = point : new (2,-2)
@@ -2994,7 +3021,7 @@ z.O = L.BA.mid
\tkzLabelPoints(O,A,A',M,B)
\tkzDrawSegments[-Triangle](M,A M,A')
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
\begin{tkzelements}
@@ -3024,7 +3051,7 @@ z.B = intersection (L.AM, C.OA)
\subsection{Power v2} % (fold)
\label{sub:power_v2}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.O = point : new (0,0)
z.A = point : new (2,2)
@@ -3047,7 +3074,7 @@ z.B = intersection (L.AM, C.OA)
\tkzLabelPoints[below left](A',B)
\tkzDrawSegments(M,A M,A')
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
\begin{tkzelements}
@@ -3079,7 +3106,7 @@ z.U,z.V = intersection (L.mM,C.OA)
\subsection{Reim v1} % (fold)
\label{sub:reim_v1}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new (0,0)
z.E = point: new (-2,2)
@@ -3110,7 +3137,7 @@ z.U,z.V = intersection (L.mM,C.OA)
\tkzMarkAngles[size=.5](F,C,H G,D,E)
\tkzFillAngles[red!40,opacity=.4,size=.5](F,C,H G,D,E)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
z.A = point: new (0,0)
@@ -3149,7 +3176,7 @@ z.U,z.V = intersection (L.mM,C.OA)
\subsection{Reim v2} % (fold)
\label{sub:reim_v2}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
scale = .6
z.A = point: new (0,0)
@@ -3175,10 +3202,10 @@ z.U,z.V = intersection (L.mM,C.OA)
\tkzLabelCircle[below=4pt,font=\scriptsize](A,C)(90){$(\alpha)$}
\tkzLabelCircle[left=4pt,font=\scriptsize](B,C)(-90){$(\beta)$}
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
-scale = .6
+scale = .4
z.A = point: new (0,0)
z.B = point: new (10,0)
z.C = point: new (4,0)
@@ -3209,7 +3236,7 @@ z.n,z.np = get_points (C.BC: tangent_at (z.N))
\subsection{Reim v3} % (fold)
\label{sub:reim_v3}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new (0,0)
z.B = point: new (8,0)
@@ -3247,10 +3274,10 @@ z.n,z.np = get_points (C.BC: tangent_at (z.N))
\tkzLabelCircle[left=4pt,font=\scriptsize](y,B)(60){$(\beta)$}
\tkzLabelCircle[below=4pt,font=\scriptsize](z,C)(60){$(\gamma)$}
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
- scale = 1.25
+ scale = .75
z.A = point: new (0,0)
z.B = point: new (8,0)
z.C = point: new (2,6)
@@ -3294,7 +3321,7 @@ z.n,z.np = get_points (C.BC: tangent_at (z.N))
\subsection{Tangent and circle} % (fold)
\label{sub:tangent_and_circle}
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new (1,0)
z.B = point: new (2,2)
@@ -3315,7 +3342,7 @@ z.n,z.np = get_points (C.BC: tangent_at (z.N))
\tkzDrawLines(E,i E,j k,l)
\tkzLabelPoints[right,font=\small](A,B,E,S,M)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -3345,7 +3372,7 @@ z.k,z.l = get_points (C.AB: tangent_at (z.B))
\subsection{Homothety} % (fold)
\label{sub:homothety}
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new (0,0)
z.B = point: new (1,2)
@@ -3359,7 +3386,7 @@ z.k,z.l = get_points (C.AB: tangent_at (z.B))
\tkzDrawCircles(A,B C,D)
\tkzDrawLines(E,C E,D)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -3382,7 +3409,7 @@ z.C,z.D = z.E : homothety(2,z.A,z.B)
\subsection{Tangent and chord} % (fold)
\label{sub:tangent_and_chord}
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale = .8
z.A = point: new (0 , 0)
@@ -3409,7 +3436,7 @@ z.C,z.D = z.E : homothety(2,z.A,z.B)
\tkzFillAngles[teal!20,opacity=.3](A,D,B b2,B,A)
\tkzLabelPoints(A,B,C,D,H,O)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -3447,7 +3474,7 @@ z.H = L.AB: projection (z.O)
\subsection{Three chords} % (fold)
\label{sub:three_chords}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.O = point: new (0 , 0)
z.B = point: new (0 , 2)
@@ -3477,25 +3504,8 @@ z.Ap = intersection (L.GB,C.xB)
z.Ep,_ = intersection (L.GE,C.xF)
z.Cp,_ = intersection (L.GD,C.xD)
\end{tkzelements}
-\begin{tikzpicture}
- \tkzGetNodes
- \tkzDrawCircles(O,B)
- \tkzDrawCircles[cyan](P,B)
- \tkzDrawCircles[red](w,E)
- \tkzDrawCircles[new](x,F)
- \tkzDrawSegments(A,G E,G C,G)
- \tkzDrawPolygons[new](A,E,C A',E',C')
- \tkzDrawPoints(A,...,G,A',E',C',O,P)
- \begin{scope}[font=\scriptsize]
- \tkzLabelPoints(A,...,F)
- \tkzLabelPoints[above left](G,A',E',C')
- \tkzLabelCircle[left](O,B)(30){$(\beta)$}
- \tkzLabelCircle[below](P,A)(40){$(\gamma)$}
- \tkzLabelCircle[right](w,C)(90){$(\alpha)$}
- \tkzLabelCircle[left](x,B)(-230){$((\delta))$}
- \end{scope}
-\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
+
\begin{tkzelements}
z.O = point: new (0 , 0)
@@ -3527,8 +3537,31 @@ z.Ep,_ = intersection (L.GE,C.xF)
z.Cp,_ = intersection (L.GD,C.xD)
\end{tkzelements}
+\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
+\begin{Verbatim}
+ \begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawCircles(O,B)
+ \tkzDrawCircles[cyan](P,B)
+ \tkzDrawCircles[red](w,E)
+ \tkzDrawCircles[new](x,F)
+ \tkzDrawSegments(A,G E,G C,G)
+ \tkzDrawPolygons[new](A,E,C A',E',C')
+ \tkzDrawPoints(A,...,G,A',E',C',O,P)
+ \begin{scope}[font=\scriptsize]
+ \tkzLabelPoints(A,...,F)
+ \tkzLabelPoints[above left](G,A',E',C')
+ \tkzLabelCircle[left](O,B)(30){$(\beta)$}
+ \tkzLabelCircle[below](P,A)(40){$(\gamma)$}
+ \tkzLabelCircle[right](w,C)(90){$(\alpha)$}
+ \tkzLabelCircle[left](x,B)(-230){$((\delta))$}
+ \end{scope}
+ \end{tikzpicture}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
\hspace*{\fill}
-\begin{tikzpicture}
+\begin{tikzpicture}[scale=.75]
\tkzGetNodes
\tkzDrawCircles(O,B)
\tkzDrawCircles[cyan](P,B)
@@ -3547,13 +3580,14 @@ z.Cp,_ = intersection (L.GD,C.xD)
\end{scope}
\end{tikzpicture}
\hspace*{\fill}
+\end{minipage}
% subsection three_chords (end)
\subsection{Three tangents} % (fold)
\label{sub:three_tangents}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new (-1 , 0)
z.C = point: new (4 , -1.5)
@@ -3583,7 +3617,7 @@ z.Cp,_ = intersection (L.GD,C.xD)
\tkzLabelPoints[above right](E,F)
\tkzLabelPoints[below](C)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
\begin{tkzelements}
@@ -3624,7 +3658,7 @@ z.I = intersection (L.TA,L.TC)
\subsection{Midarc} % (fold)
\label{sub:midarc}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new (-1,0)
z.B = point: new (2,4)
@@ -3639,7 +3673,7 @@ z.I = intersection (L.TA,L.TC)
\tkzDrawPoints(A,...,D)
\tkzLabelPoints(A,...,D)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
\begin{tkzelements}
@@ -3658,6 +3692,7 @@ z.D = C.AB: midarc (z.B,z.C)
\tkzDrawPoints(A,...,D)
\tkzLabelPoints(A,...,D)
\end{tikzpicture}
+\hspace*{\fill}
\end{minipage}
% subsection midarc (end)
@@ -3665,7 +3700,7 @@ z.D = C.AB: midarc (z.B,z.C)
\label{sub:lemoine_line_without_macro}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale = 1.6
z.A = point: new (1,0)
@@ -3697,7 +3732,7 @@ z.D = C.AB: midarc (z.B,z.C)
\tkzDrawLines[red](Ar,Al Br,Q Cr,Cl)
\tkzDrawSegments(A,R C,P C,Q)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
\begin{tkzelements}
@@ -3740,7 +3775,7 @@ z.R = intersection (L.tC,L.AB)
\label{sub:first_lemoine_circle}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new (1,1)
z.B = point: new (5,1)
@@ -3758,7 +3793,7 @@ z.R = intersection (L.tC,L.AB)
\tkzLabelPoints(A,B,C,o,w,O,L)
\tkzDrawCircles(o,w O,A)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
\begin{tkzelements}
@@ -3771,20 +3806,21 @@ z.o,z.w = get_points (T : first_lemoine_circle ())
z.L = T : lemoine_point ()
\end{tkzelements}
\hspace*{\fill}
-\begin{tikzpicture}
+\begin{tikzpicture}[scale = 1.25]
\tkzGetNodes
\tkzDrawPolygons(A,B,C)
\tkzDrawPoints(A,B,C,o,w,O,L)
\tkzLabelPoints(A,B,C,o,w,O,L)
\tkzDrawCircles(o,w O,A)
\end{tikzpicture}
+\hspace*{\fill}
\end{minipage}
% subsection first_lemoine_circle (end)
\subsection{First and second Lemoine circles} % (fold)
\label{sub:first_and_second_lemoine_circles}
-\begin{tkzexample}[latex=0cm,small,code only]
+\begin{Verbatim}
\begin{tkzelements}
scale = 2
z.a = point: new (0,0)
@@ -3820,7 +3856,7 @@ z.L = T : lemoine_point ()
\tkzDrawCircles(L,x o,p O,a)
\tkzDrawSegments(L,O x1,x4 x2,x5 x3,x6)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\begin{tkzelements}
scale = 2
@@ -3848,7 +3884,7 @@ L.y2y3 = line : new (z.y2,z.y3)
\end{tkzelements}
\hspace*{\fill}
-\begin{tikzpicture}
+\begin{tikzpicture}[scale = .75]
\tkzGetNodes
\tkzDrawPolygons(a,b,c y1,y2,y3,y4,y5,y6)
\tkzDrawPoints(x1,x2,x3,x4,x5,x6,L)
@@ -3865,34 +3901,6 @@ L.y2y3 = line : new (z.y2,z.y3)
\subsection{Inversion} % (fold)
\label{sub:inversion}
-\begin{tkzexample}[latex=0cm,small,code only]
- \begin{tkzelements}
- z.A = point: new (-1,0)
- z.B = point: new (2,2)
- z.C = point: new (2,4)
- z.E = point: new (1,6)
- C.AC = circle: new (z.A,z.C)
- L.Tt1,L.Tt2 = C.AC: tangent_from (z.E)
- z.t1 = L.Tt1.pb
- z.t2 = L.Tt2.pb
- L.AE = line: new (z.A,z.E)
- z.H = L.AE : projection (z.t1)
- z.Bp,
- z.Ep,
- z.Cp = C.AC: inversion ( z.B, z.E, z.C )
-\end{tkzelements}
-
-\begin{tikzpicture}
- \tkzGetNodes
- \tkzDrawPoints(A,B,C)
- \tkzDrawCircles(A,C A,B)
- \tkzDrawLines(A,B' E,t1 E,t2 t1,t2 A,E)
- \tkzDrawPoints(A,B,C,E,t1,t2,H,B',E')
- \tkzLabelPoints(A,B,C,E,t1,t2,B',E')
- \tkzLabelPoints[above](C')
-\end{tikzpicture}
-\end{tkzexample}
-
\begin{tkzelements}
scale = .75
z.A = point: new (-1,0)
@@ -3910,7 +3918,26 @@ z.Ep,
z.Cp = C.AC: inversion ( z.B, z.E, z.C )
\end{tkzelements}
-\hspace*{\fill}
+
+\begin{minipage}{.5\textwidth}
+\begin{Verbatim}
+ \begin{tkzelements}
+ z.A = point: new (-1,0)
+ z.B = point: new (2,2)
+ z.C = point: new (2,4)
+ z.E = point: new (1,6)
+ C.AC = circle: new (z.A,z.C)
+ L.Tt1,
+ L.Tt2 = C.AC: tangent_from (z.E)
+ z.t1 = L.Tt1.pb
+ z.t2 = L.Tt2.pb
+ L.AE = line: new (z.A,z.E)
+ z.H = L.AE : projection (z.t1)
+ z.Bp,
+ z.Ep,
+ z.Cp = C.AC: inversion ( z.B, z.E, z.C )
+\end{tkzelements}
+
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawPoints(A,B,C)
@@ -3920,14 +3947,26 @@ z.Cp = C.AC: inversion ( z.B, z.E, z.C )
\tkzLabelPoints(A,B,C,E,t1,t2,B',E')
\tkzLabelPoints[above](C')
\end{tikzpicture}
-\hspace*{\fill}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+ \begin{tikzpicture}[scale=.75]
+ \tkzGetNodes
+ \tkzDrawPoints(A,B,C)
+ \tkzDrawCircles(A,C A,B)
+ \tkzDrawLines(A,B' E,t1 E,t2 t1,t2 A,E)
+ \tkzDrawPoints(A,B,C,E,t1,t2,H,B',E')
+ \tkzLabelPoints(A,B,C,E,t1,t2,B',E')
+ \tkzLabelPoints[above](C')
+ \end{tikzpicture}
+\end{minipage}
% subsection inversion (end)
\subsection{Gergonne point} % (fold)
\label{sub:gergonne_point}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.a = point: new(1,0)
z.b = point: new(6,2)
@@ -3945,7 +3984,7 @@ z.ta,z.tb,z.tc = get_points (T : intouch ())
\tkzDrawSegments (a,ta b,tb c,tc)
\tkzDrawCircle(i,ta)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
\begin{tkzelements}
@@ -3975,7 +4014,7 @@ z.ta,z.tb,z.tc = get_points (T : intouch ())
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.a = point: new (0,0)
z.b = point: new (5,0)
@@ -3999,7 +4038,7 @@ z.ta,z.tb,z.tc = get_points (T : intouch ())
\tkzDrawSegments(x_0,x_1 y_0,y_1 z_0,z_1)
\tkzDrawCircle(L,x_0)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -4032,7 +4071,7 @@ z.z_0,z.z_1 = get_points (L.anti)
\subsection{Soddy circle without function} % (fold)
\label{sub:soddy}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
z.B = point : new ( 5 , 0 )
@@ -4077,7 +4116,7 @@ z.Xip,z.Yip,z.Zip = C.ins : inversion (z.Xi,z.Yi,z.Zi)
\tkzDrawLines(X',Ha Y',Hb Z',Hc)
\tkzDrawLines(X',E Y',F Z',G)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
@@ -4128,7 +4167,6 @@ z.Xip,z.Yip,z.Zip = C.ins : inversion (z.Xi,z.Yi,z.Zi)
\subsection{Soddy circle with function} % (fold)
\label{sub:soddy_circle_with_function}
-\begin{verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
z.B = point : new ( 5 , 0 )
@@ -4145,9 +4183,33 @@ C.soddy_ext = C.ins : inversion (C.soddy_int)
z.w = C.soddy_ext.center
z.t = C.soddy_ext.through
z.Xip,z.Yip,z.Zip = C.ins : inversion (z.xi,z.yi,z.zi)
- \end{tkzelements}
+\end{tkzelements}
-\begin{tikzpicture}
+\begin{minipage}{.5\textwidth}
+ \begin{Verbatim}
+ \begin{tkzelements}
+ z.A = point : new ( 0 , 0 )
+ z.B = point : new ( 5 , 0 )
+ z.C = point : new (4 , 4 )
+ T.ABC = triangle : new ( z.A,z.B,z.C )
+ z.I = T.ABC.incenter
+ z.E,z.F,z.G = T.ABC : projection (z.I)
+ T.orthic = T.ABC : orthic ()
+ z.Ha,z.Hb,z.Hc = get_points (T.orthic)
+ C.ins = circle : new (z.I,z.E)
+ z.s,z.xi,z.yi,
+ z.zi = T.ABC : soddy_center ()
+ C.soddy_int = circle : new (z.s,z.xi)
+ C.soddy_ext = C.ins : inversion (C.soddy_int)
+ z.w = C.soddy_ext.center
+ z.t = C.soddy_ext.through
+ z.Xip,z.Yip,
+ z.Zip = C.ins : inversion (z.xi,z.yi,z.zi)
+ \end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+\begin{tikzpicture}[scale=.6]
\tkzGetNodes
\tkzDrawPolygon(A,B,C)
\tkzDrawCircles(A,G B,E C,F I,E s,xi w,t)
@@ -4156,28 +4218,10 @@ z.Xip,z.Yip,z.Zip = C.ins : inversion (z.xi,z.yi,z.zi)
\tkzDrawPoints(A,B,C,E,F,G,Ha,Hb,Hc,xi,yi,zi,I)
\tkzDrawPoints(Xi',Yi',Zi')
\tkzLabelPoints(A,B,C,E,F,G)
-\tkzDrawCircles(A,G B,E C,F I,E w,s)
\end{tikzpicture}
-\end{verbatim}
-
-\begin{tkzelements}
-z.A = point : new ( 0 , 0 )
-z.B = point : new ( 5 , 0 )
-z.C = point : new (4 , 4 )
-T.ABC = triangle : new ( z.A,z.B,z.C )
-z.I = T.ABC.incenter
-z.E,z.F,z.G = T.ABC : projection (z.I)
-T.orthic = T.ABC : orthic ()
-z.Ha,z.Hb,z.Hc = get_points (T.orthic)
-C.ins = circle : new (z.I,z.E)
-z.s,z.xi,z.yi,z.zi = T.ABC : soddy_center ()
-C.soddy_int = circle : new (z.s,z.xi)
-C.soddy_ext = C.ins : inversion (C.soddy_int)
-z.w = C.soddy_ext.center
-z.t = C.soddy_ext.through
-z.Xip,z.Yip,z.Zip = C.ins : inversion (z.xi,z.yi,z.zi)
- \end{tkzelements}
+\end{minipage}
+\begin{Verbatim}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawPolygon(A,B,C)
@@ -4187,8 +4231,9 @@ z.Xip,z.Yip,z.Zip = C.ins : inversion (z.xi,z.yi,z.zi)
\tkzDrawPoints(A,B,C,E,F,G,Ha,Hb,Hc,xi,yi,zi,I)
\tkzDrawPoints(Xi',Yi',Zi')
\tkzLabelPoints(A,B,C,E,F,G)
-\tkzDrawCircles(A,G B,E C,F I,E w,s)
\end{tikzpicture}
+\end{Verbatim}
+
% subsection soddy_circle_with_function (end)
@@ -4244,8 +4289,8 @@ Les cercles de centre $J_i$ et de diamètre $S_iT_i$ ont pour images les cercles
\tkzLabelPoint(H'){$H'_\i$}}
\end{tikzpicture}
-\begin{verbatim}
\begin{tkzelements}
+ scale =.75
xC,nc = 10,16
xB = xC/tkzphi
xD = (xC*xC)/xB
@@ -4273,49 +4318,39 @@ Les cercles de centre $J_i$ et de diamètre $S_iT_i$ ont pour images les cercles
end
\end{tkzelements}
-\def\nc{\tkzUseLua{nc}}
-
-\begin{tikzpicture}[ultra thin]
- \tkzGetNodes
- \tkzDrawCircle[fill=teal!20](i,C)
- \tkzDrawCircle[fill=PineGreen!60](j,B)
- \foreach \i in {-\nc,...,0,...,\nc} {
- \tkzDrawCircle[fill=teal]({I\i},{S\i'})
- }
-\end{tikzpicture}
-
-\end{verbatim}
-
+\begin{Verbatim}
\begin{tkzelements}
- xC,nc = 10,16
- xB = xC/tkzphi
- xD = (xC*xC)/xB
- xJ = (xC+xD)/2
- r = xD-xJ
- z.A = point : new ( 0 , 0 )
- z.B = point : new ( xB , 0)
- z.C = point : new ( xC , 0)
- L.AC = line : new (z.A,z.C)
- z.i = L.AC.mid
- L.AB = line:new (z.A,z.B)
- z.j = L.AB.mid
- z.D = point : new ( xD , 0)
- C.AC = circle: new (z.A,z.C)
- for i = -nc,nc do
- z["J"..i] = point: new (xJ,2*r*i)
- z["H"..i] = point: new (xJ,2*r*i-r)
- z["J"..i.."p"], z["H"..i.."p"] = C.AC : inversion (z["J"..i],z["H"..i])
- L.AJ = line : new (z.A,z["J"..i])
- C.JH = circle: new ( z["J"..i] , z["H"..i])
- z["S"..i], z["T"..i] = intersection (L.AJ,C.JH)
- z["S"..i.."p"], z["T"..i.."p"] = C.AC : inversion (z["S"..i],z["T"..i])
- L.SpTp = line:new ( z["S"..i.."p"], z["T"..i.."p"])
- z["I"..i] = L.SpTp.mid
- end
+ xC,nc = 10,16
+ xB = xC/tkzphi
+ xD = (xC*xC)/xB
+ xJ = (xC+xD)/2
+ r = xD-xJ
+ z.A = point : new ( 0 , 0 )
+ z.B = point : new ( xB , 0)
+ z.C = point : new ( xC , 0)
+ L.AC = line : new (z.A,z.C)
+ z.i = L.AC.mid
+ L.AB = line:new (z.A,z.B)
+ z.j = L.AB.mid
+ z.D = point : new ( xD , 0)
+ C.AC = circle: new (z.A,z.C)
+ for i = -nc,nc do
+ z["J"..i] = point: new (xJ,2*r*i)
+ z["H"..i] = point: new (xJ,2*r*i-r)
+ z["J"..i.."p"], z["H"..i.."p"] = C.AC : inversion (z["J"..i],z["H"..i])
+ L.AJ = line : new (z.A,z["J"..i])
+ C.JH = circle: new ( z["J"..i] , z["H"..i])
+ z["S"..i], z["T"..i] = intersection (L.AJ,C.JH)
+ z["S"..i.."p"], z["T"..i.."p"] = C.AC : inversion (z["S"..i],z["T"..i])
+ L.SpTp = line:new ( z["S"..i.."p"], z["T"..i.."p"])
+ z["I"..i] = L.SpTp.mid
+ end
\end{tkzelements}
+\end{Verbatim}
+\begin{minipage}{.5\textwidth}
+\begin{Verbatim}
\def\nc{\tkzUseLua{nc}}
-
\begin{tikzpicture}[ultra thin]
\tkzGetNodes
\tkzDrawCircle[fill=teal!20](i,C)
@@ -4324,14 +4359,26 @@ Les cercles de centre $J_i$ et de diamètre $S_iT_i$ ont pour images les cercles
\tkzDrawCircle[fill=teal]({I\i},{S\i'})
}
\end{tikzpicture}
-
-
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+ \def\nc{\tkzUseLua{nc}}
+
+ \begin{tikzpicture}[ultra thin]
+ \tkzGetNodes
+ \tkzDrawCircle[fill=teal!20](i,C)
+ \tkzDrawCircle[fill=PineGreen!60](j,B)
+ \foreach \i in {-\nc,...,0,...,\nc} {
+ \tkzDrawCircle[fill=teal]({I\i},{S\i'})
+ }
+ \end{tikzpicture}
+ \vfill
+\end{minipage}
% subsubsection pappus_chain (end)
\subsection{Three Circles} % (fold)
\label{sub:three_circles}
-\begin{verbatim}
\begin{tkzelements}
function threecircles(c1,r1,c2,r2,c3,h1,h3,h2)
local xk = math.sqrt (r1*r2)
@@ -4348,15 +4395,8 @@ end
threecircles("A",4,"B",3,"C","E","G","F")
\end{tkzelements}
-\begin{tikzpicture}
-\tkzGetNodes
-\tkzDrawSegment[color = red](E,F)
-\tkzDrawCircle[orange,fill=orange!20](A,E)
-\tkzDrawCircle[purple,fill=purple!20](B,F)
-\tkzDrawCircle[teal,fill=teal!20](C,G)
-\end{tikzpicture}
-\end{verbatim}
-
+\begin{minipage}{.5\textwidth}
+\begin{Verbatim}
\begin{tkzelements}
function threecircles(c1,r1,c2,r2,c3,h1,h3,h2)
local xk = math.sqrt (r1*r2)
@@ -4374,19 +4414,28 @@ end
\end{tkzelements}
\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawSegment[color = red](E,F)
+ \tkzDrawCircle[orange,fill=orange!20](A,E)
+ \tkzDrawCircle[purple,fill=purple!20](B,F)
+ \tkzDrawCircle[teal,fill=teal!20](C,G)
+\end{tikzpicture}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+\begin{tikzpicture}[scale=.5]
\tkzGetNodes
\tkzDrawSegment[color = red](E,F)
\tkzDrawCircle[orange,fill=orange!20](A,E)
\tkzDrawCircle[purple,fill=purple!20](B,F)
\tkzDrawCircle[teal,fill=teal!20](C,G)
\end{tikzpicture}
-
+\end{minipage}
% subsection three_circles (end)
\subsection{pentagons in a golden arbelos} % (fold)
\label{sub:golden_arbelos}
-\begin{verbatim}
\begin{tkzelements}
z.A = point: new (0 , 0)
z.B = point: new (10 , 0)
@@ -4407,7 +4456,7 @@ z.L = T.golden.pc
L.O0L = line:new(z.O_0,z.L)
z.D = intersection (L.O0L,C.O0B)
L.DB = line:new(z.D,z.B)
-z.Z = intersection (L.DB,C.O2B)
+_,z.Z = intersection (L.DB,C.O2B)
L.DA = line:new(z.D,z.A)
z.I = intersection (L.DA,C.O1C)
L.O2Z = line:new(z.O_2,z.Z)
@@ -4423,10 +4472,49 @@ kk = tkzphi
z.D_1,z.E_1,z.F_1,z.G_1 = z.B : homothety (k, z.D,z.E,z.F,z.G)
z.D_2,z.E_2,z.F_2,z.G_2 = z.M_0 : homothety (kk,z.D_1,z.E_1,z.F_1,z.G_1)
\end{tkzelements}
-\end{verbatim}
-\begin{verbatim}
-\begin{tikzpicture}[scale=.8]
+\begin{minipage}{.5\textwidth}
+\begin{Verbatim}
+\begin{tkzelements}
+ 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)
+ L.O0C = line:new(z.O_0,z.C)
+ T.golden = L.O0C : golden ()
+ z.L = T.golden.pc
+ L.O0L = line:new(z.O_0,z.L)
+ z.D = intersection (L.O0L,C.O0B)
+ L.DB = line:new(z.D,z.B)
+ z.Z = intersection (L.DB,C.O2B)
+ L.DA = line:new(z.D,z.A)
+ z.I = intersection (L.DA,C.O1C)
+ L.O2Z = line:new(z.O_2,z.Z)
+ z.H = intersection (L.O2Z,C.O0B)
+ C.BD = circle:new (z.B,z.D)
+ C.DB = circle:new (z.D,z.B)
+ _,z.G = intersection (C.BD,C.O0B)
+ z.E = intersection (C.DB,C.O0B)
+ C.GB = circle:new (z.G,z.B)
+ _,z.F = intersection (C.GB,C.O0B)
+ k = 1/tkzphi^2
+ kk = tkzphi
+ z.D_1,z.E_1,z.F_1,z.G_1 = z.B : homothety (k, z.D,z.E,z.F,z.G)
+ z.D_2,z.E_2,z.F_2,z.G_2 = z.M_0 : homothety (kk,z.D_1,z.E_1,z.F_1,z.G_1)
+\end{tkzelements}
+\end{Verbatim}
+\end{minipage}
+\begin{minipage}{.5\textwidth}
+\begin{tikzpicture}[scale=.7]
\tkzGetNodes
\tkzDrawPolygon[red](O_2,O_0,I,D,H)
\tkzDrawPolygon[blue](B,D_1,E_1,F_1,G_1)
@@ -4451,46 +4539,9 @@ z.D_2,z.E_2,z.F_2,z.G_2 = z.M_0 : homothety (kk,z.D_1,z.E_1,z.F_1,z.G_1)
\tkzLabelPoints(D_1,G_1)
\tkzLabelPoints(D_2,G_2)
\end{tikzpicture}
-\vspace{\fill}
-\end{verbatim}
+\end{minipage}
-\begin{tkzelements}
-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)
-L.O0C = line:new(z.O_0,z.C)
-T.golden = L.O0C : golden ()
-z.L = T.golden.pc
-L.O0L = line:new(z.O_0,z.L)
-z.D = intersection (L.O0L,C.O0B)
-L.DB = line:new(z.D,z.B)
-_,z.Z = intersection (L.DB,C.O2B)
-L.DA = line:new(z.D,z.A)
-z.I = intersection (L.DA,C.O1C)
-L.O2Z = line:new(z.O_2,z.Z)
-_,z.H = intersection (L.O2Z,C.O0B)
-C.BD = circle:new (z.B,z.D)
-C.DB = circle:new (z.D,z.B)
-_,z.G = intersection (C.BD,C.O0B)
-z.E = intersection (C.DB,C.O0B)
-C.GB = circle:new (z.G,z.B)
-_,z.F = intersection (C.GB,C.O0B)
-k = 1/tkzphi^2
-kk = tkzphi
-z.D_1,z.E_1,z.F_1,z.G_1 = z.B : homothety (k, z.D,z.E,z.F,z.G)
-z.D_2,z.E_2,z.F_2,z.G_2 = z.M_0 : homothety (kk,z.D_1,z.E_1,z.F_1,z.G_1)
-\end{tkzelements}
-\vspace{\fill}
+\begin{Verbatim}
\begin{tikzpicture}[scale=.8]
\tkzGetNodes
\tkzDrawPolygon[red](O_2,O_0,I,D,H)
@@ -4516,5 +4567,8 @@ z.D_2,z.E_2,z.F_2,z.G_2 = z.M_0 : homothety (kk,z.D_1,z.E_1,z.F_1,z.G_1)
\tkzLabelPoints(D_1,G_1)
\tkzLabelPoints(D_2,G_2)
\end{tikzpicture}
-\vspace{\fill}
+\end{Verbatim}
+
+
+
% subsection golden_arbelos (end) \ No newline at end of file
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 3bfc5fc4ea..6f58cbec5c 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
@@ -14,8 +14,9 @@ Tables are the only data structure "container" integrated in Lua.
Tables are created using table constructors, the simplest of which is the use of braces, e.g. \{ \}. This defines an empty table.
\begin{mybox}
- \begin{verbatim}
- F = {"banana", "apple", "cherry"}\end{verbatim}
+\begin{Verbatim}
+ F = {"banana", "apple", "cherry"}
+\end{Verbatim}
\end{mybox}
@@ -25,8 +26,9 @@ print(F[2]) --> pomme
qui peut être également définit par
\begin{mybox}
- \begin{verbatim}
- FR = {[1] = "banana", [3] = "cherry", [2] = "apple"}\end{verbatim}
+\begin{Verbatim}
+ FR = {[1] = "banana", [3] = "cherry", [2] = "apple"}
+\end{Verbatim}
\end{mybox}
@@ -35,12 +37,13 @@ print(FR[3]) --> cherry
FR[4]="orange"
\begin{mybox}
- \begin{verbatim}
- print(#FR)
- -- I for Index
- for I,V in ipairs(FR) do
- print(I,V)
- end \end{verbatim}
+\begin{Verbatim}
+ print(#FR)
+ -- I for Index
+ for I,V in ipairs(FR) do
+ print(I,V)
+ end
+\end{Verbatim}
\end{mybox}
1 banana\\
@@ -49,16 +52,18 @@ FR[4]="orange"
4 orange\\
\begin{mybox}
-\begin{verbatim}
+\begin{Verbatim}
C = {["banana"] = "yellow" , ["apple"] = "green" , ["cherry"] = "red" }
-C.orange = "orange"\end{verbatim}
+C.orange = "orange"
+\end{Verbatim}
\end{mybox}
\begin{mybox}
-\begin{verbatim}
+\begin{Verbatim}
for K,V in pairs (C) do
print(K,V)
- end\end{verbatim}
+ end
+\end{Verbatim}
\end{mybox}
banana = yellow
@@ -70,21 +75,23 @@ apple = green
Another useful feature is the ability to create a table to store an unknown number of function parameters, for example:
\begin{mybox}
-\begin{verbatim}
- function ReturnTable (...)
+\begin{Verbatim}
+ function ReturnTable (...)
return table.pack (...)
- end \end{verbatim}
+ end
+\end{Verbatim}
\end{mybox}
\begin{mybox}
- \begin{verbatim}
- function ParamToTable (...)
- mytab = ReturnTable(...)
- for i=1,mytab.n do
- print(mytab[i])
- end
+\begin{Verbatim}
+ function ParamToTable (...)
+ mytab = ReturnTable(...)
+ for i=1,mytab.n do
+ print(mytab[i])
end
- ParamToTable("cherry","apple","orange") \end{verbatim}
+ end
+ ParamToTable("cherry","apple","orange")
+\end{Verbatim}
\end{mybox}
@@ -98,8 +105,9 @@ C.banana but this syntax does not accept numbers.
It's possible to erase a key/value pair from a table, with :
\begin{mybox}
-\begin{verbatim}
-C.banana = nil \end{verbatim}
+\begin{Verbatim}
+ C.banana = nil
+\end{Verbatim}
\end{mybox}
% subsubsection general_tables (end)
@@ -122,15 +130,15 @@ For example, if you wish to display an element, then |tex.print(tostring(z.name)
In addition, we'll see that it's possible to perform operations with the elements of the |z| table.
% subsubsection table_z (end)
-\subsection{Transferts} % (fold)
-\label{sub:transferts}
+\subsection{Transfers} % (fold)
+\label{sub:transfers}
We've seen (sous-section \ref{ssub:points_transfer}) that the macro \Imacro{tkzGetNodes} transfers point coordinates to \TIKZ. Let's take a closer look at this macro:
\vspace*{1em}
\begin{mybox}
-\begin{verbatim}
+\begin{Verbatim}
\def\tkzGetNodes{\directlua{%
for K,V in pairs(z) do
local K,n,sd,ft
@@ -141,11 +149,12 @@ We've seen (sous-section \ref{ssub:points_transfer}) that the macro \Imacro{tkzG
end
tex.print("\\coordinate ("..K..") at ("..V.re..","..V.im..") ;\\\\")
end}
-}\end{verbatim}
+}
+\end{Verbatim}
\end{mybox}
It consists mainly of a loop. The variables used are K (for keys) and V (for Values). To take pairs (key/value) from the |z| table, use the |pairs| function. K becomes the name of a node whose coordinates are |V.re| and |V.im|. Meanwhile, we search for keys with more than one symbol ending in |p|, in order to associate them with the symbol "'" valid in \TIKZ{}.
-% subsection transferts (end)
+% subsection transfers (end)
\subsection{Complex numbers library and point} % (fold)
\label{sub:complex_numbers}
@@ -167,21 +176,21 @@ The difference between |z.A = point : new (1,2)| and |za = point (1,2)| is that
\small
\begin{minipage}{\textwidth}
-\captionof{table}{Point or complex metamethods.}
+\captionof{table}{Point or complex metamethods.}\label{complex:meta}
\begin{tabular}{lll}
\toprule
\textbf{Metamethods} & \textbf{Application} \\
\midrule
-\_\_add(z1,z2) & |z.a + z.b| & affix \\
-\_\_sub(z1,z2) & |z.a - z.b| & affix\\
-\_\_unm(z) & |- z.a| & affix\\
-\_\_mul(z1,z2) & |z.a * z.b| & affix\\
-\_\_concat(z1,z2)& |z.a .. z.b| & dot product = real number \footnote{If $O$ is the origin of the complex plan, then we get the dot product of the vectors $\overrightarrow{Oa}$ and $\overrightarrow{Ob}$} \\
-\_\_pow(z1,z2) & |z.a ^ z.b| & determinant = real number\\
-\_\_div(z1,z2) & |z.a / z.b| & affix \\
-\_\_tostring(z) & tex.print(tostring(z)) & displays the affix \\
-\_\_tonumber(z) & tonumber(z) & affix or nil\\
-\_\_eq(z1,z2) & eq (z.a,z.b) & boolean\\
+\_\_\Immeth{point}{add(z1,z2)} & |z.a + z.b| & affix \\
+\_\_\Immeth{point}{sub(z1,z2)} & |z.a - z.b| & affix\\
+\_\_\Immeth{point}{unm(z)} & |- z.a| & affix\\
+\_\_\Immeth{point}{mul(z1,z2)} & |z.a * z.b| & affix\\
+\_\_\Immeth{point}{concat(z1,z2)}& |z.a .. z.b| & dot product = real number \footnote{If $O$ is the origin of the complex plan, then we get the dot product of the vectors $\overrightarrow{Oa}$ and $\overrightarrow{Ob}$} \\
+\_\_\Immeth{point}{pow(z1,z2)} & |z.a ^ z.b| & determinant = real number\\
+\_\_\Immeth{point}{div(z1,z2)} & |z.a / z.b| & affix \\
+\_\_\Immeth{point}{tostring(z)} & tex.print(tostring(z)) & displays the affix \\
+\_\_\Immeth{point}{tonumber(z)} & tonumber(z) & affix or nil\\
+\_\_\Immeth{point}{eq(z1,z2)} & eq (z.a,z.b) & boolean\\
\bottomrule
\end{tabular}
\end{minipage}
@@ -191,7 +200,7 @@ The difference between |z.A = point : new (1,2)| and |za = point (1,2)| is that
\catcode`_=12
\small
\begin{minipage}{\textwidth}
-\captionof{table}{Point (complex) class methods.}
+\captionof{table}{Point (complex) class methods.}\label{complex:met}
\begin{tabular}{lll}
\toprule
\textbf{Methods} & \textbf{Application}\\
@@ -200,9 +209,9 @@ The difference between |z.A = point : new (1,2)| and |za = point (1,2)| is that
\Imeth{point}{mod(z)} & |z.a : mod()| & real number = modulus |z.a|\\
\Imeth{point}{abs (z)} & |z.a : abs()| & real number = modulus \\
\Imeth{point}{norm (z)} & |z.a : norm()| & norm (real number ) \\
-\Imeth{point}{arg (z)}. & |z.a : arg()| & real number = argument of z.a (in rad)\\
+\Imeth{point}{arg (z)} & |z.a : arg()| & real number = argument of z.a (in rad)\\
\Imeth{point}{get(z)} & |z.a : get()| & re and im (two real numbers ) \\
-\Imeth{point}{sqrt(z)}. & |z.a : sqrt()| & affix \\
+\Imeth{point}{sqrt(z)} & |z.a : sqrt()| & affix \\
\bottomrule
\end{tabular}
\end{minipage}
@@ -237,7 +246,7 @@ This is obtained from the library by writing
Then |z.B = z.A * za| describes a rotation of point A by an angle |a|.
\begin{minipage}{.6\textwidth}
- \begin{verbatim}
+ \begin{Verbatim}
\begin{tkzelements}
z.O = point : new (0,0)
z.A = point : new (1,2)
@@ -252,7 +261,7 @@ Then |z.B = z.A * za| describes a rotation of point A by an angle |a|.
\tkzDrawSegments[dashed](O,A O,B)
\tkzLabelAngle(A,O,B){$\pi/6$}
\end{tikzpicture}
- \end{verbatim}
+ \end{Verbatim}
\end{minipage}
\begin{minipage}{.6\textwidth}
\begin{tkzelements}
@@ -277,7 +286,7 @@ Then |z.B = z.A * za| describes a rotation of point A by an angle |a|.
\label{ssub:point_operations_complex}
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.o = point: new(0,0)
z.a = point: new(1,-1)
@@ -303,7 +312,7 @@ Then |z.B = z.A * za| describes a rotation of point A by an angle |a|.
\tkzDrawPoints(a,...,g,o,a',b')
\tkzLabelPoints(o,a,b,c,d,e,f,g,a',b')
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -344,7 +353,7 @@ Then |z.B = z.A * za| describes a rotation of point A by an angle |a|.
|tp.n| gives the number of pairs. \\
|tp[i][1]| is an affix and |tp[i][2]| the associated weight (real value). 5se the example.
-\begin{verbatim}
+\begin{Verbatim}
function barycenter_ (...)
local tp = table.pack(...)
local i
@@ -356,7 +365,7 @@ Then |z.B = z.A * za| describes a rotation of point A by an angle |a|.
end
return sum/weight
end
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\vspace{1em}
@@ -364,7 +373,7 @@ Then |z.B = z.A * za| describes a rotation of point A by an angle |a|.
\label{ssub:using_the_barycentre}
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new (1,0)
z.B = point: new (5,-1)
@@ -377,7 +386,7 @@ Then |z.B = z.A * za| describes a rotation of point A by an angle |a|.
\tkzDrawPolygon(A,B,C)
\tkzDrawPoints(A,B,C,G)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}\begin{tkzelements}
z.A = point: new (1,0)
@@ -400,13 +409,13 @@ The calculation of the weights ka, kb and kc is precise, and the result obtained
Here's how to determine the center of the inscribed circle of a triangle:
\begin{mybox}
- \begin{verbatim}
- function in_center_ ( a,b,c )
- local ka = point.abs (b-c)
- local kc = point.abs (b-a)
- local kb = point.abs (c-a)
- return barycenter_ ( {a,ka} , {b,kb} , {c,kc} )
- end \end{verbatim}
+\begin{Verbatim}
+ function in_center_ ( a,b,c )
+ local ka = point.abs (b-c)
+ local kc = point.abs (b-a)
+ local kb = point.abs (c-a)
+ return barycenter_ ( {a,ka} , {b,kb} , {c,kc} )
+ end \end{Verbatim}
\end{mybox}
% subsubsection incenter_of_a_triangle (end)
@@ -417,7 +426,7 @@ Here's how to determine the center of the inscribed circle of a triangle:
The problem encountered in this example stems from the notation of the point names. Since it's not possible to write in simplified form, we have to resort to table[key] notation.
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
local r = 3
z.O = point : new (0,0)
@@ -428,7 +437,7 @@ The problem encountered in this example stems from the notation of the point nam
end
a = math.deg(get_angle (z.O,z.A_1,z.A_2))
\end{tkzelements}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -473,24 +482,25 @@ This function can be used for the following objects
\label{ssub:in_out_for_a_line}
\begin{mybox}
- \begin{verbatim}
- function line: in_out (pt)
- local sc,epsilon
- epsilon = 10^(-12)
- sc = math.abs ((pt-self.pa)^(pt-self.pb))
- if sc <= epsilon
- then
- return true
- else
- return false
- end
- end \end{verbatim}
+\begin{Verbatim}
+ function line: in_out (pt)
+ local sc,epsilon
+ epsilon = 10^(-12)
+ sc = math.abs ((pt-self.pa)^(pt-self.pb))
+ if sc <= epsilon
+ then
+ return true
+ else
+ return false
+ end
+ end
+\end{Verbatim}
\end{mybox}
The \tkzNamePack{ifthen} package is required for the code below.
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point: new (0,0)
z.B = point: new (1,2)
@@ -518,7 +528,7 @@ if L.AB : in_out (z.X)
\ifthenelse{\equal{\tkzUseLua{inline_bis}}{false}}{%
\tkzDrawSegment[green](B,Y)}{}
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{tkzelements}
@@ -565,14 +575,14 @@ We've just seen how to use |^| to obtain the determinant associated with two vec
Here's the definition and transformation of the power of a complex number.
-\begin{verbatim}
+\begin{Verbatim}
-- determinant is '^' ad - bc
function point.__pow(z1,z2)
local z
z = point.conj(z1) * z2 -- (a-ib) (c+id) = ac+bd + i(ad - bc)
return z.im
end
-\end{verbatim}
+\end{Verbatim}
% subsubsection determinant (end)
@@ -581,14 +591,14 @@ Here's the definition and transformation of the power of a complex number.
Here's the definition of the dot product between two affixes and the concatenation transformation.
-\begin{verbatim}
+\begin{Verbatim}
-- dot product is '..' result ac + bd
function point.__concat(z1,z2)
local z
z = z1 * point.conj(z2) -- (a+ib) (c-id) = ac+bd + i(bc-ad)
return z.re
end
-\end{verbatim}
+\end{Verbatim}
% subsubsection scalar_product (end)
@@ -598,7 +608,7 @@ end
Here's a function \Imeth{math}{isortho} to test orthogonality between two vectors.
-\begin{verbatim}
+\begin{Verbatim}
function isortho (z1,z2,z3)
local epsilon
local dp
@@ -611,7 +621,7 @@ function isortho (z1,z2,z3)
return false
end
end
-\end{verbatim}
+\end{Verbatim}
% subsubsection scalar_product_orthogonality_test (end)
@@ -620,7 +630,7 @@ end
The projection of a point onto a straight line is a fundamental function, and its definition is as follows:
-\begin{verbatim}
+\begin{Verbatim}
function projection_ ( pa,pb,pt )
local v
local z
@@ -632,7 +642,7 @@ function projection_ ( pa,pb,pt )
return pa + z * v
end
end
-\end{verbatim}
+\end{Verbatim}
The function \Imeth{math}{aligned} is equivalent to \Imeth{math}{islinear} but does not use a determinant. It will be replaced in a future version.
@@ -653,7 +663,7 @@ The point method is a method for many objects:
You obtain a point on the object by entering a real number between 0 and 1.
\begin{minipage}{.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new ( 0 , 0 )
z.B = point : new ( 4 , 2 )
@@ -672,7 +682,7 @@ You obtain a point on the object by entering a real number between 0 and 1.
\tkzDrawPolygon(A,B,C)
\tkzDrawPoints(A,B,C,I,J,K)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\hspace{\fill}
\begin{minipage}{.5\textwidth}
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-intersection.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-intersection.tex
index 245bca5e66..cc842aba53 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-intersection.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-intersection.tex
@@ -11,7 +11,7 @@ Results consist of one or two values, either points, boolean \tkzname{false} or
The result is of the form: |point| or |false|.
\begin{minipage}{0.6\textwidth}
-\begin{tkzexample}[small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new (1,-1)
z.B = point : new (4,1)
@@ -34,7 +34,7 @@ The result is of the form: |point| or |false|.
\tkzDrawPoints(A,B,C,D,I)
\tkzLabelPoints(A,B,C,D,I)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{0.4\textwidth}
\begin{tkzelements}
@@ -70,7 +70,7 @@ Other examples: \ref{ssub:altshiller}, \ref{ssub:lemoine}, \ref{sub:alternate}
The result is of the form : |point,point| or |false,false|. If the line is tangent to the circle, then the two points are identical. You can ignore one of the points by using the underscore: |_,point| or |point,_|. When the intersection yields two solutions, the order of the points is determined by the argument of |(z.p - z.c)| with |c| center of the circle and |p| point of intersection. The first solution corresponds to the smallest argument (arguments are between 0 and $2\pi$).
\begin{minipage}{0.6\textwidth}
-\begin{tkzexample}[small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new (1,-1)
z.B = point : new (1,2)
@@ -91,7 +91,7 @@ The result is of the form : |point,point| or |false,false|. If the line is tange
\tkzDrawPoints(A,B,O,D,I,K)
\tkzLabelPoints[left](A,B,O,D,I,K)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{0.4\textwidth}
\begin{tkzelements}
@@ -127,7 +127,7 @@ Other examples: \ref{ssub:altshiller}
The result is of the form : |point,point| or |false,false|. If the circles are tangent, then the two points are identical. You can ignore one of the points by using the underscore: |_ , point| or |point , _|. As for the intersection of a line and a circle, consider the argument of |z.p-z.c| with |c| center of the first circle and |p| point of intersection. The first solution corresponds to the smallest argument (arguments are between 0 and $2\pi$).
\begin{minipage}{0.5\textwidth}
-\begin{tkzexample}[small,code only]
+\begin{Verbatim}
\begin{tkzelements}
z.A = point : new (1,1)
z.B = point : new (2,2)
@@ -145,7 +145,7 @@ The result is of the form : |point,point| or |false,false|. If the circles are
\tkzDrawPoints(A,I,C,D,J,K)
\tkzLabelPoints(A,I,C,D,J,K)
\end{tikzpicture}
-\end{tkzexample}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tkzelements}
@@ -179,7 +179,7 @@ The designation of intersection points is a little more complicated than the pre
\vspace{1em}
\begin{minipage}{0.5\textwidth}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale = .5
z.a = point: new (5 , 2)
@@ -207,7 +207,7 @@ The designation of intersection points is a little more complicated than the pre
\tkzFillAngles[green!30,opacity=.4](e,c,v)
\tkzFillAngles[green!80,opacity=.4](e,c,u)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tkzelements}
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 95ce56dbc3..cd967f1af0 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 v2.00c
+% Documentation of tkz-elements v2.20c
% 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{2.00c}
+\gdef\tkzversionofpack{2.20c}
\gdef\tkzdateofpack{\today}
\gdef\tkznameofdoc{tkz-elements.pdf}
-\gdef\tkzversionofdoc{2.00c}
+\gdef\tkzversionofdoc{2.20c}
\gdef\tkzdateofdoc{\today}
\gdef\tkzauthorofpack{Alain Matthes}
\gdef\tkzadressofauthor{}
@@ -62,7 +62,7 @@
pdftitle={\tkznameofpack},
pdfcreator={\tkzengine}
}
-\usepackage{tkzexample}
+
\usepackage{fontspec}
\setmainfont{texgyrepagella}[
Extension = .otf,
@@ -97,10 +97,10 @@
\usepackage[english]{babel}
\usepackage[normalem]{ulem}
\usepackage{multirow,multido,booktabs,cellspace}
-\usepackage{shortvrb,bookmark,enumitem}
+\usepackage{shortvrb,fancyvrb,bookmark,enumitem}
\usepackage{makeidx}
\usepackage[most]{tcolorbox}
-
+\def\code{\texttt}
\newtcolorbox{mybox}{
enhanced,
boxrule=0pt,frame hidden,
@@ -135,6 +135,7 @@ sharp corners
\renewcommand*{\IoptName}[2]{\texttt{#2}\index{#1_3@\texttt{#1: attribute(s)}!\texttt{#2}}}
\newcommand*{\Iattr}[2]{\texttt{#2}\index{#1_3@\texttt{#1: attribute}!\texttt{#2}}}
\newcommand*{\Imeth}[2]{\texttt{#2}\index{#1_3@\texttt{#1: method}!\texttt{#2}}}
+\newcommand*{\Immeth}[2]{\texttt{#2}\index{#1_3@\texttt{#1: metamethod}!\_\_\texttt{#2}}}
\newcommand*{\Igfct}[2]{\texttt{#2}\index{#1_3@\texttt{#1: function}!\texttt{#2}}}
\newcommand*{\Iclass}[1]{\texttt{#1}\index{Class !#1@\texttt{#1}}}
\newcommand*{\tkzNameObj}[1]{\tkzname{#1}\Iobj{#1}}
@@ -177,20 +178,22 @@ sharp corners
\clearpage
\defoffile{\lefthand\
- This document brings together some notes about \tkzname{\tkznameofpack}, the first version of a library written in lua, allowing to make all the necessary calculations to define the objects of a Euclidean geometry figure. You need to compile with Lua\LaTeX.\\ With \pkg{tkz-elements}, the definitions and calculations are only done with \pkg{lua}. \\ The main possibility of programmation proposed is oriented "object programming" with object classes like point, line, triangle, circle and ellipse. For the moment, once the calculations are done, it is \pkg{tkz-euclide} or \pkg{TikZ} which allows the drawings.\\
- I discovered Lua and object-oriented programming when I created this package, so it's highly probable that I've made a few mistakes. If you'd like to participate in the development of this package or give me advice on how to proceed, please contact me via my email. \\
-English is not my native language so there might be some errors.
+ This document compiles some notes about \tkzname{\tkznameofpack}, the initial version of a \code{Lua} library designed to perform all the necessary calculations for defining objects in Euclidean geometry figures. Your document must be compiled using Lua\LaTeX.\\
+ With \pkg{tkz-elements}, definitions and calculations are exclusively conducted using \pkg{Lua}. \\
+ The primary programming approach offered is oriented towards \code{object programming}, utilizing object classes such as point, line, triangle, circle, and ellipse. Currently, after the calculations are completed, \pkg{tkz-euclide} or \pkg{TikZ} is used for drawing purposes.\\
+ I discovered Lua and object-oriented programming while developing this package, so it's highly likely that I've made a few mistakes. If you'd like to contribute to the development of this package or provide advice on how to proceed, please contact me via email. \\
+Please note: English is not my native language, so there may be some errors."
}
\presentation
\vspace*{1cm}
-\lefthand\ Acknowledgements : I received much valuable advice, remarks, corrections from \\ \tkzimp{Nicolas Kisselhoff}, \tkzimp{David Carlisle}, \tkzimp{Roberto Giacomelli} and \tkzimp{Qrrbrbirlbel}.\\
- Thanks to Wolfgang Büchel, for correcting the examples.
+\lefthand\ Acknowledgements : I received much valuable advices, remarks, corrections from \\ \tkzimp{Nicolas Kisselhoff}, \tkzimp{David Carlisle}, \tkzimp{Roberto Giacomelli} and \tkzimp{Qrrbrbirlbel}.\\
+Special thanks to \tkzimp{Wolfgang Büchel} for his invaluable contribution in correcting the examples.
\vspace*{12pt}
-\lefthand\ I would also like to thank \tkzimp{Eric Weisstein}, creator of
+\lefthand\ I would also like to extend my gratitude to \tkzimp{Eric Weisstein}, creator of
\href{http://mathworld.wolfram.com/about/author.html}{MathWorld}.
\vspace*{12pt}
@@ -204,6 +207,8 @@ This file can be redistributed and/or modified under the terms of the \LaTeX{}
Project Public License Distributed from \href{http://www.ctan.org/}{CTAN}\ archives.
\clearpage
+
+
\tableofcontents
\clearpage
@@ -213,7 +218,7 @@ Project Public License Distributed from \href{http://www.ctan.org/}{CTAN}\ arch
\input{TKZdoc-elements-presentation.tex}
\input{TKZdoc-elements-convention.tex}
\input{TKZdoc-elements-organization.tex}
-\input{TKZdoc-elements-transferts.tex}
+\input{TKZdoc-elements-transfers.tex}
\input{TKZdoc-elements-classes.tex}
\input{TKZdoc-elements-classes-point.tex}
\input{TKZdoc-elements-classes-line.tex}
@@ -226,6 +231,7 @@ Project Public License Distributed from \href{http://www.ctan.org/}{CTAN}\ arch
\input{TKZdoc-elements-classes-parallelogram.tex}
\input{TKZdoc-elements-classes-regular.tex}
\input{TKZdoc-elements-classes-vectors.tex}
+\input{TKZdoc-elements-classes-matrices.tex}
\input{TKZdoc-elements-classes-misc.tex}
\input{TKZdoc-elements-intersection.tex}
\input{TKZdoc-elements-indepthstudy.tex}
@@ -239,7 +245,7 @@ Project Public License Distributed from \href{http://www.ctan.org/}{CTAN}\ arch
\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, |V| a vector,|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.
+|r| denotes a real number, |cx| complex number, |d| a positive real number, |n| an integer, |an| an angle, |b| a boolean, |s| a character string, |pt| a point, |t| a table, |m| a matrix, |v| variable, |L| a straight line, |C| a circle, |T| a triangle, |E| an ellipse, |V| a vector,|Q| a quadrilateral, |P| a parallelogram, |R| a rectangle, |S| a square, |RP| a regular polygon, |M| a matrix, |O| an object (pt, L,C,T), . . a list of points or an object, < > optional argument.
\begin{multicols}{3}
@@ -250,20 +256,24 @@ Project Public License Distributed from \href{http://www.ctan.org/}{CTAN}\ arch
|type -> s| \\
|argument -> r| \\
|modulus -> d| \\
-\textbf{Methods} table(\ref{point:met}) \\
-|+ - * / -> pt| \\
-|.. -> r| \\
-|^ -> r| \\
+\textbf{Functions} table(\ref{point:att}) \\
+|new -> pt| \\
+|polar -> pt| \\
+|polar_deg -> pt| \\
+\textbf{Methods} table(\ref{complex:meta}) \\
+|+ - * / (pt,pt) -> pt| \\
+|.. (pt,pt) -> r| \\
+|^ (pt,pt) -> r| \\
+|= -> b| \\
+|tostring -> s| \\
+\textbf{Methods} table(\ref{point:met}) table(\ref{complex:met}) \\
|conj -> pt| \\
-|abs -> r| \\
-|mod -> d| \\
-|norm -> d| \\
+|abs -> r| \\
+|mod -> d| \\
+|norm -> d| \\
|arg -> d| \\
|get -> r,r| \\
|sqrt -> pt| \\
-|new -> pt| \\
-|polar -> pt| \\
-|polar_deg -> pt| \\
|north(d) -> pt| \\
|south(d) -> pt| \\
|east(d) -> pt| \\
@@ -274,9 +284,10 @@ Project Public License Distributed from \href{http://www.ctan.org/}{CTAN}\ arch
|homothety (r , ...) -> O| \\
|orthogonal(d) -> pt| \\
|at() -> pt| \\
+|print() -> s| \\
\\
\fbox{\textbf{line}} \\
-\textbf{Attributes} table(\ref{line:att}) \\
+\textbf{Attributes} table(\ref{line:att}) \\
|pa,pb -> pt| \\
|type -> s| \\
|mid -> pt| \\
@@ -288,7 +299,7 @@ Project Public License Distributed from \href{http://www.ctan.org/}{CTAN}\ arch
|west -> pt| \\
|slope -> r| \\
|length -> d| \\
-|vec -> V| \\
+|vec -> V| \\
\textbf{Methods} table(\ref{line:met}) \\
|new (pt,pt) -> d| \\
|distance (pt) -> d| \\
@@ -410,7 +421,7 @@ Project Public License Distributed from \href{http://www.ctan.org/}{CTAN}\ arch
|-> r,r,r| \\
|in_out (pt) -> pt| \\
|check_equilateral () -> b| \\
- \\
+ \\
\fbox{\textbf{circle}} \\
\textbf{Attributes} table(\ref{circle:att}) \\
|center -> pt| \\
@@ -473,7 +484,7 @@ Project Public License Distributed from \href{http://www.ctan.org/}{CTAN}\ arch
|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| \\
@@ -482,7 +493,7 @@ Project Public License Distributed from \href{http://www.ctan.org/}{CTAN}\ arch
|center -> pt| \\
|exradius -> d| \\
|inradius -> d| \\
-|diagonal -> d| \\
+|diagonal -> d| \\
|proj -> pt| \\
|ab bc cd da -> L| \\
|ac bd -> L| \\
@@ -546,36 +557,62 @@ Project Public License Distributed from \href{http://www.ctan.org/}{CTAN}\ arch
|proj -> pt| \\
|nb -> i| \\
|angle -> an| \\
- \textbf{Methods} table(\ref{regular:met})\\
+ \textbf{Methods} table(\ref{regular:met}) \\
|new (pt,pt,n) -> PR| \\
|incircle () -> C| \\
|name (s) -> ?| \\
\\
\fbox{\textbf{vector}} \\
-\textbf{Attributes} table(\ref{vector:att}) \\
-|pa,pb -> pt| \\
+\textbf{Attributes} table(\ref{vector:att}) \\
|type -> s| \\
|norm -> d| \\
|slope -> r| \\
-\textbf{Methods} table(\ref{vector:met})\\
+|mtx -> M| \\
+\textbf{Methods} table(\ref{vector:met}) \\
|new (pt,pt) -> V| \\
|+ - * -> pt| \\
|normalize (V) -> V| \\
|orthogonal (d) -> V| \\
|scale (r) -> V| \\
|at (pt) -> V| \\
+\fbox{\textbf{matrix}} \\
+\textbf{Attributes} table(\ref{matrix:att}) \\
+|set -> t| \\
+|rows -> n| \\
+|cols -> n| \\
+|type -> s| \\
+|det -> r| \\
+\textbf{Functions} table(\ref{matrix:met}) \\
+|new -> m| \\
+|square -> m| \\
+|htm -> m| \\
+|vector -> m| \\
+\textbf{Metamethods} table(\ref{matrix:meta}) \\
+|+ - * (m,m) -> m| \\
+|^ (m,n) -> m| \\
+|= -> b| \\
+|tostring -> s| \\
+\textbf{Method} table(\ref{matrix:met}) \\
+|print -> s| \\
+|get -> r/cx|\\
+|inverse -> m| \\
+|adjugate -> m| \\
+|transpose -> m| \\
+|is_diagonal -> b| \\
+|is_orthogonal -> b| \\
+|homogenization -> m| \\
+|htm_apply -> m| \\
\\
\fbox{\textbf{Misc.}} \\
\textbf{Attributes} table(\ref{misc}) \\
|scale (default =1) -> r| \\
|tkzphi -> r| \\
-|tkzinvphi -> r | \\
-|tkzsqrtphi -> r | \\
-|tkz_epsilon (default=1e-8)-> r | \\
-|length -> d | \\
-|islinear(pt,pt,pt) -> b | \\
-|isortho(pt,pt,pt) -> b | \\
-|\tkzUseLua{v} -> ?| \\
+|tkzinvphi -> r| \\
+|tkzsqrtphi -> r| \\
+|tkz_epsilon (default=1e-8)-> r| \\
+|length -> d| \\
+|islinear(pt,pt,pt) -> b| \\
+|isortho(pt,pt,pt) -> b| \\
|value{r} -> r| \\
|real -> r| \\
|angle_normalize (an) -> an| \\
@@ -586,9 +623,11 @@ Project Public License Distributed from \href{http://www.ctan.org/}{CTAN}\ arch
|midpoint (pt,pt) -> pt| \\
|equilateral (pt,pt) -> T| \\
|format_number(r,n) -> r| \\
-
-\fbox{\textbf{Macros}} \\
-|\tkzDN[n]{r} -> r| \\
-|\tkzDrawLuaEllipse((pt,pt,pt))| \\
+|solve_quadratic(cx,cx,cx) -> cx,cx| \\
+|\tkzUseLua{v} -> s| \\
+ \\
+\fbox{\textbf{Macros}} \\
+|\tkzDN[n]{r} -> r| \\
+|\tkzDrawLuaEllipse((pt,pt,pt))| \\
\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
index 0d59a2b80b..13b17d6a5d 100644
--- 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
@@ -3,24 +3,24 @@
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 line |% !TEX TS-program = lualatex| ensures that you compile with Lua\LATEX{}. The \code{standalone} class is useful, as all you need to do here is create a figure.
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.
+While it's possible to leave the Lua code in the \tkzNameEnv{tkzelements} environment, 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.
+The first advantage is that, if you use a good editor, you have a better presentation of the code. Styles differ between \code{Lua} and \LATEX{}, making 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 |%|.
+Another advantage is that you don't have to incorrectly comment the code. For Lua code, you comment lines with |--| (double minus sign), whereas for \LATEX{}, you comment with |%|.
-Third advantage: the code can be reused.
+A third advantage is that the code can be reused.
-\begin{verbatim}
+\begin{Verbatim}
% !TEX TS-program = lualatex
% Created by Alain Matthes on 2024-01-09.
@@ -43,11 +43,11 @@ Third advantage: the code can be reused.
\tkzFillCircle[color = orange](I,F)%
\end{tikzpicture}
\end{document}
-\end{verbatim}
+\end{Verbatim}
-And here is the code for the “Lua” part: the file |ex_sangaku.lua|
+And here is the code for the \code{Lua} part: the file |ex_sangaku.lua|
-\begin{verbatim}
+\begin{Verbatim}
z.A = point : new ( 0,0 )
z.B = point : new ( 8,0 )
L.AB = line : new ( z.A , z.B )
@@ -60,7 +60,7 @@ 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}
+\end{Verbatim}
\begin{tkzelements}
scale = 1.25
@@ -78,13 +78,14 @@ z.I = intersection (L.Cc,L.BF)
\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:
+If necessary, it's better to perform scaling in the \code{Lua} section. This approach tends to be more accurate. However, there is a caveat to be aware of. I've made it a point to avoid using numerical values in my codes whenever possible. Generally, these values only appear in the definition of fixed points.
+ If the \code{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) }.
+Scaling would then be ineffective, as the numerical values are not modified, only the point coordinates. To account for scaling, use the function \Igfct{math}{value (v) }.
|scale = 1.5|\\
|xB = value (8)|\\
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-presentation.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-presentation.tex
index 86fcc479ab..2687f9debe 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-presentation.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-presentation.tex
@@ -4,27 +4,27 @@
\subsection{With Lua} % (fold)
\label{sub:with_lua}
-The purpose of tkz-elements is simply to calculate dimensions and define points. This is done in Lua. You can think of tkz-elements as a kernel that will be used either by tkz-euclide or by TikZ, see MetaPost.
-Definitions and calculations are done inside the environment \tkzNameEnv{tkzelements}, this environment is based on \tkzNameEnv{luacode}.
+The primary function of tkz-elements is to calculate dimensions and define points, which is achieved using Lua. You can view tkz-elements as a kernel that is utilized either by tkz-euclide or by TikZ,
+Definitions and calculations take place within the environment \tkzNameEnv{tkzelements}, which is based on \tkzNameEnv{luacode}.
\begin{minipage}[t]{.52\textwidth}\vspace{0pt}%
The key points are:
\begin{itemize}
- \item the source file must be \tkzEHand\ {\color{red}\uline{ \color{black}utf8}} encoded;
- \item compilation is done with \tkzEHand\ {\color{red}\uline{ \color{black}Lua\LATEX{}}};
- \item you need to load \tkzimp{\TIKZ}{} ou \tkzimp{tkz-euclide} and \tkzimp{tkz-elements};
- \item definitions and calculations are performed in an orthonormal sytem of reference, using Lua, and are carried out in an environment of \tkzimp{tkzelements}.
+ \item The source file must be \tkzEHand\ {\color{red}\uline{ \color{black}UTF8}} encoded.
+ \item Compilation is done with \tkzEHand\ {\color{red}\uline{ \color{black}Lua\LATEX{}}}.
+ \item You need to load \tkzimp{\TIKZ}{} or \tkzimp{tkz-euclide} and \tkzimp{tkz-elements}.
+ \item Definitions and calculations are performed in an (orthonormal) Cartesian coordinate system, using Luawithin the \tkzimp{tkzelements} environment.
\end{itemize}
- To the right, see the minimum template.
+ On the right, you can see the minimum template.
-The code is divided into two parts, which are two environments \tkzNameEnv{tkzelements} and \tkzNameEnv{tikzpicture}. In the first environment, you place your Lua code, and in the second, tkz-euclide commands.
+The code is divided into two parts, represented by two environments \tkzNameEnv{tkzelements} and \tkzNameEnv{tikzpicture}. In the first environment, you place your Lua code, while in the second, you use tkz-euclide commands.
\vspace*{4.1 cm}%
\end{minipage}\hspace*{\fill}
\begin{minipage}[t]{.45\textwidth}\vspace{0pt}%
\begin{mybox}
-\begin{verbatim}
+\begin{Verbatim}
% !TEX TS-program = lualatex
% Created by Alain Matthes
\documentclass{standalone}
@@ -48,7 +48,7 @@ z.B = point : new ( , )
\end{tikzpicture}
\end{document}
-\end{verbatim}
+\end{Verbatim}
\end{mybox}
\end{minipage}
% subsection with_lua (end)
@@ -68,7 +68,7 @@ z.B = point : new ( , )
node[concept] {Definitions\\Calculations\\\textcolor{purple}{tkz-elements}} };
\end{tikzpicture}
-When all the points necessary for the drawing are obtained, they must be transformed into \tkzname{nodes} so that \pkg{TikZ} or \pkg{tkz-euclide} can draw the figure. This is done through the macro \tkzcname{tkzGetNodes}. This macro browse all the elements of the table |z| using the key (in fact the name of the point) and retrieves the values associated with it, i.e. the coordinates of the point (node).
+After obtaining all the necessary points for the drawing, they must be transformed into \tkzname{nodes} so that \pkg{TikZ} or \pkg{tkz-euclide} can render the figure. This is accomplished using the macro \tkzcname{tkzGetNodes}. This macro iterates through all the elements of the table |z| using the key (which is essentially the name of the point) and retrieves the associated values, namely the coordinates of the point (node).
% subsection the_main_process (end)
\newpage
@@ -121,7 +121,7 @@ When all the points necessary for the drawing are obtained, they must be transfo
\subsubsection{The code} % (fold)
\label{ssub:the_code}
-\begin{tkzexample}[small, code only,num]
+\begin{Verbatim}
% !TEX TS-program = lualatex
\documentclass{article}
\usepackage{tkz-euclide}
@@ -139,7 +139,7 @@ z.O_2 = line: new ( z.C, z.B).mid
C.AB = circle: new ( z.O_0, z.B) -- new object “circle” stored and reused
C.AC = circle: new ( z.O_1, z.C)
C.CB = circle: new ( z.O_2, z.B)
-z.P = C.CB.north -- no“rth atrributes of a circle
+z.P = C.CB.north -- “north” atrributes of a circle
z.Q = C.AC.north
z.O = C.AB.south
z.c = z.C : north (2) -- “north” method of a point (needs a parameter)
@@ -150,7 +150,9 @@ z.P_1 = intersection (C.PC,C.AC) -- idem
_,z.P_2 = intersection (C.QA,C.CB) -- idem
z.O_3 = triangle: new ( z.P_0, z.P_1, z.P_2).circumcenter -- circumcenter attribute of “triangle”
\end{tkzelements}
+\end{Verbatim}
+\begin{Verbatim}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawCircle[black,fill=yellow!20,opacity=.4](O_0,B)
@@ -163,7 +165,7 @@ z.O_3 = triangle: new ( z.P_0, z.P_1, z.P_2).circumcenter -- circumcenter attr
\tkzLabelPoints(A,B,C,O_0,O_1,O_2,P,Q,P_0,P_0,P_1,P_2,O)
\end{tikzpicture}
\end{document}
-\end{tkzexample}
+\end{Verbatim}
% subsubsection the_code (end)
\subsection{Another example with comments: South Pole} % (fold)
@@ -171,7 +173,7 @@ z.O_3 = triangle: new ( z.P_0, z.P_1, z.P_2).circumcenter -- circumcenter attr
Here's another example with comments
-\begin{verbatim}
+\begin{Verbatim}
% !TEX TS-program = lualatex
\documentclass{standalone}
\usepackage{tkz-euclide,tkz-elements}
@@ -192,7 +194,7 @@ Here's another example with comments
L.BC = T.ABC.bc -- we get the line (BC)
z.I_A = intersection (L.AO,L.BC) -- we search the intersection of the last lines
\end{tkzelements}
-\end{verbatim}
+\end{Verbatim}
\begin{tkzelements}
scale = 1.2
z.A = point: new (2 , 4)
@@ -228,7 +230,7 @@ Here's another example with comments
\hspace*{\fill}
Here's the tikzpicture environment to obtain the drawing:
-\begin{verbatim}
+\begin{Verbatim}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawCircles(W,A I,T)
@@ -242,6 +244,6 @@ Here's the tikzpicture environment to obtain the drawing:
\tkzLabelPoints(I,I_A,W,B,C,O)
\tkzLabelPoints[above](A)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
% subsection south_pole (end)
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-structure.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-structure.tex
index fe0f7091c5..15b167a793 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-structure.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-structure.tex
@@ -1,12 +1,12 @@
\section{Structure} % (fold)
\label{sec:structure}
-\tkzNamePack{tkz-elements.sty} loads the \tkzNamePack{luacode} package, to create the \tkzNameEnv{tkzelements} environment based on the \tkzNameEnv{luacode} environment.
+\tkzNamePack{tkz-elements.sty} loads the \tkzNamePack{luacode} package to create the \tkzNameEnv{tkzelements} environment, which is based on the \tkzNameEnv{luacode} environment.
-The \tkzNameEnv{tkzelements} environment initializes scale to 1 and then deletes all the values in the various tables.
+Within the \tkzNameEnv{tkzelements} environment, the scale is initialized to 1, and then all values in various tables are cleared.
-The package defines the two macros |\tkzGetNodes| and |\tkzUseLua|.
+The package defines two macros |\tkzGetNodes| and |\tkzUseLua|.
-The package loads the file |tkz_elements_main.lua|. This file initialise all the tables that will be used by the modules in which the classes are defined.
+Additionally, the package loads the file |tkz_elements_main.lua|. This file initializes all the tables that will be used by the modules in which the classes are defined.
\begin{tikzpicture}[scale=.75]
\begin{scope}
@@ -47,7 +47,7 @@ clockwise from=27] {
The current classes are (some are still inactive):
\begin{itemize}
- \item active : \Iclass{point} (z) ; \Iclass{line} (L) ; \Iclass{circle} (C) ; \Iclass{triangle} (T) ; \Iclass{ellipse} (E) ; \Iclass{quadrilateral} (Q) ; \Iclass{square} (S) ; \Iclass{rectangle} (R) ; \Iclass{parallelogram} (P) ; \Iclass{regular\_polygon} (RP).
+ \item active : \Iclass{point} (z) ; \Iclass{line} (L) ; \Iclass{circle} (C) ; \Iclass{triangle} (T) ; \Iclass{ellipse} (E) ; \Iclass{quadrilateral} (Q) ; \Iclass{square} (S) ; \Iclass{rectangle} (R) ; \Iclass{parallelogram} (P) ; \Iclass{regular\_polygon} (RP); \Iclass{vector} (V).
\item inactive : matrix (M) ; vector (V).
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-transfers.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-transfers.tex
new file mode 100644
index 0000000000..a66f493604
--- /dev/null
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-transfers.tex
@@ -0,0 +1,152 @@
+
+\newpage
+\section{Transfers} % (fold)
+\label{sec:transfers}
+\subsection{Fom Lua to tkz-euclide or TikZ} % (fold)
+\label{sub:fom_lua_to_tkz_euclide_or_tikz}
+
+In this section, we'll explore how to transfer points, Booleans, and numerical values.
+
+\subsubsection{Points transfer} % (fold)
+\label{ssub:points_transfer}
+We utilize an environment \tkzname{tkzelements} outside an \tkzname{tikzpicture} environment which allows us to perform all the necessary calculations. Then, we execute the macro \Imacro{tkzGetNodes} which transforms the affixes of the table |z| into \tkzname{Nodes}. Finally, we proceed with the drawing.
+
+At present, the drawing program is either \TIKZ\ or \pkg{tkz-euclide}. However, you have the option to use another package for plotting. To do so, you'll need to create a macro similar to \tkzcname{tkzGetNodes}. Of course, this package must be capable of storing points like \TIKZ\ or \pkg{tkz-euclide}.
+
+\vspace*{1em}
+
+\begin{mybox}
+\begin{Verbatim}
+\def\tkzGetNodes{\directlua{%
+ for K,V in pairs(z) do
+ local n,sd,ft
+ n = string.len(K)
+ if n >1 then
+ _,_,ft, sd = string.find( K , "(.+)(.)" )
+ 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{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} or \tkzname{double prime}. (Refer to the next example)
+
+\begin{minipage}{0.5\textwidth}
+\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' 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}
+\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
+ z.app = z.a_1 - z.a_2
+\end{tkzelements}
+\hspace{\fill}
+\begin{tikzpicture}
+ \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
+% subsection fom_lua_to_tkz_euclide_or_tikz (end)
+\subsubsection{Other transfers} % (fold)
+\label{ssub:other_transfers}
+
+Sometimes it's useful to transfer angle, length measurements or boolean. For this purpose, I have created the macro (refer to \ref{sub:transfer_from_lua_to_tex})
+\IEmacro{tkzUseLua(value)}
+
+\begin{Verbatim}
+\begin{tkzelements}
+ z.b = point: new (1,1)
+ z.a = point: new (4,2)
+ z.c = point: new (2,2)
+ z.d = point: new (5,1)
+ L.ab = line : new (z.a,z.b)
+ L.cd = line : new (z.c,z.d)
+ det = (z.b-z.a)^(z.d-z.c)
+ if det == 0 then bool = true
+ else bool = false
+ end
+ x = intersection (L.ab,L.cd)
+\end{tkzelements}
+
+The intersection of the two lines lies at
+ a point whose affix is:\tkzUseLua{x}
+
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzInit[xmin =-1,ymin=-1,xmax=6,ymax=3]
+ \tkzGrid\tkzAxeX\tkzAxeY
+ \tkzDrawPoints(a,...,d)
+ \ifthenelse{\equal{\tkzUseLua{bool}}{true}}{
+ \tkzDrawSegments[red](a,b c,d)}{%
+ \tkzDrawSegments[blue](a,b c,d)}
+ \tkzLabelPoints(a,...,d)
+\end{tikzpicture}
+\end{Verbatim}
+
+\begin{tkzelements}
+z.b = point: new (1,1)
+z.a = point: new (4,2)
+z.c = point: new (2,2)
+z.d = point: new (5,1)
+L.ab = line : new (z.a,z.b)
+L.cd = line : new (z.c,z.d)
+det = (z.b-z.a)^(z.d-z.c)
+if det == 0 then bool = true
+ else bool = false
+end
+x = intersection (L.ab,L.cd)
+\end{tkzelements}
+
+The intersection of the two lines lies at
+a point whose affix is: \tkzUseLua{x}
+
+\vspace{1em}
+\hspace{\fill}
+\begin{tikzpicture}
+ \tkzGetNodes
+ \tkzInit[xmin =-1,ymin=-1,xmax=6,ymax=3]
+ \tkzGrid\tkzAxeX\tkzAxeY
+ \tkzDrawPoints(a,...,d)
+ \ifthenelse{\equal{\tkzUseLua{bool}}{true}}{
+ \tkzDrawSegments[red](a,b c,d)}{%
+ \tkzDrawSegments[blue](a,b c,d)}
+ \tkzLabelPoints(a,...,d)
+\end{tikzpicture}
+ \hspace{\fill}
+% subsubsection other_transfers (end)
+% subsubsection points_transfer (end)
+% section transfers (end)
+
+\endinput \ No newline at end of file
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 aa3c23d7d8..6ab030ee2f 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
@@ -8,14 +8,14 @@
\subsubsection{Calculation accuracy in \TIKZ} % (fold)
\label{ssub:calculation_accuracy_in_tikz}
-With \TIKZ, \tkzimp{|veclen(x,y)|} calculates the expression $\sqrt{x^2+y^2}$.
-This calculation is obtained using a polynomial approximation, based on ideas from \tkzimp{Rouben Rostamian}.
+With \TIKZ, the expression \tkzimp{|veclen(x,y)|} calculates the expression $\sqrt{x^2+y^2}$.
+This calculation is achieved through a polynomial approximation, drawing inspiration from the ideas of \tkzimp{Rouben Rostamian}.
\pgfkeys{/pgf/number format/.cd,std,precision=5} \pgfmathparse{veclen(65,72)}
\begin{mybox}{}
-\begin{verbatim}
+\begin{Verbatim}
pgfmathparse{veclen(65,72)} \pgfmathresult
-\end{verbatim}
+\end{Verbatim}
\end{mybox}
\tkzHand $\sqrt{65^2+72^2} \approx \pmpn{\pgfmathresult} $ \tkzRBomb.
@@ -27,56 +27,55 @@ This calculation is obtained using a polynomial approximation, based on ideas fr
A |luaveclen| macro can be defined as follows:
\begin{mybox}{}
-\begin{verbatim}
+\begin{Verbatim}
\def\luaveclen#1#2{\directlua{tex.print(string.format(
'\percentchar.5f',math.sqrt((#1)*(#1)+(#2)*(#2))))}}
-\end{verbatim}
+\end{Verbatim}
\end{mybox}
and
\begin{mybox}
-\begin{verbatim}
+\begin{Verbatim}
\luaveclen{65}{72}
-\end{verbatim}
+\end{Verbatim}
\end{mybox}
gives
\tkzHand $\sqrt{65^2+72^2} = \pmpn{\luaveclen{65}{72}} $ {\color{red}!!}
-The error isn't important if it's a hundredth of a \tkzimp{pt} for the placement of an object on a page, but it's unpleasant for the result of a calculation in a mathematical demonstration. What's more, these inaccuracies can combine to produce erroneous constructions.
+The error, though insignificant when it comes to the placement of an object on a page by a hundredth of a point, becomes problematic for the results of mathematical demonstrations. Moreover, these inaccuracies can accumulate and lead to erroneous constructions.
\vspace{.5em}
-To remedy this lack of precision, I first introduced the package \pkg{fp}, then the package \pkg{xfp}. Lately, with the arrival of lua\LATEX{}, I have been able to add a \tkzname{Lua} option whose goal was to perform some calculations with \tkzname{Lua}.
+To address this lack of precision, I initially introduced the \pkg{fp}, followed by the package \pkg{xfp}. More recently, with the emergence of Lua\LATEX{}, I incorporated a \tkzname{Lua} option aimed at performing calculations with \tkzname{Lua}.
-This was the primary reason for creating the package, the second being the introduction of object-oriented programming and easier programming with Lua. Object-oriented programming (oop) convinced me to further develop all the possibilities this method offered.
+This was the primary motivation behind creating the package, with the secondary goal being the introduction of object-oriented programming (OOP) and simplifying programming with Lua. The concept of OOP persuaded me to explore its various possibilities further.
-At that moment, I had received some examples of programming with \tkzname{Lua} from {\tkzimpbf{Nicolas Kisselhoff}}, but I didn't understand its code, so I had to patiently study Lua. Finally, I was able to build tkz-elements, I took many of his ideas I've adapted.
+At that time, I had received some Lua programming examples from {\tkzimpbf{Nicolas Kisselhoff}}, but I struggled to understand the code initially, so I dedicated time to studying Lua patiently. Eventually, I was able to develop \tkzname{\tkznameofpack}, incorporating many of his ideas that I adapted for the package.
% subsubsection calculation_accuracy_in_lua (end)
\subsubsection{Using objects} % (fold)
\label{ssub:using_objects}
-Then, I read an article\footnote{\href{https://www.guitex.org/home/images/meeting2012/slides/presentazione_giacomell_guitmeeting_2012.pdf}{Grafica ad oggetti con LuaTEX}} by \tkzimpbf{Roberto Giacomelli} on object programming based on the \tkzname{Lua} and \TIKZ\ tools. This was my second source of inspiration. Not only could the programming be done step-by-step, but the introduction of objects allowed the link between the code and the geometry. The code becomes more readable, more explicit and better structured.
+Subsequently, I came across an article by \tkzimpbf{Roberto Giacomelli}\footnote{\href{https://www.guitex.org/home/images/meeting2012/slides/presentazione_giacomell_guitmeeting_2012.pdf}{Grafica ad oggetti con LuaTEX}} on object-oriented programming using \tkzname{Lua} and \TIKZ\ tools. This served as my second source of inspiration. Not only did this approach enable programming to be executed step-by-step, but the introduction of objects facilitated a direct link between the code and geometry. As a result, the code became more readable, explicit, and better structured.
\subsubsection{Example: Apollonius circle} % (fold)
\label{ssub:example_apollonius_circle}
-\begin{mybox}{Problem}
-The goal is to determine an inner tangent circle to the three exinscribed circles of a triangle.
-\end{mybox}
+\begin{mybox}{Problem:}
+The objective is to identify an inner tangent circle to the three exinscribed circles of a triangle.\end{mybox}
-See \href{https://mathworld.wolfram.com/ApolloniusCircle.html}{MathWorld} for more details.
+ For additional details, refer to \href{https://mathworld.wolfram.com/ApolloniusCircle.html}{MathWorld} for more details.
-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.
+This example served as my reference for testing the \pkg{tkz-euclide} package. Initially, with my first methods and the tools available to me, the results lacked precision. However, with tkz-elements, I now have access to more powerful and precise tools that are also easier to use.
-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.
+The fundamental principles of figure construction with \tkzname{tkz-euclide} remain intact: definitions, calculations, tracings, labels, as well as the step-by-step programming, mirroring the process of construction with a ruler and compass.
-This is the version that uses the simplest construction method, made possible by Lua.
+This version utilizes the simplest construction method made possible by Lua.
\begin{mybox}
-\begin{verbatim}
+\begin{Verbatim}
\begin{tkzelements}
scale = .4
z.A = point: new (0,0)
@@ -97,48 +96,52 @@ This is the version that uses the simplest construction method, made possible by
z.O = C.apo.center
z.xa,z.xb,z.xc = C.ortho : inversion (z.Ea,z.Eb,z.Ec)
\end{tkzelements}
-\end{verbatim}
+\end{Verbatim}
\end{mybox}
-The creation of an object encapsulates its attributes (its characteristics) and methods (i.e. the actions that are specific to it). It is then assigned a reference (a name), which is linked to the object using a table. The table is an associative array that links the reference called \tkzimp{key} to a \tkzimp{value}, in this case the object. These notions will be developed later.
+The creation of an object encapsulates its attributes (its characteristics) and methods (i.e. the actions that are specific to it). Subsequently, it is assigned a reference (a name) which is linked to the object using a table. This table functions as an associative array that links the reference, called a \tkzimp{key}, to a \tkzimp{value}, in this case, the object. Further elaboration on these notions will be provided later.
-\tkzimp{T} is a table that associates the object \tkzimp{triangle} with the key \tkzimp{ABC}. \tkzimp{T.ABC} is also a table, and its elements are accessed using keys that are attributes of the triangle. These attributes have been defined in the package.
+For instance, let \tkzimp{T} be a table associating the object \tkzimp{triangle} with the key \tkzimp{ABC}. \tkzimp{T.ABC} is also a table, and its elements are accessed using keys that correspond to attributes of the triangle. These attributes have been defined within the package.
\vspace{1em}
\begin{mybox}
-\begin{verbatim}
- z.N = T.ABC.eulercenter \end{verbatim}
+\begin{Verbatim}
+ z.N = T.ABC.eulercenter
+\end{Verbatim}
\end{mybox}
|N| is the name of the point, |eulercenter| is an attribute of the triangle.
\footnote{ The center of the Euler circle, or center of the nine-point circle, is a characteristic of every triangle.}
\begin{mybox}
-\begin{verbatim}
- T.excentral = T.ABC : excentral () \end{verbatim}
+\begin{Verbatim}
+ T.excentral = T.ABC : excentral ()
+\end{Verbatim}
\end{mybox}
-Here, \tkzimp{excentral} is a method linked to the \tkzimp{T.ABC }object. It defines the triangle formed by the centers of the exinscribed circles.
+In this context, \tkzimp{excentral} is a method associated with the \tkzimp{T.ABC }object. It defines the triangle formed by the centers of the exinscribed circles.
-Two lines are important. The first below shows that the excellent precision provided by Lua makes it possible to define a radius with a complex calculation. The radius of the radical circle is given by $\sqrt{\Pi(S,\mathcal{C}(Ja,Ea))}$ (square root of the power of point $S$ with respect to the exinscribed circle with center |Ja| passing through |Ea|).
+Of particular importance are two lines of code. The first one below demonstrates that the exceptional precision provided by Lua allows for the definition of a radius through a complex calculation. The radius of the radical circle is determined by $\sqrt{\Pi(S,\mathcal{C}(Ja,Ea))}$ (square root of the power of point $S$ with respect to the exinscribed circle with center |Ja| passing through |Ea|).
-\begin{mybox}
-\begin{verbatim}
- C.ortho = circle: radius (z.S,math.sqrt(C.JaEa: power(z.S)))\end{verbatim}
+\begin{mybox}{}
+\begin{Verbatim}
+ C.ortho = circle: radius (z.S,math.sqrt(C.JaEa: power(z.S)))
+\end{Verbatim}
\end{mybox}
-Finally, the inversion of the Euler circle with respect to the radical circle is the Apollonius circle\footnote{The nine-point circle, or Euler circle, is externally tangent to the three circles. The points of tangency form Feuerbach's triangle.}. The transformation has an object as parameter, which is recognized by its type (all objects are typed in the package), and the method determines which algorithm to use according to this type.
+Lastly, it's worth noting that the inversion of the Euler circle with respect to the radical circle yields the Apollonius circle\footnote{The nine-point circle, or Euler circle, is externally tangent to the three circles. The points of tangency form Feuerbach's triangle.}. This transformation requires an object as a parameter, which is recognized by its type (all objects are typed in the package), and the method determines which algorithm to use according to this type.
-\begin{mybox}
-\begin{verbatim}
- C.apo = C.ortho : inversion (C.euler) \end{verbatim}
+\begin{mybox}{}
+\begin{Verbatim}
+ C.apo = C.ortho : inversion (C.euler)
+\end{Verbatim}
\end{mybox}
-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}
+Now that all the points have been defined, it's time to start drawing the paths. To accomplish this, nodes need to be created. This is the role of the macro \Imacro{tkzGetNodes}. Refer to \ref{ssub:points_transfer}
-The following section concerns only drawings, and is handled by \pkg{tkz-euclide}.
+The subsequent section exclusively deals with drawings, and is managed by \pkg{tkz-euclide}.
-\begin{verbatim}
+\begin{Verbatim}
\begin{tikzpicture}
\tkzGetNodes
\tkzFillCircles[green!30](O,xa)
@@ -146,15 +149,15 @@ The following section concerns only drawings, and is handled by \pkg{tkz-euclide
\tkzFillCircles[lightgray](S,a)
\tkzFillCircles[green!30](N,Ea)
\tkzDrawPoints(xa,xb,xc)
+ \tkzDrawCircles(Ja,Ea Jb,Eb Jc,Ec S,a O,xa N,Ea)
\tkzClipCircle(O,xa)
\tkzDrawLines[add=3 and 3](A,B A,C B,C)
- \tkzDrawCircles(Ja,Ea Jb,Eb Jc,Ec S,a O,xa N,Ea)
\tkzDrawPoints(O,A,B,C,S,Ea,Eb,Ec,N)
\tkzDrawSegments[dashed](S,xa S,xb S,xc)
\tkzLabelPoints(O,N,A,B)
\tkzLabelPoints[right](S,C)
\end{tikzpicture}
-\end{verbatim}
+\end{Verbatim}
\vspace{1em}
\begin{tkzelements}
@@ -186,9 +189,9 @@ The following section concerns only drawings, and is handled by \pkg{tkz-euclide
\tkzFillCircles[lightgray](S,a)
\tkzFillCircles[green!30](N,Ea)
\tkzDrawPoints(xa,xb,xc)
+ \tkzDrawCircles(Ja,Ea Jb,Eb Jc,Ec S,a O,xa N,Ea)
\tkzClipCircle(O,xa)
\tkzDrawLines[add=3 and 3](A,B A,C B,C)
- \tkzDrawCircles(Ja,Ea Jb,Eb Jc,Ec S,a O,xa N,Ea)
\tkzDrawPoints(O,A,B,C,S,Ea,Eb,Ec,N)
\tkzDrawSegments[dashed](S,xa S,xb S,xc)
\tkzLabelPoints(O,N,A,B)
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 14426183c2..152e50be1e 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
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz-elements.sty b/macros/latex/contrib/tkz/tkz-elements/latex/tkz-elements.sty
index d3618f8e31..f7416d8e4f 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz-elements.sty
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz-elements.sty
@@ -1,5 +1,5 @@
% encoding : utf8
-% tkz-elements.sty v2.00c
+% tkz-elements.sty v2.20c
% Copyright 2024 Alain Matthes
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -11,23 +11,27 @@
% This work has the LPPL maintenance status “maintained”.
% The Current Maintainer of this work is Alain Matthes.
-\ProvidesPackage{tkz-elements}[2024/02/04 v2.00c Graphic Object Library]
+\ProvidesPackage{tkz-elements}[2024/03/25 v2.20c Graphic Object Library]
\RequirePackage{luacode}
\directlua{require "tkz_elements_main"}
\newenvironment{tkzelements}
{ \directlua{scale=1}
\directlua{tkz_epsilon=1e-8}
+ \directlua{tkz_dc=2}
\directlua{indirect = true}
- \directlua{for k,v in pairs(z) do z[k] = nil end}
- \directlua{for k,v in pairs(C) do C[k] = nil end}
- \directlua{for k,v in pairs(E) do E[k] = nil end}
- \directlua{for k,v in pairs(L) do L[k] = nil end}
- \directlua{for k,v in pairs(P) do C[k] = nil end}
- \directlua{for k,v in pairs(S) do E[k] = nil end}
- \directlua{for k,v in pairs(R) do C[k] = nil end}
- \directlua{for k,v in pairs(Q) do T[k] = nil end}
- \directlua{for k,v in pairs(T) do T[k] = nil end}
+ \directlua{z={}
+ C={}
+ E={}
+ L={}
+ M={}
+ P={}
+ Q={}
+ R={}
+ RP={}
+ S={}
+ T={}
+ V={}}
\luacode}
{\endluacode}
@@ -53,13 +57,13 @@ end}
\draw[#1](#2) ellipse [x radius=\tkzUseLua{length(z.#3,z.#2)}, y radius = \tkzUseLua{length(z.#4,z.#2)},rotate=\tkzUseLua{math.deg(slope_ (z.#3,z.#2))}];
\endgroup
}
-\def\tkzDN{\pgfutil@ifnextchar[{\tkz@DN}{\tkz@DN[2]}}
+\def\tkzDN{\pgfutil@ifnextchar[{\tkz@DN}{\tkz@DN[2]}}%
\def\tkz@DN[#1]#2{%
\begingroup
-\pgfkeys{/pgf/number format/.cd,std,precision=#1}
+\pgfkeys{/pgf/number format/.cd,std,precision=#1}%
\pgfmathprintnumber{#2}
\endgroup
- }
+}
\makeatother
\endinput
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_circle.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_circle.lua
index e22e3eefd0..708e7b7af3 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_circle.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_circle.lua
@@ -1,6 +1,6 @@
-- tkz_elements-circles.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
@@ -82,9 +82,9 @@ end
-- real --
-----------------------
function circle: power (pt)
- local d
+ local d
d = point.abs (self.center - pt)
- return d * d - self.radius * self.radius
+ return d * d - self.radius * self.radius
end
-----------------------
-- points --
@@ -140,7 +140,7 @@ function circle: tangent_from (pt)
t1,t2 = tangent_from_ (self.center,self.through,pt)
return line :new (pt,t1),line : new (pt,t2)
end
- -- version 1.80
+
function circle: radical_axis (C)
local t1,t2
if self.radius > C.radius then
@@ -151,7 +151,6 @@ function circle: tangent_from (pt)
return line :new (t1,t2)
end
- -- version 1.80
function circle: radical_center (C1,C2)
if C2 == nil then
if self.radius > C1.radius then
@@ -163,7 +162,7 @@ else
return radical_center3 (self,C1,C2)
end
end
- -- version 1.80
+
function circle : radical_circle (C1,C2)
local rc
if C2 == nil then
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_class.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_class.lua
index 97bdc9449d..491d237ac2 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_class.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_class.lua
@@ -1,6 +1,6 @@
-- tkz_elements_class.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- from class.lua (Simple Lua Classes from Lua-users wiki)
-- Compatible with Lua 5.1 (not 5.0).
-- http://lua-users.org/wiki/SimpleLuaClasses DavidManura
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_ellipse.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_ellipse.lua
index 98800f791e..f20b87a44f 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_ellipse.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_ellipse.lua
@@ -1,6 +1,6 @@
-- tkz_elements-ellipses.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
@@ -90,18 +90,14 @@ function ellipse: tangent_at (pt)
end
function ellipse: tangent_from (pt)
- local da,db,zx,zy,zz,u,v,L,U,V
- zx = 2 * self.Rx * math.cos(self.slope)
- zy = 2 * self.Rx * math.sin(self.slope)
- zz = self.Fb + point(zx,zy)
- s1,s2 = intersection_cc_ (pt,self.Fa,self.Fb,zz)
- u,v = mediator_ (s2,self.Fa)
- L = line: new (u,v)
- U,U = intersection_le (L,self)
+ local u,v,U,V,w,s1,s2,s3,s4
+ w = report_ (self.Fb,self.Fa,2 * self.Rx)
+ s1,s2 = intersection_cc_ (pt,self.Fa,self.Fb,w)
u,v = mediator_ (s1,self.Fa)
- L = line: new (pt,u)
- V,V = intersection_le (L,self)
- return line : new (pt,U), line : new (pt,V)
+ U = intersection_ll_ (u,v,self.Fb,s1)
+ u,v = mediator_ (s2,self.Fa)
+ V = intersection_ll_ (u,v,self.Fb,s2)
+ return line : new (pt,U) , line : new (pt,V)
end
function ellipse: in_out (pt)
@@ -117,4 +113,10 @@ function ellipse: in_out (pt)
return false
end
end
+
+function ellipse: orthoptic_circle ()
+ local r = math.sqrt(self.Rx*self.Rx+self.Ry*self.Ry)
+ return circle : radius (self.center, r)
+end
+
return ellipse \ No newline at end of file
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_circles.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_circles.lua
index fe72c68c27..eacd8423a4 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_circles.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_circles.lua
@@ -1,6 +1,6 @@
-- tkz_elements_functions_circles.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
@@ -44,7 +44,6 @@ function orthogonal_through_ (a,b,x,y)
return circum_center_ (x,y,z)
end
-
function inversion_ (c,p,pt)
local ry = point.abs(c-p)
local d = point.abs(c-pt)
@@ -86,7 +85,6 @@ function radical_center_ (c1,p1,c2,p2)
return h*(c2-c1)/d+c1
end
--- version 1.60 center pour deux cercles ?
function radical_center3 (C1,C2,C3)
local t1,t2,t3,t4
t1,t2 = radical_axis_ (C1.center,C1.through,C2.center,C2.through)
@@ -98,7 +96,6 @@ return intersection_ll_ (t1,t2,t3,t4)
end
end
-
function south_pole_ (c,p)
local r
r = point.abs (c-p)
@@ -128,7 +125,6 @@ function circlepoint_ (c,t,k)
return rotation_ (c,phi,t)
end
--- version 1.60 new
function midcircle_(C1,C2)
local state,r,s,t1,t2,T1,T2,p,a,b,c,d,Cx,Cy,i,j
state = circles_position_(C1.center,C1.radius,C2.center,C2.radius)
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_intersections.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_intersections.lua
index 7dd2c59c32..dc44e2ae88 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_intersections.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_intersections.lua
@@ -1,6 +1,6 @@
-- tkz_elements_intersections.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_lines.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_lines.lua
index c9d840d89c..2dd8d6467a 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_lines.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_lines.lua
@@ -1,6 +1,6 @@
-- tkz_elements_functions_lines.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
@@ -138,4 +138,16 @@ function in_segment_ (a,b,pt)
else
return false
end
+end
+
+function report_ (za,zb,d,pt)
+ local t,len
+ len = point.mod(zb-za)
+ t = d/len
+ if pt == nil
+ then
+ return barycenter_({za,1-t},{zb,(t)})
+else
+ return barycenter_({za,1-t},{zb,(t)}) +pt-za
+end
end \ No newline at end of file
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_maths.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_maths.lua
index 63f5190f02..9b4e51d295 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_maths.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_maths.lua
@@ -1,6 +1,6 @@
-- tkz_elements_functions_maths.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
@@ -126,8 +126,186 @@ function swap(a,b)
b=t
return a,b
end
+-- real func
+function is_integer(x)
+ return x == math.round(x)
+end
+
+function near_integer(x)
+ local i,r = math.modf (x)
+ if is_zero (r) then
+ return true
+ end
+ return false
+end
+
+function residue (x)
+ dp,ip = math.modf (x)
+ return ip
+end
+
+function is_zero (x)
+ return math.abs(x) < tkz_epsilon
+end
+
+function set_zero (x)
+ if is_zero (x) then x=0 end
+ return x
+end
+
+function math.round(num)
+ return math.floor(num + 0.5)
+end
+
+function checknumber(x)
+ if type(x) == 'table' then
+ return x
+ else
+ if string.find(x, "e") then
+ return string.format("%.12f",x)
+ else
+ return x
+ end
+ end
+end
+
+function decimal (x)
+ if string.find(x, "e") then
+ return string.format("%.12f",x)
+ else
+ return x
+ end
+end
-function format_number(number, decimal_places)
- local format_string = string.format("%%.%df", decimal_places)
+function format_number(number, dcpl)
+ if type(number) == 'table' then return number
+ else
+ local format_string = string.format("%%.%df", dcpl)
return string.format(format_string, number)
+ end
+end
+
+function get_sign(number)
+ local sgn
+ if math.abs(number) < tkz_epsilon then
+ sgn = ""
+ elseif number > 0 then
+ sgn = "+"
+ else
+ sgn = "-"
+ end
+ return sgn
+end
+
+function solve_quadratic(a, b, c)
+ local root1, root2,delta ,sqrtdelta
+ if (type(a) == "number") and (type(b) == "number") and (type(c) == "number")
+ then
+ delta = b*b - 4*a*c
+ if delta < 0 then
+ root1, root2 = solve_cx_quadratic(a, b, c)
+ elseif delta == 0 then
+ root1 = -b / (2*a)
+ root2 = -b / (2*a)
+ else
+ sqrtdelta = math.sqrt(delta)
+
+ root1 = (-b + sqrtdelta) / (2*a)
+ root2 = (-b - sqrtdelta) / (2*a)
+ end
+ else
+ root1, root2 = solve_cx_quadratic(a, b, c)
+ end
+
+ return root1, root2 -- Two real roots
+end
+
+function solve_cx_quadratic(a, b, c)
+ local d = b*b - 4*a*c
+ local dcx = point.sqrt(d)
+ local root1 = (- b + dcx) / (2*a)
+ local root2 = (- b - dcx) / (2*a)
+ return root1, root2
+end
+
+-- function solve_cubic(a, b, c, d)
+-- local p = (3*a*c - b*b)/(3*a*a)
+-- local q = (2*b*b*b - 9*a*b*c + 27*a*a*d)/(27*a*a*a)
+-- local delta = q*q+4*p*p*p/27
+-- local offset = - b / (3*a)
+-- if delta > tkz_epsilon then
+-- local r = (- q + math.sqrt(delta))/2
+-- local s = (- q - math.sqrt(delta))/2
+-- if r > 0 then
+-- u = r^(1/3)
+-- else
+-- u = -(-r)^(1/3)
+-- end
+-- if s > 0 then
+-- v = s^(1/3)
+-- else
+-- v = -(-s)^(1/3)
+-- end
+-- return u + v + offset
+-- end
+-- if delta < 0 then
+-- local u = 2 * math.sqrt( - p / 3)
+-- local v = math.acos(((3*q)/(2*p)) * math.sqrt( -3 / p)) / 3
+-- local x1 = u * math.cos(v) + offset
+-- local x2 = u * math.cos(v + 2 * math.pi/3) + offset
+-- local x3 = u * math.cos(v - 2 * math.pi/3) + offset
+-- return {x1,x2,x3}
+-- end
+-- if delta == 0 then
+-- return {3*q/p+offset,-3*q/(2*p)+offset,-3*q/(2*p)+offset}
+-- end
+-- end
+
+function display_real (r)
+ local format_string,format_string
+ if r == nil then return ""
+ else
+ if near_integer ( r )
+ then
+ r = math.round ( r )
+ format_string = string.format("%%.%df", 0)
+ else
+ format_string = string.format("%%.%df", tkz_dc)
+ end
+ local st = string.format(format_string , r)
+ return st
+ end
+end
+
+
+function display_imag (r)
+ local sgn
+ sgn = get_sign (r)
+ r = math.abs(r)
+ if math.abs(r-1) < tkz_epsilon then
+ r = nil
+ elseif near_integer ( r ) then
+ r = math.abs(math.round(r))
+ end
+ st = display_real (r)
+ return sgn,st
+end
+
+function display (z)
+ if (type(z) == "number") then return display_real (z) else
+ local real, imag
+ real = z.re
+ imag = z.im
+ if is_zero ( imag ) then
+ return display_real (real)
+ else
+ str = display_real (real)
+ sgni,sti = display_imag (imag)
+ if str == "0" then
+ str=""
+ sgni = "" end
+ local st = str ..sgni..sti.."i"
+ return st
+ end
+end
end
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_matrices.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_matrices.lua
new file mode 100644
index 0000000000..7d3f475570
--- /dev/null
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_matrices.lua
@@ -0,0 +1,374 @@
+-- tkz_elements_functions_matrices.lua
+-- date 2024/03/25
+-- version 2.20c
+-- Copyright 2024 Alain Matthes
+-- This work may be distributed and/or modified under the
+-- conditions of the LaTeX Project Public License, either version 1.3
+-- of this license or (at your option) any later version.
+-- The latest version of this license is in
+-- http://www.latex-project.org/lppl.txt
+-- and version 1.3 or later is part of all distributions of LaTeX
+-- version 2005/12/01 or later.
+-- This work has the LPPL maintenance status “maintained”.
+-- The Current Maintainer of this work is Alain Matthes.
+
+-- ----------------------------------------------------------------------------
+function print_matrix(m,mstyle)
+ local mstyle = (mstyle or 'bmatrix')
+ local m = (m.type=='matrix' and m.set or m)
+ tex.sprint("$")
+ tex.sprint("\\begin{"..mstyle.."}")
+ for i = 1, #m do
+ for j = 1, #m[1] do
+ local x = m[i][j]
+ local st = display(x)
+ tex.sprint(st)
+ if j < #m[1] then tex.sprint(" & ") end
+ end
+ tex.sprint("\\\\")
+ end
+ tex.sprint("\\end{"..mstyle.."}")
+ tex.sprint("$")
+end
+
+function print_array(matrix)
+local mdata = (matrix.type=='matrix' and matrix.set or matrix)
+tex.sprint("\\{%")
+ for i = 1, #mdata do
+ local row = mdata[i]
+ local row_str = "{\\{"
+ for j = 1, #row do
+ row_str = row_str .. " " .. tostring(row[j])
+ if j < #row then
+ row_str = row_str .. " ,"
+ end
+ end
+ if (i~=#mdata) and (j~=#row) then
+ if i>1 then row_str = row_str .. " \\}}," else row_str = row_str .. " \\}}," end
+ tex.sprint(row_str)
+else
+ if i>1 then row_str = row_str .. " \\}}" else row_str = row_str .. " \\}}" end
+ tex.sprint(row_str)
+ end
+end
+tex.sprint("\\}")
+end
+
+function mul_matrix(A, B)
+local adata = (A.type=='matrix' and A.set or A)
+local bdata = (B.type=='matrix' and B.set or B)
+local C = {}
+ for i = 1, #adata do
+ C[i] = {}
+ for j = 1, #bdata[1] do
+ local num = adata[i][1] * bdata[1][j]
+ for k = 2, #adata[1] do
+ num = num + adata[i][k] * bdata[k][j]
+ end
+ C[i][j] = num
+ end
+ end
+ return matrix : new (C)
+end
+
+
+function add_matrix(A, B)
+local adata = (A.type=='matrix' and A.set or A)
+local bdata = (B.type=='matrix' and B.set or B)
+ local S = {}
+ for i = 1, #adata do
+ local T = {}
+ S[i] = T
+ for j = 1, #adata[1] do
+ T[j] = adata[i][j] + bdata[i][j]
+ end
+ end
+ return matrix : new (S)
+end
+
+function k_mul_matrix(n, A)
+local adata = (A.type=='matrix' and A.set or A)
+ local S = {}
+ for i = 1, #adata, 1 do
+ local T = {}
+ S[i] = T
+ for j =1, #adata[1], 1 do
+ T[j] = n * adata[i][j]
+ end
+ end
+ return matrix : new (S)
+end
+
+
+function transposeMatrix(A)
+local mdata = (A.type=='matrix' and A.set or A)
+ local transposedMatrix = {}
+ for i = 1, #mdata[1] do
+ transposedMatrix[i] = {}
+ for j = 1, #mdata do
+ transposedMatrix[i][j] = mdata[j][i]
+ end
+ end
+ return matrix : new (transposedMatrix)
+end
+
+-- Function to calculate the determinant of a square matrix
+function determinant(A)
+ local matrix = (A.type=='matrix' and A.set or A)
+ if #matrix == #matrix[1] then
+ local n = #matrix
+ if n == 1 then
+ return matrix[1][1] -- Base case for 1x1 matrix
+ elseif n == 2 then
+ return matrix[1][1] * matrix[2][2] - matrix[1][2] * matrix[2][1] -- Base case for 2x2 matrix
+ else
+ local det = 0
+ for j = 1, n do
+ local minor = {}
+ for i = 2, n do
+ minor[i - 1] = {}
+ for k = 1, n do
+ if k ~= j then
+ minor[i - 1][#minor[i - 1] + 1] = matrix[i][k]
+ end
+ end
+ end
+ det = det + ((-1)^(j + 1)) * matrix[1][j] * determinant(minor) -- Recursive call for larger matrices
+ end
+ return det
+ end
+ else return nil end
+end
+
+function check_square_matrix (A)
+ local matrix = (A.type=='matrix' and A.set or A)
+ if #matrix == #matrix[1]
+ then
+ return true
+ else
+ return false
+ end
+end
+
+
+function id_matrix (n)
+ local identityMatrix = {}
+ for i = 1, n do
+ identityMatrix[i] = {}
+ for j = 1, n do
+ if i == j then
+ identityMatrix[i][j] = 1
+ else
+ identityMatrix[i][j] = 0
+ end
+ end
+ end
+ return matrix : new (identityMatrix)
+end
+
+function inverse_2x2(A)
+ local m = (A.type=='matrix' and A.set or A)
+ local a, b, c, d = m[1][1], m[1][2], m[2][1], m[2][2]
+ local D = A.det
+ if D == 0 then
+ return nil -- La matrice n'est pas inversible
+ else
+ local inv ={}
+ inv[1]={}
+ inv[1][1] = d / D
+ inv[1][2] = -b / D
+ inv[2]={}
+ inv[2][1] = -c / D
+ inv[2][2] = a / D
+ return matrix : new (inv)
+ end
+end
+
+function adjugate_(A)
+ local m = (A.type=='matrix' and A.set or A)
+ if #m == 2 then
+ local a,b,c,d = m[2][2],-m[1][2],- m[2][1],m[1][1]
+ return matrix : new ({{a,b},{c,d}})
+ elseif #m == 3 then
+ local a, b, c = m[1][1], m[1][2], m[1][3]
+ local d, e, f = m[2][1], m[2][2], m[2][3]
+ local g, h, i = m[3][1], m[3][2], m[3][3]
+ return transposeMatrix(matrix : new ({
+ {e * i - f * h, -(d * i - f * g), d * h - e * g},
+ {-(b * i - c * h), a * i - c * g, -(a * h - b * g)},
+ {b * f - c * e, -(a * f - c * d), a * e - b * d}
+ }))
+ else return nil
+ end
+end
+
+function inverse_3x3(A)
+ local D = A.det
+ if D == 0 then
+ return nil -- La matrice n'est pas inversible
+ else
+ local adj = adjugate_(A)
+ local m = (adj.type=='matrix' and adj.set or adj)
+ local inv = {}
+ for i = 1, 3 do
+ inv[i] = {}
+ for j = 1, 3 do
+ inv[i][j] = m[i][j] / D
+ end
+ end
+ return matrix : new (inv)
+ end
+end
+
+-- inverse only for 2x2 or 3x3 matrix
+function inv_matrix (A)
+ if A.det ==0 then tex.print("Matrix not inversible: det = 0") return nil
+ else
+ local M = (A.type=='matrix' and A.set or A)
+ local n = #M
+ if n == 2 then
+ local m = (A.type=='matrix' and A.set or A)
+ local a, b, c, d = m[1][1], m[1][2], m[2][1], m[2][2]
+ local D = A.det
+ local inv ={}
+ inv[1]={}
+ inv[1][1] = d / D
+ inv[1][2] = -b / D
+ inv[2]={}
+ inv[2][1] = -c / D
+ inv[2][2] = a / D
+ return matrix : new (inv)
+ else
+ local D = A.det
+ local adj = adjugate_(A)
+ local m = (adj.type=='matrix' and adj.set or adj)
+ local inv = {}
+ for i = 1, 3 do
+ inv[i] = {}
+ for j = 1, 3 do
+ inv[i][j] = m[i][j] / D
+ end
+ end
+ return matrix : new (inv)
+ end
+ end
+end
+
+function diagonalize_ (A)
+ local m = (A.type=='matrix' and A.set or A)
+ local trace = m[1][1] + m[2][2]
+ local a,b = m[1][1],m[1][2]
+ local det = A.det
+ local D = trace * trace - 4 * det
+ if D > 0 then
+ local va1 = (trace + math.sqrt(D)) / 2
+ local va2 = (trace - math.sqrt(D)) / 2
+ return matrix : new ({{va1,0},{0,va2}}),
+ matrix : new ({{1,1},{ (va1 - a )/b, (va2 - a)/b}})
+ else
+ local va1 = point (trace/2 , math.sqrt(-D)/ 2)
+ local va2 = point (trace/2 , - math.sqrt(-D)/ 2)
+ return matrix : new ({{va1,0},{0,va2}})--,
+ -- matrix : new ({{1,1},{ (va1 - a )/b, (va2 - a)/b}})
+ end
+ end
+
+ function isDiagonal_(A)
+ local matrix = (A.type=='matrix' and A.set or A)
+ if check_square_matrix (A) == true
+ then
+ for i = 1, #matrix do
+ for j = 1, #matrix[1] do
+ if i ~= j and matrix[i][j] ~= 0 then
+ return false
+ end
+ end
+ end
+ return true
+ else
+ return false
+ end
+ end
+
+ function isOrthogonal_(A)
+ local m = (A.type=='matrix' and A.set or A)
+ if (check_square_matrix (A) == true) and (A.det ~=0)
+ then
+ local mT = transposeMatrix (A)
+ local mI = inv_matrix (A)
+ if mT == mI then return true else return false end
+ else
+ return false
+ end
+ end
+
+
+ function homogenization_ (A)
+ local m = (A.type=='matrix' and A.set or A)
+ if A.cols ~= 1 then
+ return nil
+ else
+ local a,b,c
+ a=m[1][1]
+ b=m[2][1]
+ c= 1
+ return matrix : new ({{a},{b},{c}})
+ end
+ end
+
+ function get_element_( A,i,j )
+ local m = (A.type=='matrix' and A.set or A)
+ if m[i] and m[i][j] then
+ return m[i][j]
+ end
+ end
+
+ function get_htm_point(A)
+ local m = (A.type=='matrix' and A.set or A)
+ return point : new( m[1][1],m[2][1])
+ end
+
+ function htm_apply_ (A,z)
+ local V = homogenization_ ( 1/scale*z.mtx)
+ local W = A * V
+ return get_htm_point(W)
+ end
+
+ function htm_apply_L_ (A,obj)
+ local x,y
+ x = htm_apply_ (A,obj.pa)
+ y = htm_apply_ (A,obj.pb)
+ return line : new (x,y)
+ end
+
+ function htm_apply_C_ (A,obj)
+ local x,y
+ x = htm_apply_ (A,obj.center)
+ y = htm_apply_ (A,obj.through)
+ return circle : new (x,y)
+ end
+
+ function htm_apply_T_ (A,obj)
+ local x,y,z
+ x = htm_apply_ (A,obj.pa)
+ y = htm_apply_ (A,obj.pb)
+ z = htm_apply_ (A,obj.pc)
+ return triangle : new (x,y,z)
+ end
+
+ function htm_apply_Q_ (A,obj)
+ local x,y,z,t
+ x = htm_apply_ (A,obj.pa)
+ y = htm_apply_ (A,obj.pb)
+ z = htm_apply_ (A,obj.pc)
+ t = htm_apply_ (A,obj.pd)
+ if obj.type == "square" then
+ return square : new (x,y,z,t)
+ elseif obj.type == "rectangle" then
+ return rectangle : new (x,y,z,t)
+ elseif obj.type == "parallelogram" then
+ return parallelogram : new (x,y,z,t)
+ elseif obj.type == "quadrilateral" then
+ return quadrilateral : new (x,y,z,t)
+ end
+ end \ No newline at end of file
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_points.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_points.lua
index cb91788424..ce04c2d091 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_points.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_points.lua
@@ -1,6 +1,6 @@
-- tkz_elements_functions_points.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_regular.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_regular.lua
index 7f71760066..bd8f7cab5b 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_regular.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_regular.lua
@@ -1,6 +1,6 @@
-- tkz_elements_functions_regular.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_triangles.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_triangles.lua
index d6a1cb1ecb..2e917db2f1 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_triangles.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_triangles.lua
@@ -1,6 +1,6 @@
-- tkz_elements_functions_triangles.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
@@ -260,6 +260,20 @@ function feuerbach_tr_ (a,b,c)
intersection_cc_ (e,m,jc,hc)
end
--------------------
+-- ellipse --
+--------------------
+function steiner_ (a,b,c)
+ local g,fa,fb,delta,m,v
+ g = centroid_ (a,b,c)
+ delta = a*a+b*b+c*c -a*b-a*c-b*c
+ fa = (a+b+c - point.sqrt(delta))/3
+ fb = (a+b+c + point.sqrt(delta))/3
+ m = midpoint_(b,c)
+ r = (length(fa,m)+length(fb,m))/2
+ v = report_ (fb,fa,r,g)
+ return ellipse: foci (fb,fa,v)
+end
+--------------------
-- miscellanous --
--------------------
@@ -274,7 +288,9 @@ function check_equilateral_ (a,b,c)
C = a - b
if (point.abs(A)-point.abs(B) < tkz_epsilon) and (point.abs(B)-point.abs(C) < tkz_epsilon)
then
- return true else return false
+ return true
+ else
+ return false
end
end
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_line.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_line.lua
index d8c8944835..68a5ad843b 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_line.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_line.lua
@@ -1,6 +1,6 @@
-- tkz_elements_lines.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
@@ -152,6 +152,17 @@ function line: _north_pb (d)
local d = d or 1
return d/self.length *( self.north_pb - self.pb ) + self.pb
end
+
+function line : report (d,pt)
+ local t
+ t = d/self.length
+ if pt == nil
+ then
+ return barycenter_({self.pa,1-t},{self.pb,(t)})
+ else
+ return barycenter_({self.pa,1-t},{self.pb,(t)}) +pt-self.pa
+ end
+end
-------------- transformations -------------
function line: translation_pt ( pt )
return translation_ ( self.pb-self.pa,pt )
@@ -465,7 +476,7 @@ line.golden = line.sublime
line.golden_gnomon = line.divine
------------------------------
--- Result -> couple of points
+-- Result -> square
------------------------------
function line: square (swap)
if swap == nil
@@ -476,15 +487,5 @@ function line: square (swap)
end
end
-function line : report (d,pt)
- local t
- t = d/self.length
- if pt == nil
- then
- return barycenter_({self.pa,1-t},{self.pb,(t)})
-else
- return barycenter_({self.pa,1-t},{self.pb,(t)}) +pt-self.pa
-end
-end
return line \ No newline at end of file
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_main.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_main.lua
index 92eab43a84..3dffb3de46 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_main.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_main.lua
@@ -1,6 +1,6 @@
-- tkz_elements-main.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
@@ -16,8 +16,8 @@
C = {}
E = {}
L = {}
- M = {}
P = {}
+ M = {}
Q = {}
R = {}
RP = {}
@@ -47,3 +47,5 @@ require "tkz_elements_functions_lines.lua"
require "tkz_elements_functions_circles.lua"
require "tkz_elements_functions_triangles.lua"
require "tkz_elements_functions_regular.lua"
+require "tkz_elements_functions_matrices.lua"
+require "tkz_elements_matrices.lua" \ No newline at end of file
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_matrices.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_matrices.lua
new file mode 100644
index 0000000000..ed5fa5b1f3
--- /dev/null
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_matrices.lua
@@ -0,0 +1,219 @@
+-- tkz_elements_matrices.lua
+-- date 2024/03/25
+-- version 2.20c
+-- Copyright 2024 Alain Matthes
+-- This work may be distributed and/or modified under the
+-- conditions of the LaTeX Project Public License, either version 1.3
+-- of this license or (at your option) any later version.
+-- The latest version of this license is in
+-- http://www.latex-project.org/lppl.txt
+-- and version 1.3 or later is part of all distributions of LaTeX
+-- version 2005/12/01 or later.
+-- This work has the LPPL maintenance status “maintained”.
+-- The Current Maintainer of this work is Alain Matthes.
+
+-- ----------------------------------------------------------------------------
+matrix={}
+function matrix: new (value)
+ local type = 'matrix'
+ local rows = #value
+ local cols = #value[1]
+ local set = value
+ local det = determinant(value)
+ local o = {set = set,
+ rows = rows,
+ cols = cols,
+ det = det,
+ type = type }
+ setmetatable(o, self)
+ self.__index = self
+ return o
+end
+
+function matrix.__mul(m1,m2)
+ if getmetatable(m1) ~= matrix then return k_mul_matrix(m1, m2) end
+ if getmetatable(m2) ~= matrix then return k_mul_matrix(m2, m1) end
+ return mul_matrix(m1,m2)
+end
+
+function matrix.__add(m1,m2)
+ return add_matrix(m1,m2)
+end
+
+function matrix.__sub(m1,m2)
+ return add_matrix(m1,k_mul_matrix(-1, m2))
+end
+
+function matrix.__pow( m, num )
+ if num =='T' then
+ return transposeMatrix(m)
+ else
+ if num == 0 then
+ return matrix:new( #m,"I" )
+ end
+ if num < 0 then
+ local i; m,i = inv_matrix ( m )
+ if not m then return m, i end
+ num = -num
+ end
+ local mt = m
+ for i = 2,num do
+ mt = mul_matrix(mt,m)
+ end
+ return mt
+end
+end
+
+function matrix.__tostring( A )
+ local mt = (A.type=='matrix' and A.set or A)
+ local k = {}
+ for i = 1,#mt do
+ local n = {}
+ for j = 1,#mt[1] do
+ n[j] = display(mt[i][j])
+ end
+ k[i] = table.concat(n, " ")
+ end
+ return table.concat(k)
+end
+
+function matrix.__eq( A , B )
+ local mt1 = (A.type=='matrix' and A.set or A)
+ local mt2 = (B.type=='matrix' and B.set or B)
+ if A.type ~= B.type then
+ return false
+ end
+
+ if #mt1 ~= #mt2 or #mt1[1] ~= #mt2[1] then
+ return false
+ end
+
+ for i = 1,#mt1 do
+ for j = 1,#mt1[1] do
+ if mt1[i][j] ~= mt2[i][j] then
+ return false
+ end
+ end
+ end
+ return true
+end
+
+function matrix : square(n,...)
+ local m = {}
+ local t = table.pack(...)
+ if n*n == #t then
+ for i = 1, n do
+ m[i] = {}
+ for j = 1, n do
+ m[i][j] = t[n*(i-1)+j]
+ end
+ end
+ return matrix : new (m)
+ else
+ return nil
+ end
+end
+
+function matrix: vector (...)
+ local m = {}
+ local t = table.pack(...)
+ for i = 1, #t do
+ m[i] = {}
+ m[i][1] = t[i]
+ end
+ return matrix : new (m)
+end
+
+function matrix : homogenization ()
+ return homogenization_ (self)
+end
+
+function matrix : htm_apply (...)
+ local obj,nb,t
+ local tp = table.pack(...)
+ obj = tp[1]
+ nb = tp.n
+ if nb == 1 then
+ if obj.type == "point" then
+ return htm_apply_ ( self,obj )
+ elseif obj.type == "line" then
+ return htm_apply_L_ (self,obj)
+ elseif obj.type == "triangle" then
+ return htm_apply_T_ (self,obj)
+ elseif obj.type == "circle" then
+ return htm_apply_C (self,obj)
+ elseif obj.type == "square"
+ or obj.type == "rectangle"
+ or obj.type == "quadrilateral"
+ or obj.type == "parallelogram" then
+ return htm_apply_Q (self,obj)
+ end
+ else
+ t = {}
+ for i=1,tp.n do
+ table.insert(t , htm_apply_ ( self , tp[i]))
+ end
+ return table.unpack ( t )
+ end
+end
+
+function matrix: k_mul (n)
+ return k_mul_matrix(n, self)
+end
+
+function matrix : get (i,j)
+ return get_element_( self,i,j )
+end
+
+function matrix: inverse ()
+ return inv_matrix (self)
+end
+
+function matrix: adjugate ()
+ return adjugate_ (self)
+end
+
+function matrix: transpose ()
+ return transposeMatrix (self)
+end
+
+function matrix: is_diagonal ()
+ return isDiagonal_ (self)
+end
+
+function matrix: is_orthogonal ()
+ return isOrthogonal_ (self)
+end
+
+function matrix: diagonalize () -- return two matrices D and P
+ return diagonalize_ (self)
+end
+
+function matrix: print (style,fmt)
+ local style = (style or 'bmatrix')
+ local fmt = (fmt or 0)
+ return print_matrix (self,style,fmt)
+end
+
+function matrix: identity (n)
+ return id_matrix (n)
+end
+
+-------------------------
+-- homogeneous transformation matrix
+function matrix : htm (phi,a,b,sx,sy)
+ local tx = (a or 0)
+ local ty = (b or 0)
+ local sx = (sx or 1)
+ local sy = (sy or 1)
+ local phi = (phi or 0)
+ return matrix : square (3,sx*math.cos(phi),-math.sin(phi),tx,math.sin(phi),sy*math.cos(phi),ty,0,0,1)
+end
+-------------------------
+
+function matrix: is_orthogonal ()
+ return isOrthogonal_ (self)
+end
+
+return matrix
+
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_misc.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_misc.lua
index f95877a844..6bf04756a6 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_misc.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_misc.lua
@@ -1,6 +1,6 @@
-- tkz_elements_functions_maths.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_parallelogram.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_parallelogram.lua
index 5ce1d2a9a4..99c4344543 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_parallelogram.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_parallelogram.lua
@@ -1,6 +1,6 @@
-- tkz_elements_parallelogram.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua
index 8837299966..5e9d4fcd00 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua
@@ -1,6 +1,6 @@
-- tkz_elements_point.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
@@ -26,6 +26,7 @@ point = class(function(p,re,im)
p.type = 'point'
p.argument = math.atan(p.im, p.re)
p.modulus = math.sqrt(p.re * p.re + p.im * p.im)
+ p.mtx = matrix : new {{p.re},{p.im}}
end)
local sqrt = math.sqrt
@@ -94,46 +95,62 @@ function point.__div(x,y)
end
function point.__tostring(z)
- if (z.re == 0) then
- if (z.im == 0) then
+ local real = z.re
+ local imag = z.im
+ if (real == 0) then
+ if (imag == 0) then
return "0"
else
- if (z.im ==1) then
+ if (imag == 1) then
return "" .. "i"
- else
- if (z.im ==-1) then
- return "" .. "-i"
- else
- return "" .. z.im .. "i"
+ else
+ if (imag == -1) then
+ return "" .. "-i"
+ else
+ local imag = string.format( "%."..tkz_dc.."f",imag)
+ return "" .. imag .. "i"
end
end
end
else
- if (z.im > 0) then
- if (z.im ==1) then
- return "" .. z.re .. "+" .. "i"
- else
- return "" .. z.re .. "+" .. z.im .. "i"
+ if (imag > 0) then
+ if (imag ==1) then
+ if is_integer (real) then real = math.round(real) else
+ real = string.format( "%."..tkz_dc.."f",real) end
+ return "" .. real .. "+" .. "i"
+ else
+ if is_integer (real) then real = math.round(real) else
+ real = string.format( "%."..tkz_dc.."f",real) end
+ imag = string.format( "%."..tkz_dc.."f",imag)
+ return "" .. real .. "+" .. imag .. "i"
end
- elseif (z.im < 0) then
- if (z.im ==-1) then
- return "" .. z.re .. "-" .. "i"
- else
- return "" .. z.re .. z.im .. "i"
- end
+ elseif (imag < 0) then
+ if (imag == -1) then
+ if is_integer (real) then real = math.round(real) else
+ real = string.format( "%."..tkz_dc.."f",real) end
+ imag = string.format( "%."..tkz_dc.."f",imag)
+ return "" .. real .. "-" .. "i"
+ else
+ if is_integer (real) then real = math.round(real) else
+ real = string.format( "%."..tkz_dc.."f",real) end
+ imag = string.format( "%."..tkz_dc.."f",imag)
+ return "" .. real .. imag .. "i"
+ end
else
- return "" .. z.re
-
+ if is_integer (real) then real = math.round(real) else
+ real = string.format( "%."..tkz_dc.."f",real) end
+ return "" .. real
+
end
end
end
function point.__tonumber(z)
- if (z.im == 0) then
- return z.re
- else
- return nil
- end
+ if (z.im == 0) then
+ return z.re
+ else
+ return nil
+ end
end
function point.__eq(z1,z2)
@@ -148,46 +165,61 @@ local function pyth(a, b)
end
function point.conj(z)
- return point(z.re,-z.im)
+ local cx = topoint(z)
+ return point(cx.re,-cx.im)
end
function point.mod(z)
- local function sqr(x) return x*x end
- return pyth (z.re,z.im)
+ local cx = topoint(z)
+ local function sqr(x) return x*x end
+ return pyth (cx.re,cx.im)
end
function point.abs (z)
+ local cx = topoint(z)
local function sqr(x) return x*x end
- return sqrt(sqr(z.re) + sqr(z.im))
+ return sqrt(sqr(cx.re) + sqr(cx.im))
end
function point.norm (z)
- local function sqr(x) return x*x end
- return (sqr(z.re) + sqr(z.im))
+ local cx = topoint(z)
+ local function sqr(x) return x*x end
+ return (sqr(cx.re) + sqr(cx.im))
+end
+
+function point.power (z,n)
+ if type(z) == number then return z^n
+ else
+ local m = (z.modulus)^n
+ local a = angle_normalize((z.argument)*n)
+ return scale * polar_ (m,a)
+ end
end
function point.arg (z)
- return math.atan(z.im, z.re)
+ cx = topoint(z)
+ return math.atan(cx.im, cx.re)
end
function point.get(z)
return z.re, z.im
end
-function point: sqrt()
- local y = sqrt((point.mod(self)-self.re)/2)
- local x = self.im/(2*y)
- return point(x,y)
+function point.sqrt(z)
+ local cx = topoint(z)
+ local len = math.sqrt( (cx.re)^2+(cx.im)^2 )
+ local sign = (cx.im < 0 and -1 ) or 1
+ return point(math.sqrt((cx.re+len)/2), sign*math.sqrt((len-cx.re)/2) )
end
-- methods ---
function point: new ( a,b )
- return scale * point (a,b )
+ return scale * point (a,b )
end
function point: polar ( radius, phi )
- return point: new (radius * math.cos(phi), radius * math.sin(phi))
+ return point: new (radius * math.cos(phi), radius * math.sin(phi))
end
function point: polar_deg ( radius, phi )
@@ -195,18 +227,18 @@ function point: polar_deg ( radius, phi )
end
function point: north(d)
- local d = d or 1
+ local d = d or 1
return self+ polar_ ( d , math.pi/2 )
end
function point: south(d)
- local d = d or 1
- return self + polar_ ( d , 3 * math.pi/2 )
- end
+ local d = d or 1
+ return self + polar_ ( d , 3 * math.pi/2 )
+end
function point: east(d)
- local d = d or 1
- return self+ polar_( d , 0 )
+ local d = d or 1
+ return self+ polar_( d , 0 )
end
function point: west(d)
@@ -325,4 +357,8 @@ end
function point : at (z)
return point(self.re+z.re,self.im+z.im)
+end
+
+function point : print ()
+ tex.print(tostring(self))
end \ No newline at end of file
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_quadrilateral.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_quadrilateral.lua
index e1882c67cb..f02c977e08 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_quadrilateral.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_quadrilateral.lua
@@ -1,6 +1,6 @@
-- tkz_elements_quadrilateral.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_rectangle.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_rectangle.lua
index 7c4f8f75ed..7add1b244d 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_rectangle.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_rectangle.lua
@@ -1,6 +1,6 @@
-- tkz_elements-rectangle.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_regular.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_regular.lua
index 2e00ab9598..cc7a24ff06 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_regular.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_regular.lua
@@ -1,6 +1,6 @@
-- tkz_elements_regular.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_square.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_square.lua
index fe7b7a150b..7373886efc 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_square.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_square.lua
@@ -1,6 +1,6 @@
-- tkz_elements-square.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_triangle.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_triangle.lua
index 0d2699ac55..d3a80bd777 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_triangle.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_triangle.lua
@@ -1,6 +1,6 @@
-- tkz_elements_triangles.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
@@ -56,7 +56,6 @@ end
-----------------------
-- points --
-----------------------
--- version 1.80
function triangle: trilinear (a,b,c)
return barycenter_ ( {self.pa,a*self.a },{self.pb,b*self.b},{self.pc,c*self.c} )
end
@@ -146,7 +145,10 @@ end
-------------------
-- N,H,G,O -- check_equilateral_ (a,b,c)
function triangle: euler_line ()
- return line : new (self.orthocenter,self.circumcenter)
+ if not check_equilateral_(self.pa,self.pb,self.pc)
+ then
+ return line : new (self.orthocenter,self.circumcenter)
+ end
end
function triangle: symmedian_line (n)
@@ -359,7 +361,28 @@ end
function triangle: euler ()
return triangle : new (euler_points_ (self.pa,self.pb,self.pc) )
end
+-------------------
+-- Result -> ellipse
+-------------------
+function triangle: steiner_inellipse ()
+ return steiner_ (self.pa,self.pb,self.pc)
+end
+
+function triangle: steiner_circumellipse ()
+ local e
+ e = steiner_ (self.pa,self.pb,self.pc)
+ return ellipse: radii (e.center,2*e.Rx,2*e.Ry,e.slope )
+end
+function triangle: euler_ellipse ()
+ if self : check_acutangle ()
+ then
+ local a,b
+ a,b = intersection_lc_ (self.orthocenter,self.circumcenter,
+ self.eulercenter,self.ab.mid)
+ return ellipse: foci (self.orthocenter,self.circumcenter,a)
+ end
+end
-------------------
-- Result -> miscellaneous
-------------------
@@ -406,6 +429,16 @@ function triangle: check_equilateral ()
return check_equilateral_ (self.pa,self.pb,self.pc)
end
+function triangle: check_acutangle()
+ local asq = self.a * self.a
+ local bsq = self.b * self.b
+ local csq = self.c * self.c
+ if asq + bsq > csq and bsq + csq > asq and csq + asq > bsq then
+ return true
+ else
+ return false
+ end
+end
return triangle \ No newline at end of file
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_vector.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_vector.lua
index 310b522788..f3f93a0f53 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_vector.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_vector.lua
@@ -1,6 +1,6 @@
-- tkz_elements_vectors.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
@@ -17,10 +17,12 @@ vector = {}
function vector: new(za, zb)
local type = 'vector'
local slope = angle_normalize_(point.arg(zb-za))
- local norm = point.mod(zb-za)
- local o = {t = za,
- h = zb,
- norm = norm,
+ local norm = point.mod(zb-za)
+ local mtx = matrix : new {{za},{zb}}
+ local o = {tail = za,
+ head = zb,
+ norm = norm,
+ mtx = mtx,
slope = slope,
type = type }
setmetatable(o, self)
@@ -46,35 +48,35 @@ function vector.__mul(r,v)
end
function vector: normalize ()
- local z = self.h-self.t
+ local z = self.head-self.tail
local d = point.abs(z)
local nz = point(z.re/d,z.im/d)
- return vector : new (self.t,nz + self.t)
+ return vector : new (self.tail,nz + self.tail)
end
function vector: add (ve)
- return vector :new (self.t,self.h+ve.h-ve.t)
+ return vector :new (self.tail,self.head+ve.head-ve.tail)
end
function vector: orthogonal (d)
local z
if d == nil then
- return vector : new (self.t, rotation_(self.t,math.pi/2,self.h))
+ return vector : new (self.tail, rotation_(self.tail,math.pi/2,self.head))
else
- z = self.t+ point (d*math.cos(self.slope),d*math.sin(self.slope))
- return vector : new (self.t, rotation_(self.t,math.pi/2,z))
+ z = self.tail+ point (d*math.cos(self.slope),d*math.sin(self.slope))
+ return vector : new (self.tail, rotation_(self.tail,math.pi/2,z))
end
end
function vector: scale (d)
local l,z
l = self.norm
- z = self.t+ point (d*l*math.cos(self.slope),d*l*math.sin(self.slope))
- return vector : new (self.t,z )
+ z = self.tail+ point (d*l*math.cos(self.slope),d*l*math.sin(self.slope))
+ return vector : new (self.tail,z )
end
function vector: at (zc)
- return vector :new (zc,zc+self.h-self.t)
+ return vector :new (zc,zc+self.head-self.tail)
end
return vector