Four Sign Changes

DistanceHI[{a_, b_, c_}, {x_, y_, z_}] := 
  N[Sqrt[(a - x)^2 + (b - y)^2 + (c - z)^2]];
 
TwoCirclesIntersectionNewHI[{x1_, y1_}, {x2_, y2_}, {r1_, r2_}] := 
  Module[{c, a, b, e}, c = Sqrt[(x2 - x1)^2 + (y2 - y1)^2]; a = r2; b = r1; 
    e = ({x2, y2} - {x1, y1})/c; ConstructTriangleHI[{x1, y1}, e][a, b, c]];
 
 ConstructTriangleHI[{x1_, y1_}, e_,sign_][a_, b_, c_] := 
  Module[{p, hc, cosa, AB, x2, y2, x3, y3}, 
   p = (a + b + c)/2; hc = 2*Sqrt[p*(p - a)*(p - b)*(p - c)]/c; 
    cosa = (b^2 + c^2 - a^2)/(2*b*c); AB = c*e; {x2, y2} = {x1, y1} + AB; 
    {x3, y3} = {x1, y1} + b*cosa*e +sign OrtAB[AB]*hc; {x3, y3}];
OrtAB[{x_, y_}] := {-y, x}/Sqrt[x^2 + y^2];

znak[x_]:=Which[x>0,"-",x==0,"0",x<0,"+"];

mirrox[r_]:={r[[1]],-r[[2]]};
rere[r_]:={Re[r[[1]]],Re[r[[2]]]};

Manipulate[
If[fixed,
b=a+ab Normalize[b-a];
c=b+bc Normalize[c-b];
d=rere[Re[ConstructTriangleHI[c, Normalize[e-c],sign][de,cd,Norm[c-e]]]]];
Pane[Column[{
If[-Norm[c-e]+cd+de<0.02,Identity,Invisible]@
Text@Style["Do not extend CD!",16,Red],

Graphics[{Line[{a,b,c,d,e,a}],
Text[Style["A",16],a,1.5{1,1}],
Text[Style["B",16],b,1.5{1,-1}],
Text[Style["C",16],c,{0,-1.5}],
Text[Style["D",16],d,-1.5{1,1}],
Text[Style["E",16],e,1.5{-1,1}],
If[fixed,{{RGBColor[0, 1, 0],Line[{a,b1,c1,d1,e}]}},{}],
If[-Norm[c-e]+cd+de<0.02,{Red,Line[{c,d}]}],
PointSize[0.02],Point[{a,d,e}],{Red,Point[{b,c}]}
},Frame->True,PlotRange->{{-1.1,1.1},{-.3,1.2}},ImageSize->400],
"","",
If[fixed,Text@Style[Grid[{{"A","B","C","D","E"},Map[znak,{ena-Re[ArcCos[Normalize[b-a].Normalize[e-a]]],enb-Re[ArcCos[Normalize[a-b].Normalize[c-b]]],enc-Re[ArcCos[Normalize[b-c].Normalize[d-c]]],end-Re[ArcCos[Normalize[c-d].Normalize[e-d]]],ene-Re[ArcCos[Normalize[d-e].Normalize[a-e]]]}]},Frame->All],18]]},Center
],{400,400}],

Button["Drag B, C, and D, then click here to fix the figure.",ab=Norm[a-b];bc=Norm[c-b];cd=Norm[d-c];ce=Norm[e-c];de=Norm[e-d];b1=b;c1=c;d1=d;fixed=True;ena=ArcCos[Normalize[b-a].Normalize[e-a]];enb=ArcCos[Normalize[a-b].Normalize[c-b]];enc=ArcCos[Normalize[b-c].Normalize[d-c]];end=ArcCos[Normalize[c-d].Normalize[e-d]];ene=ArcCos[Normalize[d-e].Normalize[a-e]]],
{{b,{-0.5,0.7}},Locator,Appearance->None,LocatorRegion->{{-1,-.2},{1,1.3}}},{{d,{0.5,0.7}},Locator,Appearance->None},
{{c,{0,1}},Locator,Appearance->None},
{{ena,0},ControlType->None},
{{ena,0},ControlType->None},
{{enb,0},ControlType->None},
{{enc,0},ControlType->None},
{{end,0},ControlType->None},
{{ene,0},ControlType->None},
{{fixed,False},ControlType->None},
{{a,{-0.7,0}},ControlType->None},
{{e,{0.7,0}},ControlType->None},
{{ab,1},ControlType->None},
{{bc,1},ControlType->None},
{{cd,1},ControlType->None},
{{de,1},ControlType->None},
{{de,1},ControlType->None},
{{sign,1},ControlType->None},
{{b1,{-0.5,0.7}},ControlType->None},
{{c1,{0,1}},ControlType->None},
{{d1,{0.5,0.7}},ControlType->None},
{{enab,True},ControlType->None},
SaveDefinitions->True,ControllerLinking->False,
AutorunSequencing-> {2}]

A convex polygon has sides made of rigid rods connected by hinged vertices. If some vertices are moved without changing the lengths of the rods and the polygon remains convex, some angles are increased (+) and some not (–, 0). In cyclic order, there must be at least four changes of sign.

P. R. Cromwell, Polyhedra, New York: Cambridge University Press, 1997 pp. 229–230.

Contributed by: Izidor Hafner