texlive[69068] Master/texmf-dist: tkz-elements (8dec23)
commits+karl at tug.org
commits+karl at tug.org
Fri Dec 8 22:37:15 CET 2023
Revision: 69068
https://tug.org/svn/texlive?view=revision&revision=69068
Author: karl
Date: 2023-12-08 22:37:15 +0100 (Fri, 08 Dec 2023)
Log Message:
-----------
tkz-elements (8dec23)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/tkz-elements/README.md
trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-line.tex
trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-quadrilateral.tex
trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-rectangle.tex
trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-convention.tex
trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-examples.tex
trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-main.tex
trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-why.tex
trunk/Master/texmf-dist/doc/latex/tkz-elements/tkz-elements.pdf
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz-elements.sty
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_circle.lua
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_class.lua
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_ellipse.lua
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_circles.lua
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_intersections.lua
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_lines.lua
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_maths.lua
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_points.lua
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_regular.lua
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_triangles.lua
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_line.lua
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_main.lua
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_misc.lua
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_parallelogram.lua
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_point.lua
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_quadrilateral.lua
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_rectangle.lua
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_regular.lua
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_square.lua
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_triangle.lua
trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_vector.lua
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-main.pdf
Modified: trunk/Master/texmf-dist/doc/latex/tkz-elements/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tkz-elements/README.md 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/doc/latex/tkz-elements/README.md 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,10 +1,10 @@
# tkz-elements — for euclidean geometry
-Release 1.40c 2023/12/03
+Release 1.50c 2023/12/08
## Description
-`tkz-elements v.1.40c` 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.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`.
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.
@@ -58,6 +58,30 @@
Some examples will be stored on my site : [http://altermundus.fr](http://altermundus.fr).
## 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.
+
+ 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
New version for all transformations. Now, they accept all objects as parameters.
Modified: trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-line.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-line.tex 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-line.tex 2023-12-08 21:37:15 UTC (rev 69068)
@@ -154,63 +154,65 @@
\label{ssub:table_of_the_methods_from_class_line}
\vspace{1em}
-\bgroup
-\catcode`_=12
-\small
-\captionof{table}{Methods of the class line.}
-\begin{tabular}{lll}
-\toprule
-\textbf{Methods} & \textbf{Comments} & \\
-\midrule
-\Imeth{line}{new(A, B)} & |L.AB = line : new(z.A,z.B)| line through the points $A$ and $B$&\\
-\midrule
- \textbf{Points} &&\\
-\midrule
-\Imeth{line}{gold\_ratio ()} & |z.C = L.AB : gold_ratio()| & gold ratio \\
-\Imeth{line}{normalize ()} & |z.C = L.AB : normalize()| & AC =1 and $C\in (AB)$ \\
-\Imeth{line}{normalize\_inv ()} & |z.C = L.AB : normalize_inv()| & CB =1 and $C\in (AB)$ \\
-\Imeth{line}{barycenter (ka,kb)} & |z.C = L.AB : barycenter (1,2)| $C$ & barycenter of |{(A,1)(B,2)}|\\
-\Imeth{line}{point (t)} & |z.C = L.AB : point (2)| & $\overrightarrow{AC} = 2\overrightarrow{AB}$\\
-\Imeth{line}{midpoint ()} & |z.M = L.AB : midpoint ()| & better is |z.M = L.AB.mid| \\
-\Imeth{line}{harmonic\_int } & |z.D = L.AB : harmonic_int (z.C)| & $D\in [AB]$ $C\notin [AB]$\\
-\Imeth{line}{harmonic\_ext (pt)} & |z.D = L.AB : harmonic_ext (z.C)| & $D\notin [AB]$ $C\in [AB]$\\
-\Imeth{line}{harmonic\_both (k)} & |z.C,z.D = L.AB : harmonic_both (tkzphi)| & ${ {CA/CB}={DA/DB}=t\varphi.}$\\
-\Imeth{line}{square ()} & |S.AB =(L.AB : square ()) | & create a square |S.AB|.\footnote{ |_,_,z.C,z.D = get_points(S.AB)|}\\
-\midrule
- \textbf{Lines} &&\\
-\midrule
-\Imeth{line}{ll\_from ( pt )} & |L.CD = L.AB : ll_from (z.C)| & $(CD) \parallel (AB)$ \\
-\Imeth{line}{ortho\_from ( pt )} & |L.CD = L.AB : ortho_from (z.C)|& $(CD) \perp (AB)$\\
-\Imeth{line}{mediator ()}&|L.uv = L.AB : mediator ()| & $(u,v)$ mediator of $(A,B)$\\
-\midrule
- \textbf{Triangles} &&\\
-\midrule
-\Imeth{line}{equilateral (swap)} & |T.ABC = L.AB : equilateral ()| $(\overrightarrow{AB},\overrightarrow{AC})>0$ & or < with swap \\
-\Imeth{line}{isosceles (phi)} & |T.ABC = L.AB : isosceles (math.pi/6)|& \\
-\Imeth{line}{gold ()} & |T.ABC = L.AB : gold ()| & right in $B$ and $AC = \varphi \times AB $ \\
-\Imeth{line}{euclide ()} & |T.ABC = L.AB : euclide ()| & $AB=AC$ and $(\overrightarrow{AB},\overrightarrow{AC}) = math.pi/5$ \\
-\Imeth{line}{golden ()} & |T.ABC = L.AB : golden ()| & $(\overrightarrow{AB},\overrightarrow{AC}) = 2\times \pi/5$ \\
-\midrule
- \textbf{Circles} &&\\
-\midrule
-\Imeth{line}{circle ()} & |C.AB = L.AB : circle ()| & center pa through pb \\
-\Imeth{line}{circle\_swap ()} & |C.BA = L.AB : circle\_swap ()|& center pb through pa \\
-\midrule
- \textbf{Transformations} &&\\
-\midrule
-\Imeth{line}{reflection ( obj )} & |new obj = L.AB : reflection (obj|&\\
-\Imeth{line}{translation ( obj )} & |new obj = L.AB : translation (obj)|&\\
-\Imeth{line}{projection ( obj )} & |z.H = L.AB : projection (z.C)| & $CH \perp (AB)$ and $H\in (AB)$\\
-\midrule
- \textbf{Miscellaneous} &&\\
-\midrule
-\Imeth{line}{distance (pt)} & |d = L.Ab : distance (z.C)| & see \ref{ssub:example_distance_and_projection}\\
-\Imeth{line}{in\_out (pt)} & |b = L.AB : in_out (z.C)| $b$ is a boolean b=true if $C\in (AB)$ &\\
-\Imeth{line}{slope ()} & |a = L.AB : slope()| & better is L.AB.slope \\
-\bottomrule
-\end{tabular}
+\begin{minipage}{\textwidth}
+ \bgroup
+ \catcode`_=12
+ \small
+ \captionof{table}{Methods of the class line.}
+ \begin{tabular}{lll}
+ \toprule
+ \textbf{Methods} & \textbf{Comments} & \\
+ \midrule
+ \Imeth{line}{new(A, B)} & |L.AB = line : new(z.A,z.B)| line through the points $A$ and $B$&\\
+ \midrule
+ \textbf{Points} &&\\
+ \midrule
+ \Imeth{line}{gold\_ratio ()} & |z.C = L.AB : gold_ratio()| & gold ratio \\
+ \Imeth{line}{normalize ()} & |z.C = L.AB : normalize()| & AC =1 and $C\in (AB)$ \\
+ \Imeth{line}{normalize\_inv ()} & |z.C = L.AB : normalize_inv()| & CB =1 and $C\in (AB)$ \\
+ \Imeth{line}{barycenter (ka,kb)} & |z.C = L.AB : barycenter (1,2)| $C$ & barycenter of |{(A,1)(B,2)}|\\
+ \Imeth{line}{point (t)} & |z.C = L.AB : point (2)| & $\overrightarrow{AC} = 2\overrightarrow{AB}$\\
+ \Imeth{line}{midpoint ()} & |z.M = L.AB : midpoint ()| & better is |z.M = L.AB.mid| \\
+ \Imeth{line}{harmonic\_int } & |z.D = L.AB : harmonic_int (z.C)| & $D\in [AB]$ $C\notin [AB]$\\
+ \Imeth{line}{harmonic\_ext (pt)} & |z.D = L.AB : harmonic_ext (z.C)| & $D\notin [AB]$ $C\in [AB]$\\
+ \Imeth{line}{harmonic\_both (k)} & |z.C,z.D = L.AB : harmonic_both (tkzphi)| & ${ {CA/CB}={DA/DB}=t\varphi.}$\\
+ \Imeth{line}{square ()} & |S.AB =(L.AB : square ()) | & create a square |S.AB|.\footnote{ |_,_,z.C,z.D = get_points(S.AB)|}\\
+ \midrule
+ \textbf{Lines} &&\\
+ \midrule
+ \Imeth{line}{ll\_from ( pt )} & |L.CD = L.AB : ll_from (z.C)| & $(CD) \parallel (AB)$ \\
+ \Imeth{line}{ortho\_from ( pt )} & |L.CD = L.AB : ortho_from (z.C)|& $(CD) \perp (AB)$\\
+ \Imeth{line}{mediator ()}&|L.uv = L.AB : mediator ()| & $(u,v)$ mediator of $(A,B)$\\
+ \midrule
+ \textbf{Triangles}&&\\
+ \midrule
+ \Imeth{line}{equilateral (swap)} & |T.ABC = L.AB : equilateral ()| $(\overrightarrow{AB},\overrightarrow{AC})>0$ & or < with swap \footnote{Triangles are defined in the direct sense of rotation, unless the "swap" option is present.} \\
+ \Imeth{line}{isosceles (phi,swap)} & |T.ABC = L.AB : isosceles (math.pi/6)|& \\
+ \Imeth{line}{gold (swap)} & |T.ABC = L.AB : gold ()| & right in $B$ and $AC = \varphi \times AB $ \\
+ \Imeth{line}{euclide (swap)} & |T.ABC = L.AB : euclide ()| & $AB=AC$ and $(\overrightarrow{AB},\overrightarrow{AC}) = math.pi/5$ \\
+ \Imeth{line}{golden (swap)} & |T.ABC = L.AB : golden ()| & $(\overrightarrow{AB},\overrightarrow{AC}) = 2\times \pi/5$ \\
+ \midrule
+ \textbf{Circles} &&\\
+ \midrule
+ \Imeth{line}{circle ()} & |C.AB = L.AB : circle ()| & center pa through pb \\
+ \Imeth{line}{circle\_swap ()} & |C.BA = L.AB : circle\_swap ()|& center pb through pa \\
+ \midrule
+ \textbf{Transformations} &&\\
+ \midrule
+ \Imeth{line}{reflection ( obj )} & |new obj = L.AB : reflection (obj|&\\
+ \Imeth{line}{translation ( obj )} & |new obj = L.AB : translation (obj)|&\\
+ \Imeth{line}{projection ( obj )} & |z.H = L.AB : projection (z.C)| & $CH \perp (AB)$ and $H\in (AB)$\\
+ \midrule
+ \textbf{Miscellaneous} &&\\
+ \midrule
+ \Imeth{line}{distance (pt)} & |d = L.Ab : distance (z.C)| & see \ref{ssub:example_distance_and_projection}\\
+ \Imeth{line}{in\_out (pt)} & |b = L.AB: in_out(z.C)| b=true if $C\in (AB)$ &\\
+ \Imeth{line}{slope ()} & |a = L.AB : slope()| & better is L.AB.slope \\
+ \bottomrule
+ \end{tabular}
-\egroup
+ \egroup
+\end{minipage}
% subsubsection table_of_the_methods_from_class_line (end)
Here are a few examples.
Modified: trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-quadrilateral.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-quadrilateral.tex 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-quadrilateral.tex 2023-12-08 21:37:15 UTC (rev 69068)
@@ -93,7 +93,7 @@
\toprule
\textbf{Methods} & \textbf{Comments} \\
\midrule \\
-\Imeth{quadrilateral}{cyclic ()} & inscribed ? (see next example)\\
+\Imeth{quadrilateral}{iscyclic ()} & inscribed ? (see next example)\\
\bottomrule %
\end{tabular}
\egroup
@@ -110,7 +110,7 @@
T.equ = L.DB : equilateral ()
z.C = T.equ.pc
Q.new = quadrilateral : new (z.A,z.B,z.C,z.D)
-bool = Q.new : cyclic ()
+bool = Q.new : iscyclic ()
if bool == true then
C.cir = triangle : new (z.A,z.B,z.C): circum_circle ()
z.O = C.cir.center
@@ -138,7 +138,7 @@
T.equ = L.DB : equilateral ()
z.C = T.equ.pc
Q.new = quadrilateral : new (z.A,z.B,z.C,z.D)
-bool = Q.new : cyclic ()
+bool = Q.new : iscyclic ()
if bool == true then
C.cir = triangle : new (z.A,z.B,z.C): circum_circle ()
z.O = C.cir.center
Modified: trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-rectangle.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-rectangle.tex 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-classes-rectangle.tex 2023-12-08 21:37:15 UTC (rev 69068)
@@ -122,12 +122,11 @@
scale = .5
z.A = point : new ( 0 , 0 )
z.B = point : new ( 4 , 0 )
-z.C = point : new ( 4 , 3 )
-P.ABCD = rectangle : angle ( z.C , z.A , math.pi/6)
+z.I = point : new ( 4 , 3 )
+P.ABCD = rectangle : angle ( z.I , z.A , math.pi/6)
z.B = P.ABCD.pb
z.C = P.ABCD.pc
z.D = P.ABCD.pd
-z.I = P.ABCD.center
\end{tkzelements}
\begin{tikzpicture}
@@ -144,12 +143,11 @@
scale = .5
z.A = point : new ( 0 , 0 )
z.B = point : new ( 4 , 0 )
-z.C = point : new ( 4 , 3 )
-P.ABCD = rectangle : angle ( z.C , z.A , math.pi/6)
+z.I = point : new ( 4 , 3 )
+P.ABCD = rectangle : angle ( z.I , z.A , math.pi/6)
z.B = P.ABCD.pb
z.C = P.ABCD.pc
z.D = P.ABCD.pd
-z.I = P.ABCD.center
\end{tkzelements}
\begin{tikzpicture}
\tkzGetNodes
@@ -211,21 +209,22 @@
\begin{minipage}{.5\textwidth}
\begin{verbatim}
\begin{tkzelements}
-z.E = point : new ( 0 , 0 )
-z.G = point : new ( 4 , 3 )
-R.diag = rectangle : diagonal (z.E,z.G)
-z.F = R.diag.pb
-z.H = R.diag.pd
-z.I = R.diag.center
+z.A = point : new ( 0 , 0 )
+z.C = point : new ( 4 , 3 )
+R.diag = rectangle : diagonal (z.A,z.C)
+z.B = R.diag.pb
+z.D = R.diag.pd
+z.I = R.diag.center
\end{tkzelements}
\begin{tikzpicture}
\tkzGetNodes
-\tkzDrawPolygon(E,F,G,H)
-\tkzDrawPoints(E,F,G,H)
-\tkzLabelPoints((E,F)
-\tkzLabelPoints[above](G,H)
+\tkzDrawPolygon(A,B,C,D)
+\tkzDrawPoints(A,B,C,D)
+\tkzLabelPoints(A,B)
+\tkzLabelPoints[above](C,D)
\tkzDrawPoints[red](I)
+\tkzLabelSegment[sloped,above](A,B){|rectangle : diagonal (z.A,z.C)|}
\end{tikzpicture}
\end{verbatim}
\end{minipage}
@@ -266,11 +265,12 @@
\begin{tikzpicture}
\tkzGetNodes
-\tkzDrawPolygon(A,B,C,D)
-\tkzDrawPoints(A,B,C,D)
-\tkzLabelPoints(A,B)
-\tkzLabelPoints[above](C,D)
+\tkzDrawPolygon(X,Y,Z,W)
+\tkzDrawPoints(X,Y,Z,W)
+\tkzLabelPoints(X,Y)
+\tkzLabelPoints[above](Z,W)
\tkzDrawPoints[red](I)
+\tkzLabelSegment[sloped,above](X,Y){|rectangle : gold (z.X,z.Y)|}
\end{tikzpicture}
\end{verbatim}
\end{minipage}
Modified: trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-convention.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-convention.tex 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-convention.tex 2023-12-08 21:37:15 UTC (rev 69068)
@@ -16,7 +16,7 @@
and outside the environment \tkzNameEnv{tkzelements} you can use the macro
\begin{mybox}
- |\fthenelse{\equal{\tkzUseLua{bool}}{true}}{ ... }{ ... }|
+ |\ifthenelse{\equal{\tkzUseLua{bool}}{true}}{ ... }{ ... }|
\end{mybox}
after loading the \tkzNamePack{ifthen} package.
Modified: trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-examples.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-examples.tex 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-examples.tex 2023-12-08 21:37:15 UTC (rev 69068)
@@ -804,39 +804,41 @@
\subsection{Director circle} % (fold)
\label{sub:director_circle}
-
-\begin{tkzexample}[latex=0cm,small,code only]
+% modif C: point (0.25) instead of 2
+\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
+ \begin{verbatim}
+ \begin{tkzelements}
+ scale = .5
+ z.O = point: new (0 , 0)
+ z.F1 = point: new (4 , 0)
+ z.F2 = point: new (-4 , 0)
+ z.H = point: new (4*math.sqrt(2) , 0)
+ E = ellipse: foci (z.F2,z.F1,z.H)
+ a,b = E.Rx, E.Ry
+ z.A = E.covertex
+ T = triangle: new (z.H,z.O,z.A)
+ z.P = T: parallelogram ()
+ C = circle: new (z.O,z.P)
+ z.L = C: point (0.25)
+ L.J,L.K = E: tangent_from (z.L)
+ z.J = L.J.pb
+ z.K = L.K.pb
+ \end{tkzelements}
+ \begin{tikzpicture}
+ \tkzGetNodes
+ \tkzDrawPoints(F1,F2,O)
+ \tkzDrawCircles[teal](O,P)
+ \tkzDrawPolygon(H,O,A,P)
+ \tkzDrawEllipse[red](O,\tkzUseLua{a},\tkzUseLua{b},0)
+ \tkzDrawSegments[orange](O,P O,L L,J L,K)
+ \tkzDrawPoints(F1,F2,O,H,A,P,L,J,K)
+ \tkzLabelPoints(F1,F2,O,H,A,P,L,J,K)
+ \tkzMarkRightAngles(A,P,H J,L,K)
+ \end{tikzpicture}
+ \end{verbatim}
+\end{minipage}
+\begin{minipage}[t]{.5\textwidth}\vspace{0pt}%
\begin{tkzelements}
-scale = .5
-z.O = point: new (0 , 0)
-z.F1 = point: new (4 , 0)
-z.F2 = point: new (-4 , 0)
-z.H = point: new (4*math.sqrt(2) , 0)
-E = ellipse: foci (z.F2,z.F1,z.H)
-a,b = E.Rx, E.Ry
-z.A = E.covertex
-T = triangle: new (z.H,z.O,z.A)
-z.P = T: parallelogram ()
-C = circle: new (z.O,z.P)
-z.L = C: point (2)
-L.J,L.K = E: tangent_from (z.L)
-z.J = L.J.pb
-z.K = L.K.pb
-\end{tkzelements}
- \begin{tikzpicture}
- \tkzGetNodes
- \tkzDrawPoints(F1,F2,O)
-\tkzDrawCircles[teal](O,P)
-\tkzDrawPolygon(H,O,A,P)
-\tkzDrawEllipse[red](O,\tkzUseLua{a},\tkzUseLua{b},0)
-\tkzDrawSegments[orange](O,P O,L L,J L,K)
-\tkzDrawPoints(F1,F2,O,H,A,P,L,J,K)
-\tkzLabelPoints(F1,F2,O,H,A,P,L,J,K)
-\tkzMarkRightAngles(A,P,H J,L,K)
-\end{tikzpicture}
-\end{tkzexample}
-
-\begin{tkzelements}
scale = .5
z.O = point: new (0 , 0)
z.F1 = point: new (4 , 0)
@@ -848,13 +850,12 @@
T = triangle: new (z.H,z.O,z.A)
z.P = T: parallelogram ()
C = circle: new (z.O,z.P)
-z.L = C: point (2)
+z.L = C: point (0.25)
L.J,L.K = E: tangent_from (z.L)
z.J = L.J.pb
z.K = L.K.pb
\end{tkzelements}
-
\hspace*{\fill}
\begin{tikzpicture}
\tkzGetNodes
@@ -867,7 +868,7 @@
\tkzLabelPoints(F1,F2,O,H,A,P,L,J,K)
\tkzMarkRightAngles(A,P,H J,L,K)
\end{tikzpicture}
-\hspace*{\fill}
+\end{minipage}
% subsection director_circle (end)
Added: trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-main.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-main.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-main.pdf 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-main.pdf 2023-12-08 21:37:15 UTC (rev 69068)
Property changes on: trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-main.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-main.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-main.tex 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-main.tex 2023-12-08 21:37:15 UTC (rev 69068)
@@ -21,10 +21,10 @@
headings = small
]{tkz-doc}
\gdef\tkznameofpack{tkz-elements}
-\gdef\tkzversionofpack{1.40c}
+\gdef\tkzversionofpack{1.50c}
\gdef\tkzdateofpack{\today}
\gdef\tkznameofdoc{tkz-elements.pdf}
-\gdef\tkzversionofdoc{1.40c}
+\gdef\tkzversionofdoc{1.50c}
\gdef\tkzdateofdoc{\today}
\gdef\tkzauthorofpack{Alain Matthes}
\gdef\tkzadressofauthor{}
@@ -88,8 +88,10 @@
\newfontfamily\ttcondensed{lmmonoltcond10-regular.otf}
%% (La)TeX font-related declarations:
\linespread{1.05} % Pagella needs more space between lines
-\usepackage[math-style=literal,bold-style=literal]{unicode-math}
+%\usepackage[math-style=literal,bold-style=literal]{unicode-math}
+\usepackage{unicode-math}
\usepackage{fourier-otf}
+\setmathfont{Concrete-Math.otf}
\let\rmfamily\ttfamily
\usepackage{multicol,lscape,wrapfig}
\usepackage[english]{babel}
Modified: trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-why.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-why.tex 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/doc/latex/tkz-elements/TKZdoc-elements-why.tex 2023-12-08 21:37:15 UTC (rev 69068)
@@ -158,7 +158,7 @@
\vspace{1em}
\begin{tkzelements}
- scale = .35
+ scale = .4
z.A = point: new (0,0)
z.B = point: new (6,0)
z.C = point: new (0.8,4)
@@ -198,10 +198,6 @@
\end{minipage}
% subsubsection example_apollonius_circle (end)
-
% subsubsection using_objects (end)
-
% subsection calculation_accuracy (end)
-
-
% section why_tkz_elements (end)
\ No newline at end of file
Modified: trunk/Master/texmf-dist/doc/latex/tkz-elements/tkz-elements.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz-elements.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz-elements.sty 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz-elements.sty 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,5 +1,5 @@
% encoding : utf8
-% tkz-elements.sty v1.40c
+% tkz-elements.sty v1.50c
% 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/03 v1.40c Graphic Object Library]
+\ProvidesPackage{tkz-elements}[23/12/08 v1.50c Graphic Object Library]
\RequirePackage{luacode}
\directlua{require "tkz_elements_main"}
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_circle.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_circle.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_circle.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements-circles.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
@@ -39,6 +39,11 @@
function circle: radius (center, radius) -- c --> center r --> radius
return circle : new (center, center + point( radius, 0 ) )
end
+
+function circle: diameter (za, zb)
+ local c = midpoint_(za,zb)
+ return circle : new (c, zb )
+end
-----------------------
-- boolean --
-----------------------
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_class.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_class.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_class.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements_class.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_ellipse.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_ellipse.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_ellipse.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements-ellipses.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_circles.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_circles.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_circles.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements_functions_circles.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_intersections.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_intersections.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_intersections.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements_intersections.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_lines.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_lines.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_lines.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements_functions_lines.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_maths.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_maths.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_maths.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements_functions_maths.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
@@ -124,3 +124,10 @@
function barycenter (...)
return barycenter_ (...)
end
+
+function swap(a,b)
+ local t=a
+ a=b
+ b=t
+ return a,b
+end
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_points.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_points.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_points.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements_functions_points.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_regular.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_regular.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_regular.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements_functions_regular.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_triangles.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_triangles.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_functions_triangles.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements_functions_triangles.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
@@ -143,9 +143,9 @@
kb = point.abs (c-a)
o = barycenter_ ( {a,ka} , {b,kb} , {c,kc} )
return o ,
- projection_ (a,b,o) ,
projection_ (b,c,o) ,
- projection_ (c,a,o)
+ projection_ (a,c,o) ,
+ projection_ (a,b,o)
end
function ex_circle_ ( a,b,c )
@@ -196,7 +196,7 @@
function incentral_tr_ (a,b,c)
local i,r,s,t
- i = in_center (a , b , c)
+ i = in_center_ (a , b , c)
r = intersection_ll_ ( a,i , b,c)
s = intersection_ll_ ( b,i , a,c)
t = intersection_ll_ ( c,i , a,b)
@@ -311,4 +311,24 @@
else
return false
end
-end
\ No newline at end of file
+end
+
+function soddy_center_ (a,b,c)
+ local i,ha,hb,hc,e,f,g,x,y,z,xp,yp,zp
+ i,e,f,g = in_circle_ (a,b,c)
+ ha,hb,hc = orthic_tr_ (a,b,c)
+ x,xp = intersection_lc_ (a,ha,a,g)
+ if (point.mod(ha-x)<point.mod(ha-xp)) then else x,xp=swap(x,xp) end
+ y,yp = intersection_lc_ (b,hb,b,e)
+ if (point.mod(hb-y)<point.mod(hb-yp)) then else y,yp=swap(y,yp) end
+ z,zp = intersection_lc_ (c,hc,c,f)
+ if (point.mod(hc-z)<point.mod(hc-zp)) then else z,zp=swap(z,zp) end
+ xi,t = intersection_lc_ (xp,e,a,g)
+ if in_out_ (a,b,c,xi) then else xi,t = swap(xi,t) end
+ yi,t = intersection_lc_ (yp,f,b,e)
+ if in_out_ (a,b,c,yi) then else yi,t = swap(yi,t) end
+ zi,t = intersection_lc_ (zp,g,c,f)
+ if in_out_ (a,b,c,zi) then else zi,t = swap(zi,t) end
+ s = circum_center_ (xi,yi,zi)
+ return s,xi,yi,zi
+end
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_line.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_line.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_line.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements_lines.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
@@ -286,34 +286,83 @@
end
-function line: isosceles (phi)
- local pta,ptb
+function line: isosceles (phi,swap)
+ local pta,ptb
+ if swap == nil then
+ swap = false
+ end
+ if swap then
+ pta = rotation_ (self.pa,-phi,self.pb)
+ ptb = rotation_ (self.pb,phi,self.pa)
+ return triangle : new (self.pa,self.pb, intersection_ll_ (self.pa,pta,self.pb,ptb ))
+ else
pta = rotation_ (self.pa,phi,self.pb)
ptb = rotation_ (self.pb,-phi,self.pa)
return triangle : new (self.pa,self.pb, intersection_ll_ (self.pa,pta,self.pb,ptb ))
+end
end
-function line: gold ()
+function line: gold (swap)
local pt
+ if swap == nil then
+ swap = false
+ end
+if swap then
+ pt = rotation_ (self.pa,-math.pi/2,self.pb)
+ return triangle : new (self.pa,self.pb, self.pa + (pt-self.pa) * tkzinvphi)
+else
pt = rotation_ (self.pa,math.pi/2,self.pb)
return triangle : new (self.pa,self.pb, self.pa + (pt-self.pa) * tkzinvphi)
end
+end
-function line: euclide ()
+function line: euclide (swap)
+ if swap == nil then
+ swap = false
+ end
+if swap then
+ return triangle : new (self.pa,self.pb, rotation_ (self.pa,-math.pi/5,self.pb))
+else
return triangle : new (self.pa,self.pb, rotation_ (self.pa,math.pi/5,self.pb))
end
+ end
-function line: golden ()
+function line: golden (swap)
local pt
+ local pta,ptb
+ if swap == nil then
+ swap = false
+ end
+if swap then
+ pt = rotation_ (self.pa,-2*math.pi/5,self.pb)
+ return triangle : new (self.pa,self.pb, self.pa + (pt-self.pa) * tkzphi)
+else
pt = rotation_ (self.pa,2*math.pi/5,self.pb)
return triangle : new (self.pa,self.pb, self.pa + (pt-self.pa) * tkzphi)
+ end
end
------------------------------
-- Result -> couple of points
------------------------------
-function line: square ()
- return square : side (self.pa,self.pb)
+function line: square (swap)
+ if swap == nil
+ then
+ return square : side (self.pa,self.pb)
+ else
+ return square : side (self.pa,self.pb,indirect)
+ 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
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_main.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_main.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_main.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements-main.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
@@ -37,6 +37,8 @@
require "tkz_elements_quadrilateral.lua"
require "tkz_elements_rectangle.lua"
require "tkz_elements_square.lua"
+require "tkz_elements_misc.lua"
+require "tkz_elements_vector.lua"
require "tkz_elements_functions_maths.lua"
require "tkz_elements_functions_intersections.lua"
@@ -45,4 +47,3 @@
require "tkz_elements_functions_circles.lua"
require "tkz_elements_functions_triangles.lua"
require "tkz_elements_functions_regular.lua"
-require "tkz_elements_misc.lua"
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_misc.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_misc.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_misc.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements_functions_maths.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_parallelogram.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_parallelogram.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_parallelogram.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements_parallelogram.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_point.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_point.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_point.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements_point.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_quadrilateral.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_quadrilateral.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_quadrilateral.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements_quadrilateral.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
@@ -49,7 +49,7 @@
return o
end
-----------------------
-function quadrilateral : cyclic ()
+function quadrilateral : iscyclic ()
local d,epsilon
epsilon = 10^(-8)
local alpha = point.arg ((self.pd-self.pa) / (self.pb-self.pa))
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_rectangle.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_rectangle.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_rectangle.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements-rectangle.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
@@ -59,6 +59,7 @@
end
function rectangle : angle (zi,za,an)
+ local zb,zc,zd
local zc = symmetry_ (zi,za)
local zb = rotation_(zi,-an,zc)
local zd = symmetry_ (zi,zb)
@@ -65,30 +66,58 @@
return rectangle : new (za,zb,zc,zd)
end
-function rectangle : gold (za,zb)
- a = point.arg (zb-za)
- local d = point.abs(zb-za)/tkzphi
- local zc = zb : north (d/scale)
- zc = rotation_ (zb,a,zc)
- local zd = za : north (d/scale)
- zd = rotation_ (za,a,zd)
- return rectangle : new (za,zb,zc,zd)
+function rectangle : gold (za,zb,swap)
+ local zc,zd
+ local a = point.arg (zb-za)
+ local d = point.abs(zb-za)/tkzphi
+ if swap == nil then swap = false end
+ if swap then
+ zc = zb : south (d/scale)
+ zc = rotation_ (zb,a,zc)
+ zd = za : south (d/scale)
+ zd = rotation_ (za,a,zd)
+ return rectangle : new (za,zb,zc,zd)
+ else
+ zc = zb : north (d/scale)
+ zc = rotation_ (zb,a,zc)
+ zd = za : north (d/scale)
+ zd = rotation_ (za,a,zd)
+ return rectangle : new (za,zb,zc,zd)
+ end
end
-function rectangle : diagonal (za,zc)
- local zb = point (zc.re,za.im)
- local zd = point (za.re,zc.im)
+function rectangle : diagonal (za,zc,swap)
+ local zb,zd
+ if swap == nil then swap = false end
+ if swap then
+ zd = point (zc.re,za.im)
+ zb = point (za.re,zc.im)
+ return rectangle : new (za,zb,zc,zd)
+ else
+ zb = point (zc.re,za.im)
+ zd = point (za.re,zc.im)
return rectangle : new (za,zb,zc,zd)
end
+end
-function rectangle : side (za,zb,d)
- a = point.arg (zb-za)
- local zc = zb : north (d/scale)
- zc = rotation_ (zb,a,zc)
- local zd = za : north (d/scale)
- zd = rotation_ (za,a,zd)
+function rectangle : side (za,zb,d,swap)
+ local a,zc,zd
+ a = point.arg (zb-za)
+ if swap == nil then swap = false end
+ if swap then
+ zc = zb : south (d/scale)
+ zc = rotation_ (zb,a,zc)
+ zd = za : south (d/scale)
+ zd = rotation_ (za,a,zd)
+ return rectangle : new (za,zb,zc,zd)
+ else
+ zc = zb : north (d/scale)
+ zc = rotation_ (zb,a,zc)
+ zd = za : north (d/scale)
+ zd = rotation_ (za,a,zd)
return rectangle : new (za,zb,zc,zd)
end
+end
-------------------
function rectangle : get_lengths ()
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_regular.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_regular.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_regular.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements_regular.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_square.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_square.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_square.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements-square.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
@@ -72,10 +72,17 @@
return square : new (za,zb,zc,zd)
end
-function square : side (za,zb)
- local zc = rotation_ (zb,-math.pi/2,za)
- local zd = rotation_ (za,math.pi/2,zb)
- return square : new (za,zb,zc,zd)
+function square : side (za,zb,swap)
+ if swap == nil
+ then
+ local zc = rotation_ (zb,-math.pi/2,za)
+ local zd = rotation_ (za,math.pi/2,zb)
+ return square : new (za,zb,zc,zd)
+ else
+ local zc = rotation_ (zb,math.pi/2,za)
+ local zd = rotation_ (za,-math.pi/2,zb)
+ return square : new (za,zb,zc,zd)
+ end
end
return square
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_triangle.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_triangle.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_triangle.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements_triangles.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
@@ -396,6 +396,15 @@
function triangle: check_equilateral ()
return check_equilateral_ (self.pa,self.pb,self.pc)
end
+function triangle : soddy_center ()
+ local s,i,j,k
+ return soddy_center_ (self.pa,self.pb,self.pc)
+end
+function triangle : soddy_circle ()
+ local s,i
+ s,i = soddy_center_ (self.pa,self.pb,self.pc)
+ return circle : new ( s , i )
+end
return triangle
\ No newline at end of file
Modified: trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_vector.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_vector.lua 2023-12-08 21:36:31 UTC (rev 69067)
+++ trunk/Master/texmf-dist/tex/latex/tkz-elements/tkz_elements_vector.lua 2023-12-08 21:37:15 UTC (rev 69068)
@@ -1,6 +1,6 @@
-- tkz_elements_vectors.lua
--- date 23/12/03
--- version 1.40c
+-- date 23/12/08
+-- version 1.50c
-- 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
@@ -15,12 +15,14 @@
-- ----------------------------------------------------------------------------
vector = {}
function vector: new(z1, z2)
- local type = 'vector'
- local norm = point.abs(z2-z1)
+ local type = 'vector'
+ local norm = point.abs (z2-z1)
+ local arg = point.arg (z2-z1)
local o = {st = z1,
- ed = z2,
- norm = norm,
- type = type }
+ ed = z2,
+ norm = norm,
+ arg = arg,
+ type = type }
setmetatable(o, self)
self.__index = self
return o
@@ -36,4 +38,9 @@
function vector: add (v)
return vector :new (self.st+v.st, self.ed,v.ed)
end
+
+ function vector: ortho ()
+ return vector : new (self.st, rotation_(self.st,math.pi/2,self.ed))
+ end
+
return vector
More information about the tex-live-commits
mailing list.