Sarrus linkage
The sides of a square prism are folded at half height until the top and bottom squares meet. The movement corresponds to that of the Sarrus linkage, which converts a limited circular motion to a linear motion. Stack such prisms to produce a retractable structure., e.g. a foldable shelf system.
In[]:=
Manipulate[​​n=2;​​t=4;​​m=0.3;​​vA={1,-1,0};vB={1,1,0};vC={-1,1,0};vD={-1,-1,0};​​Ex=-1-mSin[α];Ey=-1;Ez=mCos[α];vE={Ex,Ey,Ez};​​Fx=-1-mSin[α];Fy=1;Fz=mCos[α];vF={Fx,Fy,Fz};​​Gx=-1;Gy=-1;Gz=m2Cos[α];vG={Gx,Gy,Gz};​​Jx=-1;Jy=1;Jz=m2Cos[α];vJ={Jx,Jy,Jz};​​bottom=Polygon[{vA,vB,vC,vD}];​​p1=Polygon[{vC,vD,vE,vF}];​​p2=Polygon[{vJ,vG,vE,vF}];​​Hx=1;Hy=-1;Hz=m2Cos[α];vH={Hx,Hy,Hz};​​Ix=1;Iy=1;Iz=m2Cos[α];vI={Ix,Iy,Iz};​​top=Polygon[{vG,vH,vI,vJ}];​​side=Table[Rotate[{Green,p1,Cyan,p2},iPi/2,{0,0,1}],{i,n}];​​tower=Table[{Translate[{bottom,side,top},{0,0,i2mCos[α]}]},{i,t}];​​Graphics3D[{tower},SphericalRegionTrue,BoxedFalse,ViewPoint{-2,4,1},ImageSize{350,350}],​​{{α,0.6,"move"},0.2,1.4,ImageSizeTiny,ControlPlacementLeft},TrackedSymbols{α}]
Out[]=
​
move
​