summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-12-16 03:01:40 +0000
committerNorbert Preining <norbert@preining.info>2023-12-16 03:01:40 +0000
commitcf11d08f6fe4d61a3da648d820601e3fca67d8d4 (patch)
tree2eea226ec62bd73e49dce85df85c093393d58af3 /macros/latex/contrib/tkz
parent9dd4909414ccbc438a2c6276bf642904d6036891 (diff)
CTAN sync 202312160301
Diffstat (limited to 'macros/latex/contrib/tkz')
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/README.md53
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-circle.tex320
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-line.tex2
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-point.tex111
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-triangle.tex6
-rw-r--r--[-rwxr-xr-x]macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-examples.tex60
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.pdfbin537824 -> 0 bytes
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.tex11
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-presentation.tex22
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-transferts.tex4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/doc/tkz-elements.pdfbin537824 -> 551541 bytes
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz-elements.sty4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_circle.lua33
-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.lua4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_circles.lua24
-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.lua11
-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.lua4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_line.lua15
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_main.lua4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_misc.lua72
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_parallelogram.lua8
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua4
-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.lua4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_vector.lua4
33 files changed, 632 insertions, 196 deletions
diff --git a/macros/latex/contrib/tkz/tkz-elements/README.md b/macros/latex/contrib/tkz/tkz-elements/README.md
index 93bf219100..2ece035621 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 1.50c 2023/12/08
+Release 1.60c 2023/12/14
## Description
-`tkz-elements v.1.50c` 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.1.60c` 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.
@@ -56,31 +56,38 @@ package conflicts.
## Examples
Some examples will be stored on my site : [http://altermundus.fr](http://altermundus.fr).
+An important example `Golden Arbelos` using the package is on the site.
## History
- - version 1.50c Correction of the documentation
-
- Added "swap" option to create triangles from the "line" object.
-
- "iscyclic" is a new method to know if a quadrilateral is inscribable in a circle.
-
- Added function "diameter" to create a circle.
-
- Added function "swap" to swap two points.
-
- Correction method "gold" of object rectangle.
+ - version 1.60c
+
+ - added Internal and external tangents common to two circles:
+ - function circle : `external_tangent`(C)
+ - function circle : `internal_tangent(C)
+ - radical_center and radical_circle are also valid for two circles
+ - function `radical_center` (C1,C2,C3)
+ - function `radical_circle` (C1,C2,C3)
+ - function `circles_position` (C1,C2)
+ - function `midcircle` (C1,C2) powerful tool for working with inversions
+ - Bug corrected in midarc now use get_angle instead of get_angle_
+ - Modification of a triangle attribute `ca` replaces `ac` to designate the line passing through the third and first points
+ - The center of symmetry of a parallelogram is named "center" instead of "i".
+ - Correction documentation
+ - Correction of examples using the circle:point (k) method, where k is now a real number rather than an angle.
- Correction method "in_circle_" of object triangle.
-
- Correction method "incentral_tr_" of object triangle.
-
- Added method "soddy_center" of object triangle.
-
- Added option "swap" for method "square" of object line.
-
- Added method "report" for object line. Transfer a defined length from a point
+ - version 1.50c Correction of the documentation
- Added option "swap" to the function "square : side"
+ - Added "swap" option to create triangles from the "line" object.
+ - "iscyclic" is a new method to know if a quadrilateral is inscribable in a circle.
+ - Added function "diameter" to create a circle.
+ - Added function "swap" to swap two points.
+ - Correction method "gold" of object rectangle.
+ - Correction method "in_circle_" of object triangle.
+ - Correction method "incentral_tr_" of object triangle.
+ - Added method "soddy_center" of object triangle.
+ - Added option "swap" for method "square" of object line.
+ - Added method "report" for object line. Transfer a defined length from a point
+ - Added option "swap" to the function "square : side"
- Version 1.40c Restructuring objects
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 6eb97c239b..1ed09078a3 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
@@ -115,8 +115,8 @@ Three attributes are used (south, west, radius).
\midrule
\Imeth{circle}{orthogonal\_from (pt)} & |C = C.OA: orthogonal_from (z.P)| & \\
\Imeth{circle}{orthogonal\_through (pta,ptb)} & |C = C.OA: orthogonal_through (z.z1,z.z2)|\\
-\Imeth{circle}{inversion (circle)} & |L or C = C.AC: inversion (C.EF)|&\\
-
+\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} \\
\midrule
\textbf{Miscellaneous} &&\\
\midrule
@@ -265,7 +265,7 @@ The "inversion" method can be used on a point, a line or a circle. Depending on
\subsubsection{Inversion: point} % (fold)
\label{ssub:inversion_point}
-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 "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}
@@ -424,9 +424,321 @@ color = "orange"
\tkzLabelPoints(a,...,f,o,p,q)
\end{tikzpicture}
\end{minipage}
+% subsubsection inversion (end)
+\subsubsection{midcircle} % (fold)
+\label{ssub:midcircle}
-% subsubsection inversion (end)
+\begin{minipage}{0.95\linewidth }
+\emph{From Eric Danneels and Floor van Lamoen: A midcircle of two given circles is a circle that swaps the two given circles by inversion. Midcircles are in the same pencil of circles as the given circles. The center of the midcircle(s) is one or both of the centers of similitude. We can distinguish four cases:
+\begin{enumerate}[label=(\roman*)]
+ \item The two given circles intersect: there are two midcircles with centers at the centers of similitude of the given circles;
+ \item One given circle is in the interior of the other given circle. Then there is one midcircle with center of similitude at the internal center of similitude of the given circles;
+ \item One given circle is in the exterior of the other given circle. Then there is one midcircle with center at the external center of similitude of the given circles.
+Clearly the tangency cases can be seen as limit cases of the above;
+\item If the circles intersect in a single point, the unique midcircle has center at the external similitude center or at internal similitude center.
+\end{enumerate} }
+\end{minipage}
+
+
+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$.
+
+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{tkzelements}
+scale = .8
+z.A = point : new ( 1 , 0 )
+z.B = point : new ( 3 , 0 )
+z.O = point : new ( 2.1, 0 )
+z.P = point : new ( 1 ,0 )
+C.AO = circle : new (z.A,z.O)
+C.BP = circle : new (z.B,z.P)
+z.E = C.AO.south
+z.H = C.AO.north
+z.F = C.BP.north
+z.G = C.BP.south
+C.IT,C.JV = midcircle_ (C.AO,C.BP)
+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{minipage}
+\begin{minipage}{.6\textwidth}
+ \begin{tkzelements}
+ scale = .8
+ z.A = point : new ( 1 , 0 )
+ z.B = point : new ( 3 , 0 )
+ z.O = point : new ( 2.1, 0 )
+ z.P = point : new ( 1 ,0 )
+ C.AO = circle : new (z.A,z.O)
+ C.BP = circle : new (z.B,z.P)
+ z.E = C.AO.south
+ z.H = C.AO.north
+ z.F = C.BP.north
+ z.G = C.BP.south
+ C.IT,C.JV = midcircle_ (C.AO,C.BP)
+ 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}
+ \begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawCircles[teal,thick](A,O B,P)
+ \tkzDrawSegments[dashed,red](E,F I,B I,G I,F)
+ \tkzDrawLines[gray](I,T J,V)
+ \tkzDrawCircles[teal,thick](A,O B,P)
+ \tkzDrawCircles[red,thick](I,X J,X)
+ \tkzDrawPoints(A,B,I,J,E,F,G,H,X,Y)
+ \tkzDrawPoints[red](I,J)
+ \begin{scope}[font = \scriptsize]
+ \tkzLabelPoints(A,I,J,G)
+ \tkzLabelPoints[below left](E)
+ \tkzLabelPoints[right](B)
+ \tkzLabelPoints[above](F,H,X)
+ \tkzLabelPoints[above right](Y)
+ \end{scope}
+ \end{tikzpicture}
+\end{minipage}
+
+
+\vfill
+
+\item One given circle is in the interior of the other given circle.
+
+\begin{minipage}{.6\textwidth}
+\begin{verbatim}
+ \begin{tkzelements}
+ scale =.75
+ z.A = point : new ( 3 , 0 )
+ z.B = point : new ( 5 , 0 )
+ z.O = point : new ( 2 , 0 )
+ z.P = point : new ( 1 , 0 )
+ L.AB = line : new (z.A,z.B)
+ C.AO = circle : new (z.A,z.O)
+ C.BP = circle : new (z.B,z.P)
+ z.R,z.S = intersection (L.AB,C.BP)
+ z.U,z.V = intersection (L.AB,C.AO)
+ C.SV = circle : diameter (z.S,z.V)
+ C.UR = circle : diameter (z.U,z.R)
+ z.x = C.SV.center
+ z.y = C.UR.center
+ C.IT = midcircle_ (C.AO,C.BP)
+ z.I,z.T = get_points ( C.IT )
+\end{tkzelements}
+\end{verbatim}
+\end{minipage}
+\begin{minipage}{.6\textwidth}
+ \begin{tkzelements}
+ scale =.75
+ z.A = point : new ( 3 , 0 )
+ z.B = point : new ( 5 , 0 )
+ z.O = point : new ( 2 , 0 )
+ z.P = point : new ( 1 , 0 )
+ L.AB = line : new (z.A,z.B)
+ C.AO = circle : new (z.A,z.O)
+ C.BP = circle : new (z.B,z.P)
+ z.R,z.S = intersection (L.AB,C.BP)
+ z.U,z.V = intersection (L.AB,C.AO)
+ C.SV = circle : diameter (z.S,z.V)
+ C.UR = circle : diameter (z.U,z.R)
+ z.x = C.SV.center
+ z.y = C.UR.center
+ C.IT = midcircle_ (C.AO,C.BP)
+ z.I,z.T = get_points ( C.IT )
+ \end{tkzelements}
+ \begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawCircles[teal,thick](A,O B,P)
+ \tkzDrawCircles[green!20!black](x,S y,R)
+ \tkzDrawPoints(A,B)
+ \tkzDrawPoints[red](I)
+ \tkzLabelPoints(A,B,I)
+ \tkzDrawCircles[red,thick](I,T)
+ \tkzLabelCircle[below](x,V)(270){$(\alpha)$}
+ \tkzLabelCircle[below](y,R)(270){$(\beta)$}
+ \tkzLabelCircle[below](I,T)(250){$\textcolor{red}{(\gamma)}$}
+ \end{tikzpicture}
+ \end{minipage}
+
+
+This case is a little more complicated. We'll construct the two circles $(\alpha)$ and $(\beta)$ tangent to the two given circles. Then we construct the radical circle orthogonal to the circles $(\alpha)$ and $(\beta)$. Its center is the radical center as well as the center of internal similtude of circles of center $A$ and $B$.
+
+\item When the two given circles are external to each other, we construct the external center of similitude of the two given circles.
+$I$ is the center of external similarity of the two given circles. To obtain the inversion circle, simply note that $H$ is such that $IH^2= IE\times IF$
+
+\begin{minipage}{.4\textwidth}
+\begin{verbatim}
+\begin{tkzelements}
+scale=.75
+local a,b,c,d
+z.A = point : new ( 0 , 0 )
+z.B = point : new ( 4 , 0 )
+z.a = point : new ( .5 , 0)
+z.b = point : new ( 1 , 0)
+C.Aa = circle : new (z.A,z.a)
+C.Bb = circle : new (z.B,z.b)
+L.AB = line : new (z.A,z.B)
+z.E = C.Aa.north
+z.F = C.Bb.north
+L.EF = line : new (z.E,z.F)
+C.IT = midcircle_ (C.Aa,C.Bb)
+z.I,z.T = get_points ( C.IT )
+L.TF = C.Bb : tangent_from (z.I)
+z.H = intersection (L.TF,C.IT)
+z.E = intersection (L.TF,C.Aa)
+z.F=L.TF.pb
+\end{tkzelements}
+\end{verbatim}
+\end{minipage}
+\begin{minipage}{.6\textwidth}
+\begin{tkzelements}
+scale=.75
+local a,b,c,d
+z.A = point : new ( 0 , 0 )
+z.B = point : new ( 4 , 0 )
+z.a = point : new ( .5 , 0)
+z.b = point : new ( 1 , 0)
+C.Aa = circle : new (z.A,z.a)
+C.Bb = circle : new (z.B,z.b)
+L.AB = line : new (z.A,z.B)
+z.E = C.Aa.north
+z.F = C.Bb.north
+L.EF = line : new (z.E,z.F)
+C.IT = midcircle_ (C.Aa,C.Bb)
+z.I,z.T = get_points ( C.IT )
+L.TF = C.Bb : tangent_from (z.I)
+z.H = intersection (L.TF,C.IT)
+z.E = intersection (L.TF,C.Aa)
+z.F=L.TF.pb
+\end{tkzelements}
+\begin{tikzpicture}
+\tkzGetNodes
+\tkzDrawCircles[teal,thick](A,a B,b)
+\tkzDrawCircles[red,thick](I,T)
+\tkzDrawSegments[gray](I,F)
+\tkzDrawPoints(A,B,E,F)
+\tkzDrawPoints[red](I,H)
+\tkzDrawLine(I,B)
+\tkzLabelPoints(A,B)
+\tkzLabelPoints[above](E,F)
+\tkzLabelPoints[above left,red](I,H)
+\end{tikzpicture}
+\end{minipage}
+
+
+\item Consider two tangent circles $(\mathcal{A})$ and $(\mathcal{B})$,
+\begin{itemize}
+
+\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{tkzelements}
+scale=.75
+local a,b,c,d
+z.A = point : new ( 0 , 0 )
+z.B = point : new ( 4 , 0 )
+z.a = point : new ( 1 , 0)
+z.b = point : new ( 1 , 0)
+C.Aa = circle : new (z.A,z.a)
+C.Bb = circle : new (z.B,z.b)
+L.AB = line : new (z.A,z.B)
+z.E = C.Aa.north
+z.F = C.Bb.north
+L.EF = line : new (z.E,z.F)
+C.IT = midcircle_ (C.Aa,C.Bb)
+z.I,z.T = get_points ( C.IT )
+L.TF = C.Bb : tangent_from (z.I)
+z.H = intersection (L.TF,C.IT)
+z.E = intersection (L.TF,C.Aa)
+z.F=L.TF.pb
+\end{tkzelements}
+\end{verbatim}
+\end{minipage}
+\begin{minipage}{.6\textwidth}
+\begin{tkzelements}
+scale=.75
+local a,b,c,d
+z.A = point : new ( 0 , 0 )
+z.B = point : new ( 4 , 0 )
+z.a = point : new ( 1 , 0)
+z.b = point : new ( 1 , 0)
+C.Aa = circle : new (z.A,z.a)
+C.Bb = circle : new (z.B,z.b)
+L.AB = line : new (z.A,z.B)
+z.E = C.Aa.north
+z.F = C.Bb.north
+L.EF = line : new (z.E,z.F)
+C.IT = midcircle_ (C.Aa,C.Bb)
+z.I,z.T = get_points ( C.IT )
+L.TF = C.Bb : tangent_from (z.I)
+z.H = intersection (L.TF,C.IT)
+z.E = intersection (L.TF,C.Aa)
+z.F=L.TF.pb
+\end{tkzelements}
+\begin{tikzpicture}
+\tkzGetNodes
+\tkzDrawCircles[teal,thick](A,a B,b)
+\tkzDrawCircles[red,thick](I,T)
+\tkzDrawSegments[gray](I,F)
+\tkzDrawPoints(A,B,E,F)
+\tkzDrawPoints[red](I,H)
+\tkzDrawLine(I,B)
+\tkzLabelPoints(A,B)
+\tkzLabelPoints[above](E,F)
+\tkzLabelPoints[above left,red](I,H)
+\end{tikzpicture}
+\end{minipage}
+
+
+\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{tkzelements}
+z.A = point : new ( 2 , 0 )
+z.B = point : new ( 4 , 0 )
+z.a = point : new ( 1 , 0)
+z.b = point : new ( 1 , 0)
+C.Aa = circle : new (z.A,z.a)
+C.Bb = circle : new (z.B,z.b)
+C.IT = midcircle_ (C.Aa,C.Bb)
+z.I,z.T = get_points ( C.IT )
+\end{tkzelements}
+\end{verbatim}
+\end{minipage}
+\begin{minipage}{.6\textwidth}
+\begin{tkzelements}
+z.A = point : new ( 2 , 0 )
+z.B = point : new ( 4 , 0 )
+z.a = point : new ( 1 , 0)
+z.b = point : new ( 1 , 0)
+C.Aa = circle : new (z.A,z.a)
+C.Bb = circle : new (z.B,z.b)
+C.IT = midcircle_ (C.Aa,C.Bb)
+z.I,z.T = get_points ( C.IT )
+\end{tkzelements}
+
+\begin{tikzpicture}
+\tkzGetNodes
+\tkzDrawCircles[teal,thick](A,a B,b)
+\tkzDrawCircles[red,thick](I,T)
+\tkzDrawPoints(A,B)
+\tkzDrawPoints[red](I)
+\tkzLabelPoints(A,B)
+\tkzLabelPoints[above left,red](I)
+\end{tikzpicture}
+\end{minipage}
+\end{itemize}
+\end{enumerate}
+
+% subsubsection midcircle (end)
% subsection methods_of_the_class_circle (end)
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 1bd4b831e4..337a36f2eb 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
@@ -397,7 +397,7 @@ z.a,z.b = L.ab.pa,L.ab.pb
\tkzGetNodes
\tkzDrawPoints(A,...,F)
\tkzLabelPoints(A,...,F)
-\tkzDrawSegments[->,red,> =latex](C,E D,F A,B) )
+\tkzDrawSegments[->,red,> =latex](C,E D,F A,B)
\end{tikzpicture}
\end{tkzexample}
\end{minipage}
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 c9b5928ff0..ef9ddbfc76 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
@@ -8,73 +8,70 @@ The class on which the whole edifice rests, it's the class \Iclass{point}. This
The creation of a point is done using the following method, but there are other possibilities. If a scaling factor has been given, the method takes it into account.
-\setbox\strutbox=\hbox{\vrule height6.8pt depth3.2pt width0pt}
\def\size{42mm}
\begin{tikzpicture}[remember picture]
- \node[ draw, fill=red!10] (tbl) {%
+\node[ draw, fill=red!10] (tbl) {%
\centering
- \begin{minipage}{\size}
- \hspace{\fill} \texttt{Arguments}\hspace{\fill}
-
- \tikz\node[minimum width=\size,font=\small,
- draw, fill=cyan!10,
- rectangle split, rectangle split parts=5
- ] {
- \texttt{re (real)\strutbox}
- \nodepart{two}\texttt{im (real)\strutbox}
- \nodepart{three}\texttt{type = 'point'\strutbox}
- \nodepart{four}\texttt{argument (rad)\strutbox}
- \nodepart{five}\texttt{modulus (cm)\strutbox}
- };
-
- \hspace{\fill} \texttt{Methods}\hspace{\fill}
-
- \tikz\node[minimum width=\size,font=\small,
- draw, fill=orange!20,sharp corners,
- rectangle split, rectangle split parts=4
- ] {
- \texttt{homothety(coeff,obj)\strutbox}
- \nodepart{two}\texttt{rotation (angle,object)\strutbox}
- \nodepart{three}\texttt{symmetry (object)\strutbox}
- \nodepart{four}\texttt{\ldots}
- };
-
- \end{minipage}
- };
+\begin{minipage}{\size}
+
+ \hspace{\fill} \texttt{Arguments}\hspace{\fill}
+
+ \tikz\node[minimum width=\size,font=\small,
+ draw, fill=cyan!10,
+ rectangle split, rectangle split parts=5
+ ] {
+ \texttt{re (real)}
+ \nodepart{two}\texttt{im (real)}
+ \nodepart{three}\texttt{type = 'point'}
+ \nodepart{four}\texttt{argument (rad)}
+ \nodepart{five}\texttt{modulus (cm)}
+ };
+
+ \hspace{\fill} \texttt{Methods}\hspace{\fill}
+
+ \tikz\node[minimum width=\size,font=\small,
+ draw, fill=orange!20,sharp corners,
+ rectangle split, rectangle split parts=4
+ ] {
+ \texttt{homothety(coeff,obj)}
+ \nodepart{two}\texttt{rotation (angle,object)}
+ \nodepart{three}\texttt{symmetry (object)}
+ \nodepart{four}\texttt{\ldots}
+ };
+\end{minipage}};
\node[ draw, fill=red!10,,minimum height = 2em,
rounded corners,anchor=south] (tc) at (tbl.north){Class |Point|};
\end{tikzpicture}
\hspace{5cm}\begin{tikzpicture}[remember picture]
\node[ draw, fill=red!10] (tbl) {%
\centering
- \begin{minipage}{\size}
- \hspace{\fill} \texttt{Arguments}\hspace{\fill}
-
- \tikz\node[minimum width=\size,font=\small,
- draw, fill=cyan!10,
- rectangle split, rectangle split parts=5
- ] {
- \texttt{re = 1\strutbox}
- \nodepart{two}\texttt{im = 2\strutbox}
- \nodepart{three}\texttt{type = 'point'\strutbox}
- \nodepart{four}\texttt{argument = atan(2)\strutbox}
- \nodepart{five}\texttt{modulus = $\sqrt{5}$\strutbox}
- };
-
- \hspace{\fill} \texttt{Methods}\hspace{\fill}
-
- \tikz\node[minimum width=\size,font=\small,
- draw, fill=orange!20,sharp corners,
- rectangle split, rectangle split parts=4
- ] {
- \texttt{homothety(coeff,obj)\strutbox}
- \nodepart{two}\texttt{rotation (angle,object)\strutbox}
- \nodepart{three}\texttt{symmetry (object)\strutbox}
- \nodepart{four}\texttt{\ldots\strutbox}
- };
-
- \end{minipage}
+\begin{minipage}{\size}
+ \hspace{\fill} \texttt{Arguments}\hspace{\fill}
+
+ \tikz\node[minimum width=\size,font=\small,
+ draw, fill=cyan!10,
+ rectangle split, rectangle split parts=5
+ ] {
+ \texttt{re = 1}
+ \nodepart{two}\texttt{im = 2}
+ \nodepart{three}\texttt{type = 'point'}
+ \nodepart{four}\texttt{argument = atan(2)}
+ \nodepart{five}\texttt{modulus = $\sqrt{5}$}
+ };
+
+ \hspace{\fill} \texttt{Methods}\hspace{\fill}
+
+ \tikz\node[minimum width=\size,font=\small,
+ draw, fill=orange!20,sharp corners,
+ rectangle split, rectangle split parts=4
+ ] {
+ \texttt{homothety(coeff,obj)}
+ \nodepart{two}\texttt{rotation (angle,object)}
+ \nodepart{three}\texttt{symmetry (object)}
+ \nodepart{four}\texttt{\ldots}
+ };
+\end{minipage}
};
\node[ draw, fill=red!10,remember picture,minimum height = 2em,
rounded corners,anchor=south] (to) at (tbl.north){object |z.A|};
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 7b051cd723..9c6e822704 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
@@ -34,8 +34,8 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp
\Iattr{triangle}{beta}& Vertex angle of the second vertex\\
\Iattr{triangle}{gamma}& Vertex angle of the third vertex\\
\Iattr{triangle}{ab}& Line defined by the first two points of the triangle\\
-\Iattr{triangle}{ac}& Line defined by the first point and the last point\\
-\Iattr{triangle}{bc}& Line defined by the last two points of the triangle\\
+\Iattr{triangle}{bc}& Line defined by the last two points \\
+\Iattr{triangle}{ca}& Line defined by the last and the first points of the triangle\\
\bottomrule %
\end{tabular}
\egroup
@@ -87,7 +87,7 @@ The triangle object is created using the \Imeth{triangle}{new} method, for examp
b = T.abc.b
c = T.abc.c
alpha = T.abc.alpha
- beta = T.abc.beta
+ beta = T.abc.beta
gamma = T.abc.gamma
\end{tkzelements}
\hspace*{\fill}
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 7a00735fd4..91923e2232 100755..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
@@ -2467,7 +2467,7 @@ z.t = intersection (L.ox,L.MaS) -- through
\tkzLabelPoints(C_1,C_2)
\tkzLabelPoints[above](T)
\tkzLabelSegment[left](C_1,T){r}
- \tkzLabelSegments[right](C_2,T){\gamma}
+ \tkzLabelSegments[right](C_2,T){$\gamma$}
\tkzLabelSegment[below](C_1,C_2){d}
\tkzLabelCircle[left=10pt](C_1,T)(180){Circle 1}
\tkzLabelCircle[right=10pt](C_2,T)(180){Circle 2}
@@ -2494,7 +2494,7 @@ z.S,z.T = get_points (C: orthogonal_from (z.C_2))
\tkzLabelPoints(C_1,C_2)
\tkzLabelPoints[above](T)
\tkzLabelSegment[left](C_1,T){r}
-\tkzLabelSegments[right](C_2,T){\gamma}
+\tkzLabelSegments[right](C_2,T){$\gamma$}
\tkzLabelSegment[below](C_1,C_2){d}
\tkzLabelCircle[left=10pt](C_1,T)(180){Circle 1}
\tkzLabelCircle[right=10pt](C_2,T)(180){Circle 2}
@@ -2507,21 +2507,20 @@ z.S,z.T = get_points (C: orthogonal_from (z.C_2))
\begin{tkzexample}[latex=0cm,small,code only]
\begin{tkzelements}
- scale = .75
- z.O = point: new (2,2)
- z.Op = point: new (-4,1)
- z.P = point: polar (4,0)
- C.OP = circle: new (z.O,z.P)
- C.Oz1,C.Oz2 = C.OP : orthogonal_from (z.Op)
- z.z1 = C.Oz1.through
- z.z2 = C.Oz2.through
- L.OP = line : new (z.O,z.P)
- C.Opz1 = circle: new (z.Op,z.z1)
- L.T,L.Tp = C.Opz1 : tangent_from (z.O)
- z.T = L.T.pb
- z.Tp = L.Tp.pb
- L.OOp = line : new (z.O,z.Op)
- z.M = L.OOp.mid
+scale = .75
+z.O = point: new (2,2)
+z.Op = point: new (-4,1)
+z.P = point: polar (4,0)
+C.OP = circle: new (z.O,z.P)
+C.Oz1 = C.OP : orthogonal_from (z.Op)
+z.z1 = C.Oz1.through
+L.OP = line : new (z.O,z.P)
+C.Opz1 = circle: new (z.Op,z.z1)
+L.T,L.Tp = C.Opz1 : tangent_from (z.O)
+z.T = L.T.pb
+z.Tp = L.Tp.pb
+L.OOp = line : new (z.O,z.Op)
+z.M = L.OOp.mid
\end{tkzelements}
\begin{tikzpicture}
\tkzGetNodes
@@ -2543,20 +2542,19 @@ z.S,z.T = get_points (C: orthogonal_from (z.C_2))
\begin{tkzelements}
scale = .75
-z.O = point: new (2,2)
-z.Op = point: new (-4,1)
-z.P = point: polar (4,0)
-C.OP = circle: new (z.O,z.P)
-C.Oz1,C.Oz2 = C.OP : orthogonal_from (z.Op)
-z.z1 = C.Oz1.through
-z.z2 = C.Oz2.through
-L.OP = line : new (z.O,z.P)
-C.Opz1 = circle: new (z.Op,z.z1)
-L.T,L.Tp = C.Opz1 : tangent_from (z.O)
-z.T = L.T.pb
-z.Tp = L.Tp.pb
-L.OOp = line : new (z.O,z.Op)
-z.M = L.OOp.mid
+z.O = point: new (2,2)
+z.Op = point: new (-4,1)
+z.P = point: polar (4,0)
+C.OP = circle: new (z.O,z.P)
+C.Oz1 = C.OP : orthogonal_from (z.Op)
+z.z1 = C.Oz1.through
+L.OP = line : new (z.O,z.P)
+C.Opz1 = circle: new (z.Op,z.z1)
+L.T,L.Tp = C.Opz1 : tangent_from (z.O)
+z.T = L.T.pb
+z.Tp = L.Tp.pb
+L.OOp = line : new (z.O,z.Op)
+z.M = L.OOp.mid
\end{tkzelements}
\hspace*{\fill}
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.pdf b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.pdf
deleted file mode 100644
index d05eb7fbb9..0000000000
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.pdf
+++ /dev/null
Binary files differ
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 101a65ed15..e36bac1aa7 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
@@ -21,10 +21,10 @@
headings = small
]{tkz-doc}
\gdef\tkznameofpack{tkz-elements}
-\gdef\tkzversionofpack{1.50c}
+\gdef\tkzversionofpack{1.60c}
\gdef\tkzdateofpack{\today}
\gdef\tkznameofdoc{tkz-elements.pdf}
-\gdef\tkzversionofdoc{1.50c}
+\gdef\tkzversionofdoc{1.60c}
\gdef\tkzdateofdoc{\today}
\gdef\tkzauthorofpack{Alain Matthes}
\gdef\tkzadressofauthor{}
@@ -97,7 +97,7 @@
\usepackage[english]{babel}
\usepackage[normalem]{ulem}
\usepackage{multirow,multido,booktabs,cellspace}
-\usepackage{shortvrb,bookmark,caption}
+\usepackage{shortvrb,bookmark,caption,enumitem}
\usepackage{makeidx}
\usepackage[most]{tcolorbox}
@@ -175,7 +175,7 @@ sharp corners
\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. \\ This version \tkzversionofpack\ is a beta version.\\
+ 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.
}
@@ -183,7 +183,8 @@ English is not my native language so there might be some errors.
\vspace*{1cm}
-\lefthand\ Acknowledgements : I received much valuable advice, remarks, corrections from \\ \tkzimp{Nicolas Kisselhoff}, \tkzimp{David Carlisle}, \tkzimp{Roberto Giacomelli} and \tkzimp{Qrrbrbirlbel}.
+\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.
\vspace*{12pt}
\lefthand\ I would also like to thank \tkzimp{Eric Weisstein}, creator of
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 900bdef5e6..b02c8cc0ba 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
@@ -130,25 +130,25 @@ When all the points necessary for the drawing are obtained, they must be transfo
\begin{tkzelements}
z.A = point: new (0 , 0)
-z.B = point: new (10 , 0) creation of two fixed points $A$ and $B$
+z.B = point: new (10 , 0) -- creation of two fixed points $A$ and $B$
L.AB = line: new ( z.A, z.B)
-z.C = L.AB: gold_ratio () use of a method linked to "line"
-z.O_0 = line: new ( z.A, z.B).mid midpoint of segment with an attribute of "line"
-z.O_1 = line: new ( z.A, z.C).mid objects are not stored and cannot be reused.
+z.C = L.AB: gold_ratio () -- use of a method linked to "line"
+z.O_0 = line: new ( z.A, z.B).mid -- midpoint of segment with an attribute of "line"
+z.O_1 = line: new ( z.A, z.C).mid -- objects are not stored and cannot be reused.
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.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 "north" 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)
+z.c = z.C : north (2) -- "north" method of a point (needs a parameter)
C.PC = circle: new ( z.P, z.C)
C.QA = circle: new ( z.Q, z.A)
-z.P_0 = intersection (C.PC,C.AB) search for intersections of two circles.
-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 attribute of "triangle"
+z.P_0 = intersection (C.PC,C.AB) -- search for intersections of two circles.
+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 attribute of "triangle"
\end{tkzelements}
\begin{tikzpicture}
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-transferts.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-transferts.tex
index 8106fbd2e8..dc177d09be 100644
--- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-transferts.tex
+++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-transferts.tex
@@ -134,12 +134,8 @@ The intersection of the two lines lies at
\tkzLabelPoints(a,...,d)
\end{tikzpicture}
\hspace{\fill}
-
-
-
% subsubsection other_transfers (end)
% subsubsection points_transfer (end)
-
% section transferts (end)
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/tkz-elements.pdf b/macros/latex/contrib/tkz/tkz-elements/doc/tkz-elements.pdf
index d05eb7fbb9..25c613e374 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 e8d633c9f6..f3dd61e9e8 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 v1.50c
+% tkz-elements.sty v1.60c
% 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
@@ -11,7 +11,7 @@
% This work has the LPPL maintenance status “maintained”.
% The Current Maintainer of this work is Alain Matthes.
-\ProvidesPackage{tkz-elements}[23/12/08 v1.50c Graphic Object Library]
+\ProvidesPackage{tkz-elements}[23/12/14 v1.60c Graphic Object Library]
\RequirePackage{luacode}
\directlua{require "tkz_elements_main"}
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 91ff4f659e..6329495465 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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
@@ -95,7 +95,7 @@ function circle: set_inversion (...)
end
function circle: midarc (z1,z2)
- local phi = 0.5 * get_angle_(self.center,z1,z2 )
+ local phi = 0.5 * get_angle (self.center,z1,z2 )
return rotation_ (self.center,phi,z1)
end
@@ -112,11 +112,11 @@ return point (self.center.re+self.radius*math.cos(phi),self.center.im+self.radiu
end
function circle: internal_similitude (C)
- return barycenter_ ({self.center,C.radius},{C.center,self.radius})
+ return internal_similitude_ (self.center,self.radius,C.center,C.radius)
end
function circle: external_similitude (C)
- return barycenter_ ({C.center,self.radius},{self.center,-C.radius})
+ return external_similitude_ (self.center,self.radius,C.center,C.radius)
end
-----------------------
-- lines --
@@ -136,13 +136,33 @@ function circle: tangent_from (pt)
t1,t2 = radical_axis_ (self.center,self.through,C.center,C.through)
return line : new (t1,t2)
end
+ -- version 1.60 new
+ function circle : external_tangent(C)
+ local i,t1,t2,k,T1,T2
+ i = barycenter_ ({C.center,self.radius},{self.center,-C.radius})
+ t1,t2 = tangent_from_ (self.center,self.through,i)
+ k = point.mod((C.center-i)/(self.center-i))
+ T1 = homothety_(i,k,t1)
+ T2 = homothety_(i,k,t2)
+ return line : new (t1,T1),line : new (t2,T2)
+ end
+ -- version 1.60 new
+ function circle : internal_tangent(C)
+ local i,t1,t2,k,T1,T2
+ i = barycenter_ ({C.center,self.radius},{self.center,C.radius})
+ t1,t2 = tangent_from_ (self.center,self.through,i)
+ k = -point.mod((C.center-i)/(self.center-i))
+ T1 = homothety_(i,k,t1)
+ T2 = homothety_(i,k,t2)
+ return line : new (t1,T1),line : new (t2,T2)
+ end
-----------------------
-- circles --
-----------------------
function circle: orthogonal_from (pt)
local t1,t2
t1,t2 = tangent_from_ (self.center,self.through,pt)
- return circle : new (pt,t1), circle : new (pt,t2)
+ return circle : new (pt,t1)
end
function circle: orthogonal_through (pta,ptb)
@@ -215,5 +235,6 @@ function circle: draw ()
local frmt = '\\draw (%0.3f,%0.3f) circle [radius=%0.3f];'
tex.sprint(string.format(frmt, x,y,r))
end
+
return circle \ No newline at end of file
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 fb15fd3b03..a79153db9e 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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 dcac24758b..ecee439aa4 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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
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 a45987d1c8..510d73e485 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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
@@ -29,10 +29,10 @@ function tangent_from_ (c,p,pt)
return intersection_cc_ (o,c,c,p)
end
-function tangent_at_ (a,b,p)
+function tangent_at_ (a,p)
return rotation_ (p,math.pi/2,a),rotation_ (p,-math.pi/2,a)
end
-
+
function orthogonal_from_ (a,b,p)
return tangent_from_ (a,b,p)
end
@@ -98,3 +98,19 @@ end
function antipode_ (c,pt)
return 2 * c - pt
end
+
+function internal_similitude_ (c1,r1,c2,r2)
+ return barycenter_ ({c2,r1},{c1,r2})
+end
+
+function external_similitude_ (c1,r1,c2,r2)
+ return barycenter_ ({c2,r1},{c1,-r2})
+end
+
+function circlepoint_ (c,t,k)
+ local phi = 2*k* math.pi
+ return rotation_ (c,phi,t)
+end
+
+
+ \ No newline at end of file
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 5c2a754352..a25e2ce78c 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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
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 98f16d499b..5d1dcd99ce 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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
@@ -129,4 +129,16 @@ end
function square_ (a,b)
return rotation_ (b,-math.pi/2,a), rotation_ (a,math.pi/2,b)
+end
+
+function in_segment_ (a,b,pt)
+ local sc,epsilon
+ epsilon = 10^(-12)
+ sc = point.mod (pt-a) + point.mod (pt-b) - point.mod(b-a)
+ if sc <= epsilon
+ then
+ return true
+ else
+ return false
+ 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 c0b3effa0b..ca948b4334 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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
@@ -76,7 +76,6 @@ function isortho (z1,z2,z3)
end
end
-
function parabola (a,b,c)
local xa,xb,xc,ya,yb,yc
xa = a.re
@@ -101,7 +100,7 @@ function real (v)
end
function get_angle (a,b,c)
- return angle_normalize(get_angle_( a,b,c ))
+ return angle_normalize_(get_angle_( a,b,c ))
end
function get_angle_( a,b,c )
@@ -109,6 +108,10 @@ function get_angle_( a,b,c )
end
function angle_normalize (a)
+return angle_normalize_ (a)
+end
+
+function angle_normalize_ (a)
local dblpi
dblpi = 2 * math.pi
if a > dblpi
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 b396194148..23ee73f0c4 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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
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 3beff723ad..70322a3d3f 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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
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 90781d961b..ab78d29cf2 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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
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 f4169506fc..2ea0c1fa84 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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
@@ -69,6 +69,17 @@ function line: in_out (pt)
end
end
+function line: in_out_segment (pt)
+ local sc,epsilon
+ epsilon = 10^(-12)
+ sc = point.mod (pt-self.pa) + point.mod (pt-self.pb) - point.mod(self.pb-self.pa)
+ if sc <= epsilon
+ then
+ return true
+ else
+ return false
+ end
+end
-------------------
-- Result -> point
-------------------
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 86239953b6..7228a3396d 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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
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 f5f74a9a41..834317aae4 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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
@@ -33,16 +33,78 @@ function set_lua_to_tex (t)
token.set_macro(v,_ENV[v],'global')
end
end
-
+-- version 1.60 center pour deux cercles ?
function radical_center (C1,C2,C3)
local t1,t2,t3,t4
- t1,t2 = radical_axis_ (C3.center,C3.through,C1.center,C1.through)
+ t1,t2 = radical_axis_ (C1.center,C1.through,C2.center,C2.through)
+ if C3 == nil then
+ return intersection_ll_ (t1,t2,C1.center,C2.center)
+ else
t3,t4 = radical_axis_ (C3.center,C3.through,C2.center,C2.through)
return intersection_ll_ (t1,t2,t3,t4)
end
-
+end
+-- version 1.60 modif case 2 circles
function radical_circle (C1,C2,C3)
local rc
+ if C3 == nil then
+ rc = radical_center (C1,C2)
+ return C1 : orthogonal_from (rc)
+ else
rc = radical_center (C1,C2,C3)
return C1 : orthogonal_from (rc)
end
+end
+-- version 1.60 new
+function circles_position(C1,C2)
+ local d,max,min
+ d = point.mod(C1.center-C2.center)
+ max = C1.radius + C2.radius
+ min = math.abs ( C1.radius - C2.radius)
+ if d > max then return "outside"
+ elseif d == max then return "outside tangent" -- epsilon
+ elseif d == min then return "inside tangent" -- epsilon
+ elseif d < min then return "inside"
+ else return "intersect"
+ end
+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,C2)
+ i = barycenter_ ({C2.center,C1.radius},{C1.center,-C2.radius})
+ j = barycenter_ ({C2.center,C1.radius},{C1.center,C2.radius})
+ t1,t2 = tangent_from_ (C1.center,C1.through,i)
+ T1,T2 = tangent_from_ (C2.center,C2.through,i)
+
+ if (state == 'outside') or (state == 'outside tangent')then
+ p = math.sqrt(point.mod(i-t1)*point.mod(i-T1))
+ return circle : radius (i,p)
+ elseif state == 'intersect' then
+ r,s = intersection (C1,C2)
+ return circle : radius (i,point.mod(r-i)) , circle : radius (j,point.mod(r-j))
+ elseif (state == 'inside') or (state == 'inside tangent') then
+ a,b = intersection_lc_ (C1.center,C2.center,C1.center,C1.through)
+ c,d = intersection_lc_ (C1.center,C2.center,C2.center,C2.through)
+
+ if C1.radius < C2.radius then
+ z.u, z.v, z.r, z.s = a, b, c, d
+ else
+ z.u, z.v, z.r, z.s = c, d, a, b
+ end
+
+ if (in_segment_ (z.s,z.v,z.u) == true)
+ then
+ Cx = circle : diameter (z.r,z.v)
+ Cy = circle : diameter (z.u,z.s)
+ else
+ Cx = circle : diameter (z.s,z.v)
+ Cy = circle : diameter (z.u,z.r)
+ end
+ if (Cx.radius) < (Cy.radius) then
+ return Cy : orthogonal_from (j)
+ else
+ return Cx : orthogonal_from (j)
+ end
+ end
+end \ No newline at end of file
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 4839dce030..4b5124ecc0 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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
@@ -24,7 +24,7 @@ function parallelogram: new (za, zb, zc,zd)
if point.abs (zj-zi) < epsilon then else error ("it's not a parallelogram")
end
local type = 'parallelogram'
- local i = midpoint_ (za,zc)
+ local center = midpoint_ (za,zc)
local ab = line : new (za,zb)
local bc = line : new (zb,zc)
local cd = line : new (zc,zd)
@@ -41,7 +41,7 @@ function parallelogram: new (za, zb, zc,zd)
da = da,
cd = cd,
bd = bd,
- i = i,
+ center = center,
type = type }
setmetatable(o, self)
self.__index = self
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 c2a12932f7..53e662541a 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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
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 011970ef53..ff144a5e5b 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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
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 7c53646978..21d227a940 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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
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 bcf899f549..d458fbe97e 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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
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 3e3724cd33..f8cc6b14df 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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
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 356b4cc76a..fb70474d22 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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
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 3ac9aa877c..17aad462ed 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 23/12/08
--- version 1.50c
+-- date 23/12/14
+-- version 1.60c
-- 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