Organic Modeling Techniques Part 2: Differential Growth

Before I begin, a quick news update. My Grasshopper book is now completely through the copyediting process, and is with the printer. I’m told it will be available some time in the next few weeks! In the meantime, I’m happy to share the cover art.

Now on to today’s post. As I said in my last post, my goal in this series is to describe modern approaches to modeling organic forms that you wouldn’t find in more classical treatments. So I’m not going to discuss here seashells (logarithmic spirals), sunflowers (phyllotaxis), etc.

I’m excited to write about my newest experiments creating organic forms by a differential growth algorithm. This kind of model is relatively new (as far as I know), but has certainly gained a lot of press for the variety of amazing forms you can generate. If you haven’t seen it yet, I encourage you to check out the amazing video here from Neri Oxman’s group at the MIT media lab. (Her TED talk is also worth watching.) Other great examples are the Floraform sculptures by Jessica Rosenkrantz and Jesse Louis-Rosenberg at Nervous System, like the one shown here:

I’ve long been interested in replicating these kinds of systems with Rhino3D and a Python script, Grasshopper script, or some combination of the two (because that’s the CAD package I know best). Many others have written in to the Grasshopper forum expressing a similar desire, but as far as I know there has been little progress, until now!

The earliest effort I know of in this direction was by Daniel Piker, author of the Grasshopper plug-in “Kangaroo,” originally posted in the discussion here. Kangaroo adds physics based modeling to Grasshopper, allowing the designer to define a variety of forces on a geometry and let the system evolve. The idea behind Piker’s algorithm was to first define a triangulation of a disk where the edges got smaller as you got closer to the outside.

Then he placed a relatively strong force at each vertex to move them away from each other, and a weak spring force along each edge to keep the whole thing together. Add in a little smoothing forces, and here’s the result:

This looks a lot like the Nervous System piece pictured above, but there’s a big difference in the algorithm. Once the edges of the disk are defined, the final form that will eventually evolve is essentially determined. In contrast, a typical differential growth algorithm will just keep growing and growing, adding more and more complexity.

Shortly after Piker posted his definition, Vicente Soler wrote a true differential growth algorithm in a Grasshopper script, described in his post here. However, the core of that script is a C# component containing 543 lines of code. I can read C# code, but I wasn’t about to decipher that. I also can’t really write C# code, so even if I understood his program, it wasn’t going to help me create new variants.

Last week I started experimenting with putting Kangaroo forces inside an Anemone loop. For those unfamiliar with Grasshopper, its a visual way of writing a computer program, where you don’t have to know any coding at all. The drawback of Grasshopper is that there are no provisions for looping, which means you can’t easily make recursive structures. Anemone is a plug-in for Grasshopper that enables looping ability.

My idea was to define some geometry, set it in motion for a very short time by subjecting it to some forces,  modify the geometry based on the resulting shape, and repeat. And here’s the result.

The Grasshopper script to create this is available on the Grasshopper forum, here.

Here’s a brief description of my algorithm:

  1. Begin with a  simple triangulation of a cube.
  2. Measure each edge. If any edge is longer than 2, then subdivide it. This is accomplished with three lines of Python code. (The hard part was figuring out how to write a Python script to take advantage of the Plankton half-edge data structure.)
  3. Place a spring along each edge whose rest-length is the length of the edge, additional forces at the vertices spreading them 2 units apart from each other, and a smoothing force.
  4. Evolve the mesh according to the forces by one unit of time.
  5. Go back to step 2.

The exciting thing (to me anyway) about this algorithm is its potential. By adding other forces (gravity, wind, etc) and constraints I can now “grow” a huge new variety of shapes. I’ve only just gotten started!

[UPDATE: I just figured out the way to grow a disk, instead of a sphere, getting me closer to Nervous System’s Floraform sculpture. Here’s a video:]


Organic Modeling Techniques Part 2: Differential Growth