In[]:=
(*Coordinatesinthecomplexplaneareused*)​​coor[z_]:={Re[z],Im[z]}​​(*choiceofthecolorfortheredpentagons*)​​redcol=RGBColor[200,0,0];​​(*choiceofthecolorforthebluepentagons*)​​bluecol=Blue;​​(*Risthelengthfromthecentertoaverticeinonepentagon*)​​R=1;​​​​(*rectangularunitcellfortheIce-raypacking*)​​(*complexcoordinateswithz0thecenterofthebluepentagon*)​​az=R*(1+Cos[Pi/5]);​​bz=3*R*I*Sin[2*Pi/5];​​z0=R*(Cos[Pi/5]*Exp[I*Pi/5]+Exp[2*I*Pi/5]);​​​​(*unitcelldependingontheslidingparameteru*)​​aunit[u_]:=az+2*u*R*I*Sin[Pi/5];​​bunit[u_]:=bz+2*u*R*(Cos[2*Pi/5]-1);​​(*​​aunit[u_]:=az+u*R*(Exp[I*Pi/5]-Exp[-I*Pi/5]);​​bunit[u_]:=bz-u*R*(1-Exp[8*I*Pi/5])+u*R*(Exp[2*I*Pi/5]-1);*)​​​​(*centersofthesixpentagonsaroundthebluepentagonatz0*)​​z1[u_]:=-u*R*(Exp[2*I*Pi/5]-1)​​z2[u_]:=z1[u]+aunit[u]​​z4[u_]:=z1[u]+aunit[u]+bunit[u]​​z5[u_]:=z1[u]+bunit[u]​​z3[u_]:=z0+aunit[u]​​z6[u_]:=z0-aunit[u]​​​​(*verticesofaredpentagonsfromthecenter*)​​vertices=R*{1,Exp[2*I*Pi/5],Exp[4*I*Pi/5],Exp[6*I*Pi/5],Exp[8*I*Pi/5]};​​(*verticesofabluepentagonfromitscenter*)​​invertedvertices=R*{Exp[I*Pi/5],Exp[3*I*Pi/5],-1,Exp[7*I*Pi/5],Exp[9*I*Pi/5]};​​​​(*unitcellparametersandpackingfraction*)​​amodulus[u_]:=Abs[aunit[u]]​​bmodulus[u_]:=Abs[bunit[u]]​​angle[u_]:=Arg[bunit[u]]-Arg[aunit[u]]​​Airemaille[u_]:=amodulus[u]*bmodulus[u]*Sin[angle[u]]​​Airepentas=10*R^2*Sin[4*Pi/5]*Cos[Pi/5];​​PackingFraction[u_]:=Airepentas/Airemaille[u]​​
In[]:=
(*rotationofthefiguresaroundthecenterofthebluepolygon*)​​(*rotationkeepsaunit[u]alwaysalongthex'xaxis*)​​​​RotFig[z_,u_]:=z*Exp[-I*Arg[aunit[u]]]​​(*unitcellwithrotation*)​​aunitrot[u_]:=RotFig[aunit[u],u]​​bunitrot[u_]:=RotFig[bunit[u],u]​​​​(*neighboursz1,toz6withrotation*)​​z1rot[u_]:=z0+RotFig[z1[u]-z0,u]​​z2rot[u_]:=z0+RotFig[z2[u]-z0,u]​​z3rot[u_]:=z0+RotFig[z3[u]-z0,u]​​z4rot[u_]:=z0+RotFig[z4[u]-z0,u]​​z5rot[u_]:=z0+RotFig[z5[u]-z0,u]​​z6rot[u_]:=z0+RotFig[z6[u]-z0,u]​​​​(*pentagonswithrotation*)​​​​verticesrot[u_]:=Table[RotFig[vertices[[i]],u],{i,1,Length[vertices]}]​​invertedverticesrot[u_]:=Table[RotFig[invertedvertices[[i]],u],{i,1,Length[vertices]}]​​​​(*directionfortheimageanalysis*)​​phirefimage[u_]:=-Pi/10-Arg[aunit[u]]​​
In[]:=
(*rotationangleofthefiguredependingontheslidingparameteru*)​​(*closebutdifferentfromu*Pi/5*)​​​​Plot[{Arg[aunit[u]],u*Pi/5},{u,-0.5,0.5}]​​Pi/10/Degree//N;​​Arg[aunit[0.5]]/Degree//N;​​Plot[{phirefimage[u],-Pi/10-u*Pi/5},{u,-0.5,0.5}]
Out[]=
Out[]=
In[]:=
(*anglesandbondsfunctions*)​​​​(*bondswithcolors*)​​BondPurple[u_]:=Abs[z1[u]-z0]​​BondYellow[u_]:=Abs[z2[u]-z0]​​BondGreen[u_]:=Abs[z3[u]-z0]​​BondCyan[u_]:=Abs[z4[u]-z0]​​BondRed[u_]:=Abs[z5[u]-z0]​​(*angles*)​​AngleGreen[u_]:=-phirefimage[u]​​​​AngleCyan[u_]:=PlanarAngle[{coor[z3[u]],coor[z0],coor[z4[u]]}]-phirefimage[u]​​​​AngleRed[u_]:=PlanarAngle[{coor[z3[u]],coor[z0],coor[z5[u]]}]-phirefimage[u]​​​​AngleYellow[u_]:=PlanarAngle[{coor[z6[u]],coor[z0],coor[z2[u]]}]-phirefimage[u]​​​​AnglePurple[u_]:=PlanarAngle[{coor[z6[u]],coor[z0],coor[z1[u]]}]-phirefimage[u]​​
In[]:=
(*versionwithrotationusingaunitrot[u]andbunitrot[u]*)​​Manipulate[​​Graphics[​​{Text["unit cell pentagonal ice-ray",{0,-1.5}],​​Style[Text["a",1.2*coor[aunitrot[u]]],Bold,12],​​Style[Text["b",1.2*coor[bunitrot[u]]],Bold,12],​​Style[Circle[{0,0},1],Dashed],​​Arrow[{{0,0},coor[aunitrot[u]]}],​​Arrow[{{0,0},coor[bunitrot[u]]}]},​​PlotRange{{-3,3},{-2,5}},​​ImageSize200],​​{{u,0,"sliding"},-0.5,0.5}]​​
Out[]=
​
sliding