Expanding diamond structure
Sándor Kabai
In a diamond lattice, carbon atoms are located at the vertices and centers of tetrahedra. If an engineering structure is built with nodes at those positions scaled up and connected with extensible bars, then it can expand in 3D. The nodes can have many different shapes, including a tetrahedron or octahedron. Two diamond lattices can be superimposed in order to make the structure more rigid. In this case the bars enclose a region corresponding to the rhombic dodecahedron.
In[]:=
Manipulate​​Module{tet,oct,tetv,sp,bar1,bar2,bar3,bar4,sp4,base,dia,second,cub,rd,rda,diax,diay,diaz},​​​​tet=GraphicsComplex[PolyhedronData["Tetrahedron","VertexCoordinates"],Polygon[PolyhedronData["Tetrahedron","FaceIndices"]]];​​oct={RGBColor[1,0.5,0.5],Scale[Rotate[Rotate[GraphicsComplex[PolyhedronData["Octahedron","VertexCoordinates"],Polygon[PolyhedronData["Octahedron","FaceIndices"]]],Pi/4,{0,0,1}],ArcTan[Sqrt[2]],{0,1,0}],0.51*{1,1,1},{0,0,0}]};tetv=PolyhedronData["Tetrahedron","VertexCoordinates"];​​sp={RGBColor[0,1,1],Sphere[{0,0,0},sizes]};​​bar1=RGBColor[1,1,0.5],Cylinder{0,0,0},exp0,0,
2
3
-
1
2
6
,sizec;​​bar2=RGBColor[1,1,0.5],Cylinder{0,0,0},exp-
1
2
3
,-
1
2
,-
1
2
6
,sizec;​​bar3=RGBColor[1,1,0.5],Cylinder{0,0,0},exp-
1
2
3
,
1
2
,-
1
2
6
,sizec;​​bar4=RGBColor[1,1,0.5],Cylinder{0,0,0},exp
1
3
,0,-
1
2
6
,sizec;​​sp4=Map[Translate[sp,#]&,exptetv];​​base={bar4,bar3,bar2,bar1,sp4,sp,If[tets,tet,{}],If[octs,oct,{}]};​​​​dia=Rotate[Rotate[Map[Translate[base,#]&,exptetv],-Cos[Sqrt[3]/3/2],{0,1,0}],Pi/4,{0,0,1}];​​second=Rotate[{dia},Pi/2,{0,0,1}];​​cub=If[cubs,Scale[GraphicsComplex[PolyhedronData["Cube","VertexCoordinates"],Line[PolyhedronData["Cube","EdgeIndices"]]],exp*Sqrt[2]*{1,1,1},{0,0,0}],{}];rd=GraphicsComplex[PolyhedronData["RhombicDodecahedron","VertexCoordinates"],Polygon[PolyhedronData["RhombicDodecahedron","FaceIndices"]]];​​rda={RGBColor[0.3,0.5,0.7],Rotate[Scale[rd,exp0.6123{1,1,1},{0,0,0}],Pi/4,{0,0,1}]};​​​​diax=Table[Translate[{If[seconds,second,{}],If[rdas,rda,{}],dia,cub},{iSqrt[2]exp,0,0}],{i,n-1}];​​diay=Table[Translate[{If[seconds,second,{}],If[rdas,rda,{}],dia,cub,diax},{0,iSqrt[2]exp,0}],{i,n-1}];​​diaz=Table[Translate[{If[seconds,second,{}],If[rdas,rda,{}],dia,cub,diax,diay},{0,0,iSqrt[2]exp}],{i,n-1}];​​​​Graphics3D[{If[rdas,rda,{}],dia,cub,diax,diay,diaz,If[seconds,second,{}]},BoxedFalse,SphericalRegionTrue,ImageSize340,ViewPoint{2,-6,1.5},ViewAngle0.2],​​{{n,1,"frequency"},1,2,1,RadioButton},​​{{seconds,False,"show second"},{True,False}},​​{{tets,False,"show tetrahedra"},{True,False}},​​{{octs,True,"show octahedra"},{True,False}},​​{{cubs,True,"show cubes"},{True,False}},​​{{rdas,False,"show dodecahedra"},{True,False}},​​{{exp,1.8,"expand"},1,2.6,ImageSizeTiny},​​{{sizec,0.05,"cylinder size"},0.05,0.07,ImageSizeTiny},​​{{sizes,0.1,"sphere size"},0,0.2,ImageSizeTiny},​​TrackedSymbolsManipulate
Out[]=
​
frequency
1
2
show second
show tetrahedra
show octahedra
show cubes
show dodecahedra
expand
cylinder size
sphere size
​