w=Exp[2 Pi I/5];
EE=({{1,1,1,1,1},{1,w,w^2,w^3,w^4},{1,w^2,w^4,w^6,w^8},{1,w^3,w^6,w^9,w^12},{1,w^4,w^8,w^12,w^16}});
(*coordinates for derived pentagons going in natural order 72, 144, 216, 288 degrees, for animation need to update the indices in the controller at the end of the program {{pts,earlevel0},Locator}*)
earlevel0={{-1,1},{0,-1},{1,-1},{1,0},{0,0}}
earlevel1={{0.188191,1.18819},{-1.87638,-0.688191},{0.5,-1.68819},{1.68819,-0.5},{0.5,0.688191}};
earlevel2={{0.425325,0.988847},{-1.14893,0.585409},{-0.85065,-1.57426},{1.28713,-1.28713},{1.28713,0.287129}};
earlevel3={{0.742227,0.497979},{-0.29626,0.531375},{-0.648931,-0.445967},{0.171593,-1.08339},{1.03138,-0.500001}};
earlevel4={{0.200003,-0.200003},{0.200003,-0.200003},{0.200003,-0.200003},{0.200003,-0.200003},{0.200003,-0.200003}}

Manipulate[Module[{gon,colors,rotatedComplexNumbers,vertexVector,resultVector,staticPolygon2,staticPolygon3,staticPolygon4,staticPolygon5,singlePointGraphic,secondColumnVertices,thirdColumnVertices,fourthColumnVertices,fifthColumnVertices,secondColumnCoords,secondColumnCoord1,thirdColumnCoords,thirdColumnCoord1,fourthColumnCoords,fourthColumnCoord1,fifthColumnCoords,fifthColumnCoord1,secondMultiplier,thirdMultiplier,fourthMultiplier,fifthMultiplier,smallColors,coordinateLabels,earVector,earPoints,earPointsFlat, linePoints,vertexPoints,earVectorsecond,earPointssecond,earPointssecondFlat,vertexVectorsecond,vertexPointssecond, linePointssecond,earPointsThird,earVectorThird, vertexVectorThird,vertexPointsThird,linePointsThird,earPointsThirdFlat, earConnectOpacity,earVectorfourth,earPointsfourth,earPointsfourthFlat,vertexVectorfourth,vertexPointsfourth, linePointsfourth, earVectorfifth,earPointsfifth,earPointsfifthFlat,vertexVectorfifth,vertexPointsfifth, linePointsfifth,labels},gon=Append[pts,First[pts]];
colors={Red,Green,Blue,Orange,Black};
blackcolors={Gray,Gray,Gray,Gray,Gray};
darkercolors={Darker[Red],Darker[Green],Darker[Blue],Darker[Orange],Darker[Black]};
smallColors={Black,Red,Green,Blue,Orange};
darkersmallColors={Darker[Black],Darker[Red],Darker[Green],Darker[Blue],Darker[Orange]};
(*Calculate the complex numbers corresponding to the vertices*)complexNumbers=Complex@@@pts;
coordinateLabels=("("<>ToString[NumberForm[#[[1]],{4,3}]]<>", "<>ToString[NumberForm[#[[2]],{4,3}]]<>")")&/@(List@@@ReIm[complexNumbers]);
(*Rotate the complex numbers list so that the last entry is moved to the top*)rotatedComplexNumbers=RotateRight[complexNumbers,1];
(*Define vertexVector as a 5x1 matrix*)vertexVector=Transpose[{rotatedComplexNumbers}];
(*Calculate the product of inverse of EE matrix and vertexVector,and apply Chop to remove small numbers*)resultVector=Chop[N[Inverse[EE].vertexVector],10^-5];
(*Extract multipliers from resultVector*)secondMultiplier=resultVector[[2,1]];
thirdMultiplier=resultVector[[3,1]];
fourthMultiplier=resultVector[[4,1]];
fifthMultiplier=resultVector[[5,1]];
(*Extract and scale columns of EE matrix*)secondColumnVertices=secondMultiplier*EE[[All,2]];
thirdColumnVertices=thirdMultiplier*EE[[All,3]];
fourthColumnVertices=fourthMultiplier*EE[[All,4]];
fifthColumnVertices=fifthMultiplier*EE[[All,5]];
(*Convert complex numbers to real coordinate pairs*)secondColumnCoords=List/@ReIm[secondColumnVertices];
thirdColumnCoords=List/@ReIm[thirdColumnVertices];
fourthColumnCoords=List/@ReIm[fourthColumnVertices];
fifthColumnCoords=List/@ReIm[fifthColumnVertices];
(*Create flat lists and append first entries to close the polygons*)secondColumnCoord1=Append[Flatten[secondColumnCoords,1],First[Flatten[secondColumnCoords,1]]];
thirdColumnCoord1=Append[Flatten[thirdColumnCoords,1],First[Flatten[thirdColumnCoords,1]]];
fourthColumnCoord1=Append[Flatten[fourthColumnCoords,1],First[Flatten[fourthColumnCoords,1]]];
fifthColumnCoord1=Append[Flatten[fifthColumnCoords,1],First[Flatten[fifthColumnCoords,1]]];
earConnectOpacity=v;

(*Create ears for the small windows*)
earVectorsecond=secondMultiplier*N[{{1/(1-w^n),-w^n/(1-w^n),0,0,0},{0,1/(1-w^n),-w^n/(1-w^n),0,0},{0,0,1/(1-w^n),-w^n/(1-w^n),0},{0,0,0,1/(1-w^n),-w^n/(1-w^n)},{-w^n/(1-w^n),0,0,0,1/(1-w^n)}}].EE.{{0},{1},{0},{0},{0}};
earPointssecond=List@@@ReIm[earVectorsecond];
earPointssecondFlat=Flatten[earPointssecond,1];AppendTo[earPointssecondFlat,earPointssecondFlat[[1]]];
vertexVectorsecond=secondMultiplier*N[EE.{{0},{1},{0},{0},{0}}];
vertexPointssecond=List@@@ReIm[vertexVectorsecond];
linePointssecond=Flatten[Riffle[vertexPointssecond,earPointssecond],1];
AppendTo[linePointssecond,vertexPointssecond[[1]][[1]]];

earVectorThird=thirdMultiplier*N[{{1/(1-w^n),-w^n/(1-w^n),0,0,0},{0,1/(1-w^n),-w^n/(1-w^n),0,0},{0,0,1/(1-w^n),-w^n/(1-w^n),0},{0,0,0,1/(1-w^n),-w^n/(1-w^n)},{-w^n/(1-w^n),0,0,0,1/(1-w^n)}}].EE.{{0},{0},{1},{0},{0}};
earPointsThird=List@@@ReIm[earVectorThird];
earPointsThirdFlat=Flatten[earPointsThird,1];AppendTo[earPointsThirdFlat,earPointsThirdFlat[[1]]];
vertexVectorThird=thirdMultiplier*N[EE.{{0},{0},{1},{0},{0}}];
vertexPointsThird=List@@@ReIm[vertexVectorThird];
linePointsThird=Flatten[Riffle[vertexPointsThird,earPointsThird],1];
AppendTo[linePointsThird,vertexPointsThird[[1]][[1]]];

earVectorfourth=fourthMultiplier*N[{{1/(1-w^n),-w^n/(1-w^n),0,0,0},{0,1/(1-w^n),-w^n/(1-w^n),0,0},{0,0,1/(1-w^n),-w^n/(1-w^n),0},{0,0,0,1/(1-w^n),-w^n/(1-w^n)},{-w^n/(1-w^n),0,0,0,1/(1-w^n)}}].EE.{{0},{0},{0},{1},{0}};
earPointsfourth=List@@@ReIm[earVectorfourth];
earPointsfourthFlat=Flatten[earPointsfourth,1];AppendTo[earPointsfourthFlat,earPointsfourthFlat[[1]]];
vertexVectorfourth=fourthMultiplier*N[EE.{{0},{0},{0},{1},{0}}];
vertexPointsfourth=List@@@ReIm[vertexVectorfourth];
linePointsfourth=Flatten[Riffle[vertexPointsfourth,earPointsfourth],1];
AppendTo[linePointsfourth,vertexPointsfourth[[1]][[1]]];

earVectorfifth=fifthMultiplier*N[{{1/(1-w^n),-w^n/(1-w^n),0,0,0},{0,1/(1-w^n),-w^n/(1-w^n),0,0},{0,0,1/(1-w^n),-w^n/(1-w^n),0},{0,0,0,1/(1-w^n),-w^n/(1-w^n)},{-w^n/(1-w^n),0,0,0,1/(1-w^n)}}].EE.{{0},{0},{0},{0},{1}};
earPointsfifth=List@@@ReIm[earVectorfifth];
earPointsfifthFlat=Flatten[earPointsfifth,1];AppendTo[earPointsfifthFlat,earPointsfifthFlat[[1]]];
vertexVectorfifth=fifthMultiplier*N[EE.{{0},{0},{0},{0},{1}}];
vertexPointsfifth=List@@@ReIm[vertexVectorfifth];
linePointsfifth=Flatten[Riffle[vertexPointsfifth,earPointsfifth],1];
AppendTo[linePointsfifth,vertexPointsfifth[[1]][[1]]];


(*Create versions of the polygon for the small windows*)staticPolygon2=Graphics[{EdgeForm[{Black,Thickness[0.01],Opacity[1-v]}],FaceForm[None],Polygon[Append[secondColumnCoords,First[secondColumnCoords]]],
{Thickness[0.003],Opacity[1-v],Line[secondColumnCoord1]},
{Thickness[0.003],Opacity[earsvisible*(1-v)],Line[linePointssecond]},
{Thickness[0.004],Opacity[earConnectOpacity],Line[earPointssecondFlat]},
MapThread[{#1,PointSize[0.06],Opacity[earsvisible1],Point[#2]}&,{{Blend[{Gray,Red},blendcolors],Blend[{Gray,Green},blendcolors],Blend[{Gray,Blue},blendcolors],Blend[{Gray,Orange},blendcolors],Blend[{Gray,Black},blendcolors]},earPointssecond}],
MapThread[{#1,PointSize[(1-v)*0.06],Opacity[1-v],Point[#2]}&,{smallColors,secondColumnCoords}]},PlotRange->{{-1.45,1.45},{-1.55,1.55}},Axes->True,Ticks->{Range[-1,1,1],Range[-1,1,1]},ImageSize->Small];


staticPolygon3=Graphics[{EdgeForm[{Black,Thickness[0.003],Opacity[1-v]}],FaceForm[None],Polygon[Append[thirdColumnCoords,First[thirdColumnCoords]]],
{Thickness[0.003],Opacity[1-v],Line[thirdColumnCoord1]},
{Thickness[0.003],Opacity[earsvisible*(1-v)],Line[linePointsThird]},
{Thickness[0.004],Opacity[earConnectOpacity],Line[earPointsThirdFlat]},
(*Add earPoints to the main graphics*)
MapThread[{#1,PointSize[0.06],Opacity[earsvisible1],Point[#2]}&,{{Blend[{Gray,Red},blendcolors],Blend[{Gray,Green},blendcolors],Blend[{Gray,Blue},blendcolors],Blend[{Gray,Orange},blendcolors],Blend[{Gray,Black},blendcolors]},earPointsThird}],
MapThread[{#1,PointSize[(1-v)*0.06],Opacity[1-v],Point[#2]}&,{smallColors,thirdColumnCoords}]},PlotRange->{{-1.45,1.45},{-1.55,1.55}},Axes->True,Ticks->{Range[-1,1,1],Range[-1,1,1]},ImageSize->Small];

staticPolygon4=Graphics[{EdgeForm[{Black,Thickness[0.01],Opacity[1-v]}],FaceForm[None],Polygon[Append[fourthColumnCoords,First[fourthColumnCoords]]],{Thickness[0.003],Opacity[1-v],Line[fourthColumnCoord1]},
{Thickness[0.003],Opacity[earsvisible*(1-v)],Line[linePointsfourth]},
{Thickness[0.004],Opacity[earConnectOpacity],Line[earPointsfourthFlat]},

MapThread[{#1,PointSize[0.06],Opacity[earsvisible1],Point[#2]}&,{{Blend[{Gray,Red},blendcolors],Blend[{Gray,Green},blendcolors],Blend[{Gray,Blue},blendcolors],Blend[{Gray,Orange},blendcolors],Blend[{Gray,Black},blendcolors]},earPointsfourth}],MapThread[{#1,PointSize[(1-v)*0.06],Opacity[1-v],Point[#2]}&,{smallColors,fourthColumnCoords}]},PlotRange->{{-1.45,1.45},{-1.55,1.55}},Axes->True,Ticks->{Range[-1,1,1],Range[-1,1,1]},ImageSize->Small];

staticPolygon5=Graphics[{EdgeForm[{Black,Thickness[0.01],Opacity[1-v]}],FaceForm[None],Polygon[Append[fifthColumnCoords,First[fifthColumnCoords]]],{Thickness[0.003],Opacity[1-v],Line[fifthColumnCoord1]},
{Thickness[0.003],Opacity[earsvisible*(1-v)],Line[linePointsfifth]},
{Thickness[0.004],Opacity[earConnectOpacity],Line[earPointsfifthFlat]},

MapThread[{#1,PointSize[0.06],Opacity[earsvisible1],Point[#2]}&,{{Blend[{Gray,Red},blendcolors],Blend[{Gray,Green},blendcolors],Blend[{Gray,Blue},blendcolors],Blend[{Gray,Orange},blendcolors],Blend[{Gray,Black},blendcolors]},earPointsfifth}],MapThread[{#1,PointSize[(1-v)*0.06],Opacity[1-v],Point[#2]}&,{smallColors,fifthColumnCoords}]},PlotRange->{{-1.45,1.45},{-1.55,1.55}},Axes->True,Ticks->{Range[-1,1,1],Range[-1,1,1]},ImageSize->Small];

(*The ear stuff*)earVector={{1/(1-w^n),-w^n/(1-w^n),0,0,0},{0,1/(1-w^n),-w^n/(1-w^n),0,0},{0,0,1/(1-w^n),-w^n/(1-w^n),0},{0,0,0,1/(1-w^n),-w^n/(1-w^n)},{-w^n/(1-w^n),0,0,0,1/(1-w^n)}}.vertexVector;
earPoints=List@@@ReIm[earVector];
earPointsFlat=Flatten[List@@@ReIm[earVector],1];AppendTo[earPointsFlat, earPointsFlat[[1]]];
vertexPoints=List@@@ReIm[vertexVector];
(*Create the list of points for the zigzag line*)
linePoints=Flatten[Riffle[vertexPoints,earPoints],1];
(*Add the first point to close the loop*)
AppendTo[linePoints,vertexPoints[[1]][[1]]];
(*Create a small graphics window with a stack of points for resultVector[[1,1]]*)singlePointGraphic=Graphics[{{Orange,PointSize[0.14],Point[ReIm[resultVector[[1,1]]]]},{Blue,PointSize[0.11],Point[ReIm[resultVector[[1,1]]]]},{Green,PointSize[0.08],Point[ReIm[resultVector[[1,1]]]]},{Red,PointSize[0.05],Point[ReIm[resultVector[[1,1]]]]},{Black,PointSize[0.02],Point[ReIm[resultVector[[1,1]]]]}},PlotRange->{{-1.45,1.45},{-1.55,1.55}},Axes->True,Ticks->{Range[-1,1,1],Range[-1,1,1]},ImageSize->Small];
labels=If[showLabels,MapThread[Text[Style[#,FontSize->17],#2,{-1.5,1.5}]&,{coordinateLabels,pts}],{}];

Column[{Graphics[
{EdgeForm[{Black,Thickness[0.003],Opacity[1-v]}],FaceForm[None],Polygon[gon],MapThread[{#1,PointSize[(1-v)*0.05],Opacity[1-v],Point[#2]}&,{colors,pts}],Black,labels,
{Opacity[v],Line[earPointsFlat]},(*Add the zigzag line connecting vertices and ear points*){Thickness[0.003],Opacity[earsvisible*(1-v)],Line[linePoints]},
(*Add earPoints to the main graphics*)MapThread[{#1,Opacity[earsvisible1],PointSize[0.04],Point[#2]}&,
{{Blend[{Gray,Red},blendcolors],Blend[{Gray,Green},blendcolors],Blend[{Gray,Blue},blendcolors],Blend[{Gray,Orange},blendcolors],Blend[{Gray,Black},blendcolors]},earPoints}],


(*Add coordinate axes*)
Black,Line[{{-2,0},{2,0}}],Line[{{0,-1.8},{0,1.5}}]},PlotRange->{{-2,2},{-1.8,1.5}},Axes->True,Ticks->{Range[-1,1,1],Range[-1,1,1]},ImageSize->Medium],Row[{singlePointGraphic,Spacer[10],staticPolygon2,Spacer[10],staticPolygon3,Spacer[10],staticPolygon4,Spacer[10],staticPolygon5},ImageSize->1500]}]],

(*different controllers, first one needs manual update for animation*)
{{pts,earlevel0},Locator},
{{earsvisible,0,"Ear triangles visible"},0,1},
{{earsvisible1,0,"Ear ends visible"},0,1},
{{n,1,"Different ears"},1,4,1},
{{v,0,"make new visible, fade old"},0,1},
{{blendcolors,0,"Ear color blend"},0,1},
{{showLabels,False,"Toggle var"},{True,False},ControlType->Checkbox}]