Clear["Global`*"];(*对于上图令 b=0; c=1; u=(E^(I∠ABC )), v=(E^(I∠ACB )), AD/AM=λ 是三个自由变量*)
a=(((u^2) ((v^2)-1))/((u^2) (v^2)-1));(OverBar[a])=(((v^2)-1)/((u^2) (v^2)-1));(OverBar[b])=b=0;(OverBar[c])=c=1;m=((u v)/(u v-1));  (OverBar[m])=(1/(1-u v));o=(((u^2) (v^2))/((u^2) (v^2)-1));(OverBar[o])=(1/(1-(u^2) (v^2)));
(*对于此种构图，有上述公式可以利用*)
 d=Simplify[a-λ(a-m)];  (OverBar[d])=Simplify[(OverBar[a])-λ((OverBar[a])-(OverBar[m]))]; Print["d = ",d];
k[a_,b_]:=((a-b)/((OverBar[a])-(OverBar[b])));(OverBar[k])[a_,b_]:=1/k[a,b];(*复斜率定义*)
tan[a_,b_,c_]:=((I ((OverBar[a]) (b-c)+(OverBar[b]) (c-a)+(OverBar[c]) (a-b)))/((OverBar[a]) (b-c)+(OverBar[b]) (a-2 b+c)+(OverBar[c]) (b-a))); (* 从AB边顺时针转到BC边的有向角∠ABC的正切 *)
W={e,(OverBar[e])}/.Simplify@Solve[{tan[b,c,d]==tan[a,d,e],k[a,e]==k[e,c]},{e,(OverBar[e])}]//Flatten;
e=Part[W,1]; (OverBar[e])=Part[W,2]; 
Print["e = ",e];
W={f,(OverBar[f])}/.Simplify@Solve[{tan[d,b,c]==tan[f,d,a],k[a,f]==k[f,b]},{f,(OverBar[f])}]//Flatten;
f=Part[W,1]; (OverBar[f])=Part[W,2]; 
Print["f = ",f];
   WX[a_,b_,c_]:=((a (OverBar[a]) (c-b) +b (OverBar[b])(a-c) +c (OverBar[c])(b-a) )/((OverBar[a])(c-b) +(OverBar[b])(a-c) + (OverBar[c])(b-a)));   (OverBar[WX])[a_,b_,c_]:=-((a (OverBar[a])((OverBar[c])-(OverBar[b]))+b (OverBar[b])((OverBar[a])-(OverBar[c]))+c (OverBar[c])((OverBar[b])-(OverBar[a])))/((OverBar[a])(c-b) +(OverBar[b])(a-c) + (OverBar[c])(b-a)));
(*由三角形顶点坐标求外心*)
o1=Simplify@WX[a,d,c];(OverBar[ o1])=Simplify@(OverBar[WX])[a,d,c];(*经过ADC三点的O1圆的圆心*)
Print["o1 = ",o1];
FourPoint[a_, b_, c_, d_] := (((OverBar[c]) d - c(OverBar[d])) (a - b) - ((OverBar[a]) b - a(OverBar[b])) (c - d))/((a - b) ((OverBar[c]) -(OverBar[d])) - ((OverBar[a]) -(OverBar[b])) (c - d));
(OverBar[FourPoint])[a_, b_, c_, d_] := -(((c(OverBar[d]) -(OverBar[c]) d) ((OverBar[a]) -(OverBar[b])) - ( a(OverBar[b]) -(OverBar[a]) b) ((OverBar[c]) -(OverBar[d])))/((a - b) ((OverBar[c]) -(OverBar[d])) - ((OverBar[a]) -(OverBar[b])) (c - d)));
(*直线 AB 与 CD 的交点*)
x=Simplify@FourPoint[a,c,o,m]; (OverBar[x])=Simplify@(OverBar[FourPoint])[a,c,o,m];(*直线AC与直线OM的交点*)
o2=Simplify@WX[x,e,d];(OverBar[ o2])=Simplify@(OverBar[WX])[x,e,d]; (*经过XED三点的O2圆的圆心*)
Print["o2 = ",o2];
g1=Simplify@FourPoint[o1,o2,e,f];  (*直线O1O2与直线EF的交点*)
g2=Simplify@FourPoint[o1,o2,b,c];  (*直线O1O2与直线BC的交点*)
g3=Simplify@FourPoint[e,f,b,c];    (*直线EF与直线BC的交点*)
Print["直线O1O2与直线EF的交点 = ",g1];
Print["直线O1O2与直线BC的交点 = ",g2];
Print["直线EF与直线BC的交点 = ",g3];
Print["由于上述三个交点的坐标相同，所以三条直线交于同一个点，即 O1O2、EF、BC 三线共点。"];