% !TEX TS-program = lualatex
% Author Alain Matthes 2023
\documentclass{article}
\usepackage[mini]{tkz-euclide}
\usepackage{tkz-elements}
\begin{document}

\directlua{
   z.A                  = point: new (0 , 0)
   z.B                  = point: new (5 , 1)
   L.AB                 = line : new (z.A,z.B)
   z.C                  = point: new (.8 , 3)
   T.ABC                = triangle: new (z.A,z.B,z.C)
   z.N                  = T.ABC.eulercenter
   z.G                  = T.ABC.centroid
   z.O                  = T.ABC.circumcenter
   z.H                  = T.ABC.orthocenter
   z.Ma,z.Mb,z.Mc       = get_points (T.ABC : medial ())
   z.Ha,z.Hb,z.Hc       = get_points (T.ABC : orthic ())   
   z.Ea,z.Eb,z.Ec       = get_points (T.ABC: extouch())
   L.euler              = T.ABC : euler_line () 
   C.circum             = T.ABC : circum_circle () 
   C.euler              = T.ABC : euler_circle () 
   z.I,z.J              = intersection (L.euler,C.euler) 
   E                    = conic : new (EL_bifocal(z.H,z.O,z.I)) 
   curve                = E :points (0,1,50)
   L.AH                 = line: new (z.A,z.H)
   L.BH                 = line: new (z.B,z.H)
   L.CH                 = line: new (z.C,z.H)
   z.X                  = intersection (L.AH,C.circum)  
   _,z.Y                = intersection (L.BH,C.circum)  
   _,z.Z                = intersection (L.CH,C.circum)  
   L.BC                 = line: new (z.B,z.C) 
   L.XO                 = line: new (z.X,z.O)
   L.YO                 = line: new (z.Y,z.O)
   L.ZO                 = line: new (z.Z,z.O)
   z.x                  = intersection (L.BC,L.XO)
   z.U                  = intersection (L.XO,E)
   _,z.V                = intersection (L.YO,E)
   _,z.W                = intersection (L.ZO,E)
 }

\begin{tikzpicture}[scale = 2]
   \tkzGetNodes
   \tkzDrawPolygon(A,B,C)
    \tkzDrawCoordinates[smooth,cyan](curve)
   \tkzDrawCircles[red](N,Ma O,A)
   \tkzDrawSegments(A,X B,Y C,Z B,Hb C,Hc X,O Y,O Z,O)
   \tkzDrawPolygon[red](U,V,W)
   \tkzDrawLine[blue](I,J)
   \tkzDrawPoints(I,J,U,V,W)
   \tkzDrawPoints(A,B,C,N,G,H,O,X,Y,Z,Ma,Mb,Mc,Ha,Hb,Hc)
   \tkzLabelPoints[blue,right](O,N,G,H,I,J)
   \tkzLabelPoints[red](U,V,W)
   \tkzLabelPoints(A,B,Z)
   \tkzLabelPoints[above](C,X,Y)
\end{tikzpicture}
\end{document}

