diff options
Diffstat (limited to 'macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_triangle.lua')
-rw-r--r-- | macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_triangle.lua | 48 |
1 files changed, 45 insertions, 3 deletions
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 d3a80bd777..c6dd2c3757 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 2024/03/25 --- version 2.20c +-- date 2024/04/27 +-- version 2.25c -- 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 @@ -140,6 +140,17 @@ end function triangle : soddy_center () return soddy_center_ (self.pa,self.pb,self.pc) end + +function triangle : conway_points () + local a1,a2,b1,b2,c1,c2 + a1 = report_ (self.pb,self.pa,length(self.pb,self.pc),self.pa) + a2 = report_ (self.pc,self.pa,length(self.pb,self.pc),self.pa) + b1 = report_ (self.pa,self.pb,length(self.pa,self.pc),self.pb) + b2 = report_ (self.pc,self.pb,length(self.pa,self.pc),self.pb) + c1 = report_ (self.pb,self.pc,length(self.pb,self.pa),self.pc) + c2 = report_ (self.pa,self.pc,length(self.pb,self.pa),self.pc) + return a1,a2,b1,b2,c1,c2 + end ------------------- -- Result -> line ------------------- @@ -214,7 +225,7 @@ local a,b,c end end -function triangle: antiparallel(pt,n) -- n =1 swap n=2 2 swap +function triangle: antiparallel(pt,n) -- n = 1 swap ; n= 2 2 swap local a,b,c,i,u,v,w a = self.pa b = self.pb @@ -305,6 +316,29 @@ function triangle : soddy_circle () s,i = soddy_center_ (self.pa,self.pb,self.pc) return circle : new ( s , i ) end + +function triangle : cevian_circle (p) + local pta,ptb,ptc + pta,ptb,ptc = cevian_ (self.pa,self.pb,self.pc,p) + return circle : new (circum_circle_ (pta,ptb,ptc),pta) + end + + function triangle : conway_circle () + local i,t + i = in_center_ (self.pa,self.pb,self.pc) + t = report_ (self.pb,self.pa,length(self.pb,self.pc),self.pa) + return circle : new (i,t) + end + +function triangle : pedal_circle (pt) + local x,y,z,c + x = projection_ (self.pb,self.pc,pt) + y = projection_ (self.pa,self.pc,pt) + z = projection_ (self.pa,self.pb,pt) + c = circum_center_ (x,y,z) + return circle : new (c,x) +end + ------------------- -- Result -> triangle ------------------- @@ -361,6 +395,14 @@ end function triangle: euler () return triangle : new (euler_points_ (self.pa,self.pb,self.pc) ) end + +function triangle: pedal (pt) + local x,y,z + x = projection_ (self.pb,self.pc,pt) + y = projection_ (self.pa,self.pc,pt) + z = projection_ (self.pa,self.pb,pt) + return triangle : new (x,y,z) +end ------------------- -- Result -> ellipse ------------------- |