A second example:
(* mathematica*)
pieces = {{0, 0, 0}, {0, 0, 1}, {0, 0, 2}, {0, 0, 3}, {0, 0, 4}, {0,
1, 0}, {0, 1, 1}, {0, 1, 3}, {0, 1, 4}, {0, 2, 0}, {0, 2, 4}, {0,
3, 0}, {0, 3, 1}, {0, 3, 3}, {0, 3, 4}, {0, 4, 0}, {0, 4, 1}, {0,
4, 2}, {0, 4, 3}, {0, 4, 4}, {1, 0, 0}, {1, 0, 1}, {1, 0, 3}, {1,
0, 4}, {1, 1, 0}, {1, 1, 1}, {1, 1, 3}, {1, 1, 4}, {1, 3, 0}, {1,
3, 1}, {1, 3, 3}, {1, 3, 4}, {1, 4, 0}, {1, 4, 1}, {1, 4, 3}, {1,
4, 4}, {2, 0, 0}, {2, 0, 4}, {2, 4, 0}, {2, 4, 4}, {3, 0, 0}, {3,
0, 1}, {3, 0, 3}, {3, 0, 4}, {3, 1, 0}, {3, 1, 1}, {3, 1, 3}, {3,
1, 4}, {3, 3, 0}, {3, 3, 1}, {3, 3, 3}, {3, 3, 4}, {3, 4, 0}, {3,
4, 1}, {3, 4, 3}, {3, 4, 4}, {4, 0, 0}, {4, 0, 1}, {4, 0, 2}, {4,
0, 3}, {4, 0, 4}, {4, 1, 0}, {4, 1, 1}, {4, 1, 3}, {4, 1, 4}, {4,
2, 0}, {4, 2, 4}, {4, 3, 0}, {4, 3, 1}, {4, 3, 3}, {4, 3, 4}, {4,
4, 0}, {4, 4, 1}, {4, 4, 2}, {4, 4, 3}, {4, 4, 4}};
Length[pieces];
N[Log[Length[pieces]]/Log[5]];
menger[cornerPt_, sideLen_, n_] :=
menger[cornerPt + #1*(sideLen/5), sideLen/5, n - 1] & /@ pieces;
menger[cornerPt_, sideLen_,
0] :=
{ColorData["DarkBands"][
N[(0.0625*1.5)*Apply[Plus, cornerPt]]], EdgeForm[],
Cuboid[cornerPt, cornerPt + sideLen*N[{1, 1, 1}]]};
Clear[f]
f[n_] := Flatten[
Join[menger[{6 - n, 0, n}, 1, n], menger[{n, 0, n}, 1, n]]]
g = Show[Graphics3D[
Table[Flatten[menger[{2 - n, 0, -n}, 1, n]], {n, 2}],
Boxed -> False, ImageSize -> 1000, Background -> LightPurple,
ViewPoint -> {-5, -5, 5}],
Graphics3D[Flatten[menger[{1, 0, -2}, 1, 3]]]];
Export["CrossChair2.jpg", g]
(* end*)
https://www.pinterest.com/pin/293648838197696511/
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)