This example shows the problem with intersecting polygons. However this object looks just fine within Mathematica. |
With some efforts it is possible to generate the same object without any intersections. The light sources were also modified to provide better lighting. |
Here is how to create these graphics within Mathematica:
<<Graphics`Shapes` <<Graphics`Polyhedra` g = Show[Graphics3D[{ RotateShape[First[Polyhedron[Cube]],Pi/4.,0,0], RotateShape[First[Polyhedron[Cube]],0,Pi/4.,0], RotateShape[First[Polyhedron[Cube]],Pi/4,Pi/2,0] }]];
This is already everything you need to produce the topmost picture, if you stay in Mathematica. The procedure to display the Graphics3D object with LiveGraphics3D is explained in the documentation.
In order to get rid of intersecting polygons we have to construct all the polygons which are effectively visible, here is my solution:
e=2; h=(Sqrt[2 e^2]-e)/2; c=e/2-h; t0={0,0,e/2+h}; t1={e/2,0,e/2+h}; t2={0,e/2,e/2+h}; f1={e/2,-h,e/2}; f2={e/2,+h,e/2}; f3={+h,e/2,e/2}; f4={h,h,e/2}; b1={e/2-c/2,e/2-c/2,e/2-c/2}; atom=N[{Polygon[{t0,t1,f2,f4}],Polygon[{t0,f4,f3,t2}],Polygon[{t1,f1,f2}], Polygon[{f2,f3,f4}],Polygon[{f2,b1,f3}]}]; face={atom, RotateShape[atom,Pi/2,0,0],RotateShape[atom,2Pi/2,0,0], RotateShape[atom,3Pi/2,0,0]}; tripleCube={face,RotateShape[face,0,Pi/2,0],RotateShape[face,0,2Pi/2,0], RotateShape[face,0,3Pi/2,0],RotateShape[face,0,Pi/2,Pi/2], RotateShape[face,0,Pi/2,3Pi/2]}; g=Show[Graphics3D[{ FaceForm[SurfaceColor[GrayLevel[1]],SurfaceColor[Hue[0.6,1,1]]], tripleCube},{Background->RGBColor[1,1,1], LightSources -> {{{1, 1, 1}, GrayLevel[1]}, {{-1, -1, -1}, GrayLevel[0.5]}}, AmbientLight -> GrayLevel[0.2], Boxed -> False}]];