3D Vicsek Fractal Notebook

Can I get a link to a notebook that explores this fractal structure? I am specifically asking for a url to a Mathematica notebook that generates and / or visualizes this type of fractal.

If that is not available, then what would be the Mathematica command(s) to generate this visualization? It doesn't have to rotate or be animated. This is just someone's animation that they made in PHP.

• Please be more specific in order to increase your chances of useful responses. Mar 13 '15 at 1:37
• For the visualization only: p=Select[{-1,0,1}~Tuples~3,#.#<2&];Graphics3D[{Nest[#~Translate~p~Scale~(1/3)&,Cuboid[],3]}] Mar 13 '15 at 18:09
• @SimonWoods, looks like it's opened back up if you want to answer. Thanks! Mar 14 '15 at 4:05

To create the visualisation you can use Translate and Scale to iteratively create the object from a starting cube. Here p is a list of translation vectors and f is a function which applies the transformation. Nest is used to repeatedly apply f to an initial Cuboid[].

p = {{-1, 0, 0}, {0, -1, 0}, {0, 0, -1}, {0, 0, 0}, {0, 0, 1}, {0, 1, 0}, {1, 0, 0}};

f[x_] := Scale[Translate[x, p], 1/3]

Graphics3D[Nest[f, Cuboid[], 3], Boxed -> False] An alternative approach, which may be more useful for studying the structure, is to create it as a 3 dimensional array of ones and zeros. Here's one way to do that:

kernel = Normal @ SparseArray[(p + 2) -> 1];

g[x_] := ArrayFlatten[Map[kernel # &, x, {3}], 3]

Image3D[Nest[g, kernel, 2]] This is a slight rewrite of Simon's solution that I picked up from Brett:

t1 = Composition[ScalingTransform[{1/3, 1/3, 1/3}], TranslationTransform[#]] & /@
{{-1, 0, 0}, {0, -1, 0}, {0, 0, -1}, {0, 0, 0}, {0, 0, 1}, {0, 1, 0}, {1, 0, 0}};

tn = {#["AffineMatrix"], #["AffineVector"]} & /@
Nest[Flatten[Outer[Composition, t1, #]] &, t1, 4]; (* fourth iterate *)

Graphics3D[{EdgeForm[], GeometricTransformation[Cuboid[], tn]}, Boxed -> False] 