diff options
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.lua | 48 |
1 files changed, 48 insertions, 0 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 new file mode 100644 index 0000000000..5667aba67f --- /dev/null +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_misc.lua @@ -0,0 +1,48 @@ +-- tkz_elements_functions_maths.lua +-- date 23/12/03 +-- version 1.40c +-- 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 +-- of this license or (at your option) any later version. +-- The latest version of this license is in +-- http://www.latex-project.org/lppl.txt +-- and version 1.3 or later is part of all distributions of LaTeX +-- version 2005/12/01 or later. +-- This work has the LPPL maintenance status “maintained”. +-- The Current Maintainer of this work is Alain Matthes. +-- ---------------------------------------------------------------- +-- +-- ---------------------------------------------------------------- +function get_points (obj) +if obj.type == 'line' then return obj.pa,obj.pb + elseif + 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 + elseif + obj.type == 'square' or obj.type == 'rectangle' or obj.type == 'quadrilateral' or obj.type == 'parallelogram' + then return obj.pa,obj.pb,obj.pc,obj.pd +end +end + +function set_lua_to_tex (t) + for k,v in pairs(t) do + token.set_macro(v,_ENV[v],'global') + end +end + +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 |