4 Miracles

Oliver Knill, MathE - 320, Harvard Extension School, Spring 2010-2012

Centroid

Manipulate[AA={0,0};BB={2,0};CC={0.4,2};
MA=t1 BB+(1-t1) CC;MB=t2 AA+(1-t2)CC;MC=(AA+BB)/2;
LineIntersect[A1_,A2_,B1_,B2_]:=A1+(t/.Solve[A1+t (A2-A1)==B1+s (B2-B1),{t,s}][[1]]) (A2-A1);
PP1=LineIntersect[AA,MA,BB,MB];
PP2=LineIntersect[BB,MB,CC,MC];
PP3=LineIntersect[AA,MA,CC,MC];
S1={RGBColor[1,0,1],{Disk[AA,0.06],Disk[BB,0.06],Disk[CC,0.06]}};
S2={RGBColor[0,1,1],{Disk[MA,0.06],Disk[MB,0.06],Disk[MC,0.06]}};
S3a={RGBColor[1,0,0],{Disk[PP1,0.03]}};
S3b={RGBColor[1,0,0],{Disk[PP2,0.03]}};
S3c={RGBColor[1,0,0],{Disk[PP3,0.03]}};
S4={RGBColor[0,0,1],Thickness[0.01],Line[{AA,BB,CC,AA}]};
S5={RGBColor[0,1,0],Thickness[0.01],{Line[{AA,MA}],Line[{BB,MB}],Line[{CC,MC}]}};
S=Show[Graphics[{S4,S5,S1,S2,S3a,S3b,S3c}]],{t1,0.40,0.55},{t2,0.5,0.55}]

Orthocenter

Manipulate[AA={0,0};BB={2,0};CC={0.4,2};
Pedal[{aa_,bb_,cc_}]:=aa+t1 (bb-aa)*((cc-aa).(bb-aa))/((bb-aa).(bb-aa));
MA=Pedal[{BB,CC,AA}];MB=Pedal[{CC,AA,BB}];MC=Pedal[{AA,BB,CC}];
LineIntersect[A1_,A2_,B1_,B2_]:=A1+(t/.Solve[A1+t (A2-A1)==B1+s (B2-B1),{t,s}][[1]]) (A2-A1);
PP1=LineIntersect[AA,MA,BB,MB];
PP2=LineIntersect[BB,MB,CC,MC];
PP3=LineIntersect[AA,MA,CC,MC];

S1={RGBColor[1,0,1],{Disk[AA,0.06],Disk[BB,0.06],Disk[CC,0.06]}};
S2={RGBColor[0,1,1],{Disk[MA,0.06],Disk[MB,0.06],Disk[MC,0.06]}};
S3={RGBColor[1,0,0],{Disk[PP,0.1]}};
S3a={RGBColor[1,0,0],{Disk[PP1,0.03]}};
S3b={RGBColor[1,0,0],{Disk[PP2,0.03]}};
S3c={RGBColor[1,0,0],{Disk[PP3,0.03]}};
S4={RGBColor[0,0,1],Thickness[0.01],Line[{AA,BB,CC,AA}]};
S5={RGBColor[0,1,0],Thickness[0.01],{Line[{AA,MA}],Line[{BB,MB}],Line[{CC,MC}]}};
S=Show[Graphics[{S4,S5,S1,S2,S3a,S3b,S3c}]],{t1,0.9,1.1}]

Cirumscribed Circle Center

Manipulate[AA={0,0};BB={2,0};CC={0.4,2};
u1=(t1  BB+(1-t1) CC);v1=(AA+CC)/2;w1=(AA+BB)/2;
p[x_]:={-x[[2]],x[[1]]};
MA=u1+p[CC-BB];MB=v1+p[CC-AA];MC=w1+p[AA-BB];
LineIntersect[A1_,A2_,B1_,B2_]:=A1+(t/.Solve[A1+t (A2-A1)==B1+s (B2-B1),{t,s}][[1]]) (A2-A1);
PP1=LineIntersect[u1,MA,v1,MB];
PP2=LineIntersect[v1,MB,w1,MC];
PP3=LineIntersect[u1,MA,w1,MC];

S1={RGBColor[1,0,1],{Disk[AA,0.06],Disk[BB,0.06],Disk[CC,0.06]}};
S3a={RGBColor[1,0,0],{Disk[PP1,0.03]}};
S3b={RGBColor[1,0,0],{Disk[PP2,0.03]}};
S3c={RGBColor[1,0,0],{Disk[PP3,0.03]}};
S4={RGBColor[0,0,1],Thickness[0.01],Line[{AA,BB,CC,AA}]};
S5={RGBColor[0,1,0],Thickness[0.01],{Line[{u1-3(MA-u1),u1+3(MA-u1)}],Line[{v1-3(MB-v1),v1+3(MB-v1)}],Line[{w1-3(MC-w1),w1+3(MC-w1)}]}};
S=Show[Graphics[{S4,S5,S1,S3a,S3b,S3c}],PlotRange->{{-0.7,2.7},{-0.7,2.7}}],{t1,0.45,0.55}]

Inscribed Circle Center

AA={0,0};BB={2,0};CC={0.4,2};
AngleMid[a_,b_,c_]:=a+((b-a)/Sqrt[(b-a).(b-a)]+(c-a)/Sqrt[(c-a).(c-a)])/2
Pedal[{aa_,bb_,cc_}]:=aa+(bb-aa)*((cc-aa).(bb-aa))/((bb-aa).(bb-aa));
LineIntersect[A1_,A2_,B1_,B2_]:=A1+(t/.Solve[A1+t (A2-A1)==B1+s (B2-B1),{t,s}][[1]]) (A2-A1);
Manipulate[
MA=Evaluate[AngleMid[AA,BB,CC]+t1{0.1,0.2}];MB=Evaluate[AngleMid[BB,CC,AA]+t1{-0.1,0.1}];MC=Evaluate[AngleMid[CC,AA,BB]+t1{0.1,-0.1}];
PP1=LineIntersect[AA,MA,BB,MB];
PP2=LineIntersect[BB,MB,CC,MC];
PP3=LineIntersect[AA,MA,CC,MC];
S1={RGBColor[1,0,1],{Disk[AA,0.06],Disk[BB,0.06],Disk[CC,0.06]}};
S3a={RGBColor[1,0,0],{Disk[PP1,0.03]}};
S3b={RGBColor[1,0,0],{Disk[PP2,0.03]}};
S3c={RGBColor[1,0,0],{Disk[PP3,0.03]}};
S4={RGBColor[0,0,1],Thickness[0.01],Line[{AA,BB,CC,AA}]};
S5={RGBColor[0,1,0],Thickness[0.01],{Line[{AA,AA+3(MA-AA)}],Line[{BB,BB+3(MB-BB)}],Line[{CC,CC+3(MC-CC)}]}};
S6={RGBColor[1,0.5,0],Thickness[0.01],Circle[PP,rr]};
S=Show[Graphics[{S4,S5,S1,S3a,S3b,S3c}],PlotRange->{{-0.2,2.1},{-0.2,2.1}}],{t1,0,1}]