summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-elements/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-11-11 03:03:26 +0000
committerNorbert Preining <norbert@preining.info>2023-11-11 03:03:26 +0000
commite4ccc7921b6518e670428990524161b3ddbfebd2 (patch)
treecc5e3d265c59f5f5031b2b085a4621d13f0b1af6 /macros/latex/contrib/tkz/tkz-elements/latex
parentd8b5161942976a522cdb1a7b580fe3886eea6bc6 (diff)
CTAN sync 202311110303
Diffstat (limited to 'macros/latex/contrib/tkz/tkz-elements/latex')
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz-elements.sty19
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_circles.lua169
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_ellipses.lua4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_circles.lua35
-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.lua7
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_maths.lua8
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_points.lua10
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_triangles.lua6
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_lines.lua81
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_main.lua6
-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_points.lua4
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_triangles.lua9
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_vectors.lua4
15 files changed, 239 insertions, 131 deletions
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 a147a045aa..80a39af083 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 v1.00b
+% tkz-elements v1.20b
% 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,13 +11,18 @@
% This work has the LPPL maintenance status “maintained”.
% The Current Maintainer of this work is Alain Matthes.
-\ProvidesPackage{tkz-elements}[2023/10/20 v1.00b Graphic Object Library]
+\ProvidesPackage{tkz-elements}[2023/11/10 v1.20b Graphic Object Library]
\RequirePackage{luacode}
\RequirePackage{filecontents}
\directlua{require "tkz_elements_main"}
\newenvironment{tkzelements}
- {\directlua{scale=1}
+ { \directlua{scale=1}
+ \directlua{for k,v in pairs(z) do z[k] = nil end}
+ \directlua{for k,v in pairs(L) do L[k] = nil end}
+ \directlua{for k,v in pairs(C) do C[k] = nil end}
+ \directlua{for k,v in pairs(T) do T[k] = nil end}
+ \directlua{for k,v in pairs(E) do E[k] = nil end}
\luacode}
{\endluacode}
\def\tkzGetNodes{\directlua{%
@@ -32,4 +37,12 @@
tex.print("\\coordinate ("..K..") at ("..V.re..","..V.im..") ;\\\\")
end}
}
+\def\tkzEraseTables{
+ \directlua{for k,v in pairs(z) do z[k] = nil end}
+ \directlua{for k,v in pairs(L) do L[k] = nil end}
+ \directlua{for k,v in pairs(C) do C[k] = nil end}
+ \directlua{for k,v in pairs(T) do T[k] = nil end}
+ \directlua{for k,v in pairs(E) do E[k] = nil end}
+}
+\def\tkzUseLua#1{\directlua{tex.print(tostring(#1))}}
\endinput
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_circles.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_circles.lua
index 52da83fc25..7af14e473c 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_circles.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_circles.lua
@@ -1,6 +1,6 @@
-- tkz_elements-circles.lua
--- date 2023/10/20
--- version 1.00b
+-- date 2023/11/10
+-- version 1.20b
-- 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
@@ -27,18 +27,29 @@ function circle: new (c, t) -- c --> center t --> through
setmetatable(new_circle, {__index = circle})
return new_circle
end
+-- other definition
-function circle: antipode (pt)
- return 2 * self.center - pt
+function circle: radius (center, radius) -- c --> center r --> radius
+ local through
+ through = center + point( radius, 0 )
+ return circle : new (center, through )
end
-
-function circle: power (pt)
- local d
- d = point.abs (self.center - pt)
- return d * d - self.radius * self.radius
+-----------------------
+-- boolean --
+-----------------------
+function circle: in_out (pt)
+ local d,epsilon
+ epsilon = 10^(-12)
+ d = point.abs (pt - self.center)
+ if math.abs(d-self.radius) < epsilon
+ then
+ return true
+ else
+ return false
+ end
end
-function circle: in_out (pt)
+function circle: in_out_disk (pt)
local d
d = point.abs (pt - self.center)
if d <= self.radius
@@ -48,22 +59,78 @@ function circle: in_out (pt)
return false
end
end
+-----------------------
+-- real --
+-----------------------
--- function circle: tangent_at (pt)
--- return tangent_at_ (self.center,self.through,pt)
--- end
+function circle: power (pt)
+ local d
+ d = point.abs (self.center - pt)
+ return d * d - self.radius * self.radius
+end
+-----------------------
+-- points --
+-----------------------
+function circle: antipode (pt)
+ return 2 * self.center - pt
+end
+
+function circle: set_inversion (...)
+ local tp = table.pack(...)
+ local i
+ local t = {}
+ for i=1,tp.n do
+ table.insert( t , inversion_ ( self.center,self.through, tp[i] ) )
+ end
+ return table.unpack ( t )
+end
+
+function circle: midarc (z1,z2)
+ local phi = 0.5 * get_angle_(self.center,z1,z2 )
+ return rotation_ (self.center,phi,z1)
+end
+
+function circle: point (phi)
+ return point (self.center.re+self.radius*math.cos(phi),self.center.im+self.radius*math.sin(phi) )
+end
+function circle: random_pt(lower, upper)
+local t
+ math.randomseed( tonumber(tostring(os.time()):reverse():sub(1,6)) )
+ phi = lower + math.random() * (upper - lower)
+return point (self.center.re+self.radius*math.cos(phi),self.center.im+self.radius*math.sin(phi) )
+end
+
+function circle: internal_similitude (C)
+ return barycenter_ ({self.center,C.radius},{C.center,self.radius})
+end
+
+function circle: external_similitude (C)
+ return barycenter_ ({C.center,self.radius},{self.center,-C.radius})
+end
+
+
+-----------------------
+-- lines --
+-----------------------
function circle: tangent_at (pt)
return line : new ( rotation_ (pt,math.pi/2,self.center),rotation_ (pt,-math.pi/2,self.center))
end
-
function circle: tangent_from (pt)
local t1,t2
t1,t2 = tangent_from_ (self.center,self.through,pt)
return line :new (pt,t1),line : new (pt,t2)
end
-
+
+ function circle: radical_axis (C)
+ local t1,t2
+ t1,t2 = radical_axis_ (self.center,self.through,C.center,C.through)
+ return line : new (t1,t2)
+ end
+ -----------------------
+ -- circles --
+ -----------------------
function circle: orthogonal_from (pt)
local t1,t2
t1,t2 = tangent_from_ (self.center,self.through,pt)
@@ -73,50 +140,44 @@ end
function circle: orthogonal_through (pta,ptb)
return circle : new (orthogonal_through_ (self.center,self.through,pta,ptb),pta)
end
-
- function circle: inversion (pt)
- return inversion_ (self.center,self.through,pt)
- end
- function circle: set_inversion (...)
- local tp = table.pack(...)
- local i
- local t = {}
- for i=1,tp.n do
- table.insert( t , inversion_ ( self.center,self.through, tp[i] ) )
- end
- return table.unpack ( t )
- end
-
- function circle: midarc (z1,z2)
- local phi = 0.5 * get_angle_(self.center,z1,z2 )
- return rotation_ (self.center,phi,z1)
+ function circle: inversion_L (L)
+ local p,q
+ if L: in_out (self.center) then
+ return L
+ else
+ p = L: projection (self.center)
+ q = inversion_ (self.center,self.through,p)
+ return circle: new (midpoint_(self.center,q),q)
+ end
end
-
- function circle: point (phi)
- return point (self.center.re+self.radius*math.cos(phi),self.center.im+self.radius*math.sin(phi) )
+
+ function circle: inversion_C (C)
+ local p,q,x,y
+ if C: in_out (self.center) then
+ p = C : antipode (self.center)
+ q = inversion_ (self.center,self.through,p)
+ x = ortho_from_ ( q , self.center , p )
+ y = ortho_from_ ( q , p, self.center)
+ return line : new (x,y)
+ else
+ x,y = intersection_lc_ (self.center,C.center,C.center,C.through)
+ X = inversion_ (self.center,self.through,x)
+ Y = inversion_ (self.center,self.through,y)
+ return circle : new (midpoint_(X,Y),X)
+ end
end
-function circle: random_pt(lower, upper)
-local t
- math.randomseed( tonumber(tostring(os.time()):reverse():sub(1,6)) )
- phi = lower + math.random() * (upper - lower)
-return point (self.center.re+self.radius*math.cos(phi),self.center.im+self.radius*math.sin(phi) )
-end
-
-function circle: radical_axis (C)
- local t1,t2
- t1,t2 = radical_axis_ (self.center,self.through,C.center,C.through)
-return line : new (t1,t2)
-end
-
-function circle: internal_similitude (C)
- return barycenter_ ({self.center,C.radius},{C.center,self.radius})
-end
-
-function circle: external_similitude (C)
- return barycenter_ ({C.center,self.radius},{self.center,-C.radius})
+ function circle: inversion (obj)
+ if obj.type == "point" then
+ return inversion_ (self.center,self.through,obj)
+ elseif obj.type == "line" then
+ return self: inversion_L (obj)
+else
+ return self: inversion_C (obj)
end
+ end
+
function circle: draw ()
local x,y
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_ellipses.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_ellipses.lua
index 0e15d5ab86..4bc34c61b7 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_ellipses.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_ellipses.lua
@@ -1,6 +1,6 @@
-- tkz_elements-ellipses.lua
--- date 2023/10/20
--- version 1.00b
+-- date 2023/11/10
+-- version 1.20b
-- 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 e1d6b4bd53..fe9c91d2f7 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 2023/10/20
--- version 1.00b
+-- date 2023/11/10
+-- version 1.20b
-- 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
@@ -14,23 +14,28 @@
-- define a circle by the center and a radius
-function circle_cr ( c, r )
- return c + point(r,0)
-end
+-- function circle_cr ( c, r )
+-- return c + point(r,0)
+-- end
function midarc_ (o,a,b) -- a -> b
local phi = 0.5 * get_angle_ ( a,o,b )
return rotation_ (o,phi,b)
end
----------------------------------------------------------------------------
--- -- possible (C,p) with C.center and C.through
--- function tangent_from (c,p)
--- local m = midpoint_ (c.center,p)
--- return intersection_cc_ (c.center,c.through,m,p)
--- end
----------------------------------------------------------------------------
--- tangente à un cercle
----------------------------------------------------------------------------
+
+function radical_center (C1,C2,C3)
+ local t1,t2,t3,t4
+ t1,t2 = radical_axis_ (C3.center,C3.through,C1.center,C1.through)
+ t3,t4 = radical_axis_ (C3.center,C3.through,C2.center,C2.through)
+return intersection_ll_ (t1,t2,t3,t4)
+end
+
+function radical_circle (C1,C2,C3)
+ local rc
+ rc = radical_center (C1,C2,C3)
+ return C1 : orthogonal_from (rc)
+end
+
function tangent_from_ (c,p,pt)
local o
o = midpoint_ ( c,pt )
@@ -38,7 +43,7 @@ function tangent_from_ (c,p,pt)
end
function tangent_at_ (a,b,p)
- return rotation_ (p,math.pi/2,a),rotation_ (p,-math.pi/2,a)
+ return rotation_ (p,math.pi/2,a),rotation_ (p,-math.pi/2,a)
end
function orthogonal_from_ (a,b,p)
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 8c5123129d..f52c4bc2b1 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 2023/10/20
--- version 1.00b
+-- date 2023/11/10
+-- version 1.20b
-- 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 87ea1de043..c78004be6a 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 2023/10/20
--- version 1.00b
+-- date 2023/11/10
+-- version 1.20b
-- 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,6 +15,9 @@
---------------------------------------------------------------------------
-- Lines
---------------------------------------------------------------------------
+function normalize_ (a,b)
+ return a+(b-a)/point.mod(b-a)
+end
function ortho_from_ ( p , a , b )
return p+(b-a)*point(0,1)
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 866912468a..f38458e1f1 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 2023/10/20
--- version 1.00b
+-- date 2023/11/10
+-- version 1.20b
-- 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
@@ -101,6 +101,10 @@ function value (v)
return scale * v
end
+function real (v)
+ return v/scale
+end
+
function get_angle (a,b,c)
return angle_normalize(get_angle_( a,b,c ))
end
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 fcd249d891..ea468a9c6d 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 2023/10/20
--- version 1.00b
+-- date 2023/11/10
+-- version 1.20b
-- 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
@@ -34,9 +34,9 @@ end
return sum/weight
end
-function rotation_ (center,alpha,pt)
- local z = point( math.cos(alpha) , math.sin(alpha) )
- return z*(pt-center)+center
+function rotation_ (c,a,pt)
+ local z = point( math.cos(a) , math.sin(a) )
+ return z*(pt-c)+c
end
function symmetry_(c,pt)
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 b4e41104d1..166d3b7647 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 2023/10/20
--- version 1.00b
+-- date 2023/11/10
+-- version 1.20b
-- 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
@@ -200,7 +200,7 @@ function incentral_tr_ (a,b,c)
r = intersection_ll_ ( a,i , b,c)
s = intersection_ll_ ( b,i , a,c)
t = intersection_ll_ ( c,i , a,b)
-return i,r,s,t
+return r,s,t
end
function excentral_tr_ (a,b,c)
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_lines.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_lines.lua
index 05d4196938..11d8f49d41 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_lines.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_lines.lua
@@ -1,6 +1,6 @@
-- tkz_elements_lines.lua
--- date 2023/10/20
--- version 1.00b
+-- date 2023/11/10
+-- version 1.20b
-- 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
@@ -34,9 +34,47 @@ function line: new(za, zb)
setmetatable(new_line, {__index = line})
return new_line
end
+
+-------------------
+-- Result -> real
+-------------------
+function line: distance (pt)
+ return point.mod(projection(self,pt)-pt)
+end
+
+function line: slope ()
+ return slope_(self.pa,self.pb)
+end
+-------------------
+-- Result -> boolean
+-------------------
+function line: in_out (pt)
+ local sc,epsilon
+ epsilon = 10^(-12)
+ sc = math.abs ((pt-self.pa)^(pt-self.pb))
+ if sc <= epsilon
+ then
+ return true
+ else
+ return false
+ end
+end
+
-------------------
-- Result -> point
-------------------
+function line: translation ( pt )
+ return translation_ ( self.pb-self.pa,pt )
+end
+
+function line: set_translation ( ...)
+ return set_translation_ ( self.pb-self.pa,... )
+end
+
+function line: projection ( pt )
+ return projection_ ( self.pa,self.pb,pt )
+end
+
function line: set_projection (...)
local tp = table.pack(...)
local i
@@ -60,7 +98,7 @@ function line: set_symmetry_axial (...)
end
return table.unpack ( t )
end
--- k_div ig "gold" or "phi" then
+
function line: barycenter (ka,kb)
return barycenter_({self.pa,ka},{self.pb,kb})
@@ -89,6 +127,14 @@ end
function line: gold_ratio()
return self.pa + (self.pb-self.pa)*tkzinvphi
end
+
+function line: normalize ()
+ return self.pa+(self.pb-self.pa)/point.mod(self.pb-self.pa)
+end
+
+function line: normalize_inv ()
+ return normalize_ (self.pb,self.pa)
+end
-------------------
-- Result -> line
-------------------
@@ -100,10 +146,6 @@ function line: ortho_from ( pt )
return line : new (pt,pt+(self.pb-self.pa)*point(0,1))
end
-function line: projection ( pt )
- return projection_ ( self.pa,self.pb,pt )
-end
-
function line: mediator ()
local m
m = midpoint_ (self.pa,self.pb)
@@ -119,30 +161,7 @@ end
function line: circle_swap ()
return circle : new (self.pb,self.pa)
end
--------------------
--- Result -> real
--------------------
-function line: distance (pt)
- return point.mod(projection(self,pt)-pt)
-end
--------------------
--- Result -> boolean
--------------------
-function line: in_out (pt)
- local sc,epsilon
- epsilon = 10^(-12)
- sc = math.abs ((pt-self.pa)^(pt-self.pb))
- if sc <= epsilon
- then
- return true
- else
- return false
- end
-end
-
-function line: slope ()
- return slope_(self.pa,self.pb)
-end
+
----------------------
-- Result -> triangle
----------------------
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 92e006fe78..10b96d1430 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 2023/10/20
--- version 1.00b
+-- date 2023/11/10
+-- version 1.20b
-- 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
@@ -43,5 +43,7 @@ if obj.type == 'line' then return obj.pa,obj.pb
obj.type == 'triangle' then return obj.pa,obj.pb,obj.pc
elseif
obj.type == 'circle' then return obj.center,obj.through
+ elseif
+ obj.type == 'ellipse' then return obj.pc,obj.pa,obj.pb
end
end \ No newline at end of file
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 0b2e3dec4a..5d459e3028 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 2023/10/20
--- version 1.00b
+-- date 2023/11/10
+-- version 1.20b
-- 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_points.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_points.lua
index bcaff010cc..74ad16a165 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_points.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_points.lua
@@ -1,6 +1,6 @@
-- tkz_elements_points.lua
--- date 2023/10/20
--- version 1.00b
+-- date 2023/11/10
+-- version 1.20b
-- 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_triangles.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_triangles.lua
index 1960248e50..6ea35c5b6e 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_triangles.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_triangles.lua
@@ -1,6 +1,6 @@
-- tkz_elements_triangles.lua
--- date 2023/10/20
--- version 1.00b
+-- date 2023/11/10
+-- version 1.20b
-- 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
@@ -20,6 +20,7 @@ function triangle: new (za, zb ,zc)
local incenter = in_center_ (za , zb , zc)
local orthocenter = ortho_center_ (za , zb , zc)
local eulercenter = euler_center_ (za , zb , zc)
+ local spiekercenter = spieker_center_ (za , zb , zc)
local c = point.abs(zb-za)
local a = point.abs(zc-zb)
local b = point.abs(za-zc)
@@ -31,8 +32,8 @@ function triangle: new (za, zb ,zc)
local bc =line : new (zb,zc)
local new_triangle = {pa = za, pb = zb, pc = zc, type = type,
circumcenter=circumcenter,centroid=centroid,incenter=incenter,
- eulercenter=eulercenter, orthocenter=orthocenter,a=a,b=b,c=c,ab=ab,ac=ac,bc=bc,
- alpha=alpha,beta=beta,gamma=gamma}
+ eulercenter=eulercenter, orthocenter=orthocenter,spiekercenter=spiekercenter,
+ a=a,b=b,c=c,ab=ab,ac=ac,bc=bc,alpha=alpha,beta=beta,gamma=gamma}
setmetatable(new_triangle, {__index = triangle})
return new_triangle
end
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_vectors.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_vectors.lua
index 44ea2f7f2e..26ec57e695 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_vectors.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_vectors.lua
@@ -1,6 +1,6 @@
-- tkz_elements_vectors.lua
--- date 2023/10/20
--- version 1.00b
+-- date 2023/11/10
+-- version 1.20b
-- 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