Message Boards Message Boards

Single piece 3D printing for cellular automata

Posted 12 years ago

Simple programs such as Turing machines, substitution systems, cellular automata, etc. can produce a vast verity of shapes. Just browse pages of the NKS Book to see the diversity of patterns. With the recent 3D printing trend, we can experiment with shapes computationally using Mathamtica and then 3D print a physical model. This could inspire some actual applied designs ( see one, two and three ) .

But there is a technical problem of connectivity between various parts of computed objects. For standard printing there is always a connecting medium – paper or computer display. In 3D printing there is nothing but the object – so disconnected parts will not magically hold up in the air. Because interesting shapes generated by simple programs are complex, it is hard to predict or even assess their connectivity.

Here I share a simple idea and an app that can print a large class of shapes (~ 10^8) as a single piece – including those shapes produced the by Game of Life.

3D printable case of 2D Cellular Automata (CA) evolution with nearest neighbors interactions

Consider a 2D CA ( or this ) with neighborhood radius r=1. To get a 3D shape out of 2D CA we consider its time evolution. We will represent 0 by empty space and 1 by a cube or sphere. I assume that a 3D printer will print a single piece if cubes have a common face. If they have a common edge or vertex the connection is too thin to print as a single piece. This can be fixed by uniformly scaling up cube sizes so they overlap enough to produce thick printable connection (usually minimum 2mm as discussed below).

So the only thing that is left is to guarantee that all cubes always will have face, edge or vertex connections with the rest of structure. We can prove this sorts of by induction. Due to nearest-neighbor nature of r=1 the next generation will have only cubes connected to previous generation by face, edge or vertex. So if we start with all-connected single piece initial condition – we will always have an all-connected structure with every new generation added. For symmetric structures it is best to consider totalistic or outer-totalistic CAs. I’ll stick with outer-totalistic CAs (more shapes) and 9-cell neighborhoods, while generally arbitrary nearest-neighbor interactions should work. Below is the app that does this. 
  evo = CellularAutomaton[{k, {2, {{2, 2, 2}, {2, 1, 2}, {2, 2,
        2}}}, {1, 1}}, {ConstantArray[1, {d1, d2}], 0}, t];
  Graphics3D[{cl, EdgeForm[GrayLevel[q]],
    fn[#, r] & /@ Position[evo, 1]},
   ImageSize -> 500,
   SphericalRegion -> True,
   ViewPoint -> {-0.8, -1, 1.4},
   ViewVertical -> {-2, 0, .54},
  Boxed -> False,
  Background -> Black,
  Lighting -> "Neutral",
  Epilog ->
     "rule = " <> ToString@k <> " width = " <> ToString@d1 <>
      " length = " <> ToString@d2, 18, White, Thick],
    Scaled[{.3, .96}]]]
, {{k, 224, "rule"}, 0, 2^18 - 1, 1, ImageSize -> Tiny}
, {{t, 20, "step"}, 1, 20, 1, ImageSize -> Tiny}
, {{d1, 3, "width"}, 1, 11, 1, ImageSize -> Tiny}
, {{d2, 9, "length"}, 1, 11, 1, ImageSize -> Tiny}
, {{r, .75, "overlap"}, 0, 2, ImageSize -> Tiny}
, {{q, .2, "edges"}, 0, 1, ImageSize -> Tiny}
, {{fn, cbd, "units"}, {cbd -> "cube", sfr -> "sphere"}}
, {{cl, RGBColor[1.`, 1.`, 1.`],
   "color"}, # -> Graphics[{#, Disk[]}, ImageSize -> 30] & /@
   ColorData["HTML", "ColorList"]}
, FrameMargins -> 0
, ControlPlacement -> Left
, SynchronousUpdating -> False
, Initialization :> (cbd[x_, r_] := Cuboid[x - r, x + r];
   sfr[x_, r_] := Sphere[x, r])]

I have given a few neat shapes app generated as separate images below. 

Overlap control scales cubes up as discussed to insure connection at edges and vertexes. This needs to be experimented with using a real printer. Though some preliminary estimates can be made according to this minimum wall thickness for 3D printing tutorial.

In general I am driven by the following notion. Looking, for example, at exquisitely crafted images by Ernst Haeckel:

one simply gets astounded by sheer diversity of natural shapes. I wonder if we can have an ability to 3D print computationally generated 3D shapes - diversity of which has no limit.
POSTED BY: Vitaliy Kaurov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract