Products and Design

Tutorial Tuesday 27: Design for Complexity With Structure Synth

What would you make if designing complex objects were actually easy? For some years now we’ve been hearing the buzz-phrase that “complexity is free” with 3D printing. With an SLS printer, the cost of printing a plain wireframe cube is the same as the cost of printing a complex, knotted wireframe cube, provided that they both take up the same amount of machine space and printing material. Unlike traditional manufacturing methods, 3D printing makes it easy to create highly complex, topologically unreasonable objects, at no additional cost!

But, to leverage the power to print such complexity, you need to be able to make models that are complex! One easy way to do that is with Structure Synth, a design program from 2010 that can quickly generate models of staggering complexity and beauty from just a few lines of “design grammar” written in EisenScript code (you can download it for free).

Wait, don’t click away yet — that sounded complicated, but it really isn’t! Even if you’ve never coded before, you can get started relatively quickly with Structure Synth, and be on your way to making crazy, fractal, impossible-looking 3D models. Let’s start at the beginning….

Getting Started with Structure Synth

Start by trying to construct something very simple by following along with the design in the excellent introductory video 3D Printing impossible geometries with Structure Synth, by Maker’s Muse: 

Okay, let’s back up a little bit and review how MakerMuse’s design works. Here is one modification of his code:

set maxdepth 15

rule R1 {
   { s 5 } box
   { x 3 rx 17 s 0.8 hue 10 } R1


The first line of code tells Structure Synth to stop any repeated action after it is done 15 times. The second line says “do rule R1.” The rest of the code defines exactly what rule R1 is. Before we get into that, let’s look at the output of this code:

3d design 3d design software generative design easy 3d design tutorial

Rule R1 is what’s called a recursive rule, which means that the definition of R1 itself uses R1! The rule references itself, sort of like a hall of mirrors. The first line of the definition of rule R1 simply says “make a box.” The “{s 5}” command tells Structure Synth to scale that box to five times the size of its usual box, so it will be 5 mm on each side.

The second line of the R1 definition is where the magic happens. It basically says “now change some parameters and start rule R1 over again with those parameters.” In this case, the parameters say to shift 3 units along the x-axis, rotate 17 degrees around the x-axis, scale the box to 80% of its current size, and then change the color by 10 units. Taken all together, MakerMuse’s code starts rule R1, which first makes a box, then makes a smaller repositioned box, then makes another smaller repositioned box above that, and so on, until the recursion lasts 15 steps, at which point it stops.

Next Steps With EisenScript

For a more in-depth introduction to the EisenScript language, take a look at the (delightfully retro) Structure Synth reference page:

3d design 3d design software generative design easy 3d design tutorial

In particular, notice that rule modifications can be made both globally and locally, that a rule can be defined more than once(!), and that the program will choose one definition or the other with frequency determined by the weights assigned to each definition. Try copy-pasting the EisenScript example at the link above and picking it apart to see what it does. Delete or change small pieces of code, recompile to see what happens, then undo your change and try modifying something else. Which parameters in this code control rotation, scaling, and translation? Which parameters control how many times an operation is performed?

If you’re having trouble seeing what the code is doing, try setting the global maxdepth to something very low (like 5). You’ll find yourself typing-and-recompiling a lot, so you may want to use the keyboard shortcut F5 for Build/comp (OpenSCAD fans rejoice!). The keyboard shortcut for Build is F5.

When you think you understand how the example above works, try picking apart the example files that come with Structure Synth in the Examples menu tab. A good place to start is with the example file. This file creates a simple spiral tree, but it’s difficult to see the entire object with the default black background. Add the line of code “set background white” to the top of the document and re-build to see the full tree. Play around with the rule parameters and try to get a sense for what each number in the code controls.

To print from Structure Synth, just export to .obj format and then upload to Shapeways. If your model is particularly complex, or if it is made up of very small pieces that are connected together in odd ways, then you might need to repair your model; luckily, Structure Synth plays well with MeshLab, which supports EisenScript.

Structure Synth Models With Code Examples

The best way to learn code is by example, and lucky for us, some of the lovely People of the Internet have been kind enough not only to share their Structure Synth designs, but also to share the code they used to create those designs. Here are three great Structure Synth models from Thingiverse whose code is also available for you to experiment with.

First, a very simple Flexible Bracelet design by paulhoover. By changing the parameters in the code you can create different styles and sizes of bracelets.

3d design 3d design software generative design easy 3d design tutorial

Ready for something more complex? Then check out this leveled-up, beautiful Stain Glass Window Bracelet, also by paulhoover:

3d design 3d design software generative design easy 3d design tutorial

Finally, take a look at this Collapsing New Candle Holder design by gwygonik, who has made the EisenScript code for this design available at their blog post Printing the Unprintable. They also discuss how they handled .obj mesh issues before printing this design.

3d design 3d design software generative design easy 3d design tutorial

Structure Synth Models on Shapeways

Although Structure Synth is a really great tool for making models that push the limits of the high-quality printers at Shapeways, there don’t seem to be that many models on Shapeways right now that make use of Structure Synth. Here are two that we found:

First, this Tri-Cone, made by Wonders of the Multiverse. Notice that, although the overall shape is complex, it is created by rotating and positioning the same basic cube over and over according to a pattern:

3d design 3d design software generative design easy 3d design tutorial

Second, this Starfish II pendant by Time Expander Designs. Again, notice the design has overall complexity, but is built out of simple shapes that follow basic geometric transformation rules. You can read more about Time Expander’s work at their Generative Art page.

3d design 3d design software generative design easy 3d design tutorial

What will you make to add to the collection of Structure Synth models on Shapeways? When you design and upload something, let us know.

You may also like
Products and Design, The Community
5 Awesome Beginner’s 3D Design Programs
May 18, 2018
3D Printing Industry
Create Your Own Black Panther Mask for the Upcoming Premiere
April 25, 2018
Products and Design
Video Tutorial: Make Your Video Game Models 3D Printable
April 20, 2018