summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_misc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_misc.lua')
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_misc.lua47
1 files changed, 26 insertions, 21 deletions
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 ed4dd949a1..23f088983f 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,7 +1,7 @@
-- tkz_elements_functions_maths.lua
--- date 23/12/24
--- version 1.72c
--- Copyright 2023 Alain Matthes
+-- date 2024/01/16
+-- version 1.82c
+-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
-- of this license or (at your option) any later version.
@@ -33,26 +33,31 @@ 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_ (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)
+
+function bisector (a,b,c)
+ local i
+ i = in_center_ (a,b,c)
+ return line : new (a,intersection_ll_ (a,i,b,c))
end
+
+function altitude (a,b,c)
+ local o,p
+ o = ortho_center_ (a,b,c)
+ p = projection_ (b,c,a)
+ return line : new (a,p)
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)
+
+function bisector_ext(a,b,c) -- n =1 swap n=2 2 swap
+ local i,p
+ i = in_center_ (a,b,c)
+ p = rotation_ (a,math.pi/2,i)
+ return line : new (a,p)
end
+
+function equilateral (a,b)
+ return equilateral_tr_ (a,b)
end
+function midpoint (a,b)
+ return (a+b)/2
+end \ No newline at end of file