SuperShapes in OpenScad

by WilliamAAdams, published

SuperShapes in OpenScad by WilliamAAdams Oct 21, 2011

Featured Thing!

1 Share
Download All Files

Thing Apps Enabled

Order This Printed View All Apps



Public Domain
SuperShapes in OpenScad by WilliamAAdams is licensed under the Public Domain license.

Liked By

View All

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.

Print Thing Tag


Thing Statistics

4685Views 2644Downloads


Continuing the madness... I was getting laughed at in my Design 101 class, so the only way I thought of to silence the other kids was to come out with my SuperShapes!

After having done the previous SuperEllipse work, it was just a matter of time before the formulas came knocking at my door wanting to be implemented.

This thing implements the SuperFormula (muwaaahhhaahaaahaaa)!!

What the heck is that? Best thing is to take a look at the pretty pictures at this web site: http://paulbourke.net/geometry/supershape3d/

If you're really a math nutter, then take a look at the math as well. It's actually not that complicated. The complication here is just turning the formula into something that can be dealt with by OpenScad. In particular, making sure the thing turns out to be 2-manifold, so that you can actually generate .stl files and print the results, therein lies the rub.

The supershape.scad files contains two rotines of interest:
RenderSuperShape2D() - This takes the definition of a single supershape, and renders the curve of that supershape in 2D, using wireframe. With this single routine, you can go to the wiki entry for Superfomula (http://en.wikipedia.org/wiki/Superformula) and plug in the various numbers, and see pretty pictures.

RenderSuperShape() - This takes two supershape definitions (one modulates the other), and renders real pretty pictures. You can look at the Paul Bourke site to get very interesting parameters to plug into that one.

Another source of parameters might be POVRay files.

That's enough for a Friday post I think.

But wait, there's more...

You also get the procedural texture mapping checkerboard pattern, thrown in for free. What is procedural texture mapping? Well, instead of using a bitmap to represent the different colors (or heights) on an object, you can just call a routine and ask it for the color at a particular position. No fus, no muss, no arrays to slow you down! At any rate, it's just a little hidden gem.

This code is public domain. I figure having such a nice routine freely available might encourage people to make some very interesting shapes.

Challenge: How the heck do you get OpenScad to display in wireframe, and with a fade on the other colors?

UPDATE: 22102011
Added the tristar.stl file. This was an experiment in rendering the 2D shapes with faces, and not just wireframes, then using them with CSG operations. The result is of course a deadly weapon once rendered in hardened steel and sharpened.


1) Download the .scad files
2) Open up the test_supershape.scad file and play around with routines
3) See something you like, generate .stl
4) Print
5) Enjoy!

All Apps

Auto-magically prepare your 3D models for 3D printing. A cloud based 3D models Preparing and Healing solution for 3D Printing, MakePrintable provides features for model repairing, wall thickness...

App Info Launch App

Kiri:Moto is an integrated cloud-based slicer and tool-path generator for 3D Printing, CAM / CNC and Laser cutting. *** 3D printing mode provides model slicing and GCode output using built-in...

App Info Launch App
KiriMoto Thing App

With 3D Slash, you can edit 3d models like a stonecutter. A unique interface: as fun as a building game! The perfect tool for non-designers and children to create in 3D.

App Info Launch App

Print through a distributed network of 3D printing enthusiasts from across the US, at a fraction of the cost of the competitors. We want to change the world for the better through technology, an...

App Info Launch App

Quickly Scale, Mirror or Cut your 3D Models

App Info Launch App

Treatstock is an online platform that offers decentralized manufacturing services such as 3D printing and CNC machining for clients all over the world. We offer free and instant access to comparati...

App Info Launch App

3D print your favourite design with NinjaPrototype, a professional 3D manufacture with consistent quality and speed.

App Info Launch App

Looks like Paule Bourke's supershape page is now at http://paulbourke.net/geometry/supershape/

Nice opjects to print.

Your Bowl12 next to one of the superbowls of MakeAlot.



holy cow this is amazing.

Check out what MakeALot did with the script. I think that's truly amazing. Basically, we have a fundamental building block here, and all sorts of things can be created fairly easily based upon it. Just like nature does no?

And thanks for the original pointer by the way. It may have taken me years to stumble across that SuperFormula thing.

thank you for showing us this stuff, your math skills are awesome. it woulda taken me weeks to figure this out. wikipedia is what originally showed me superformula.

I have a challenge for you WilliamAAdams. It is not about supershapes, but I guess you could say it is about a shape that is super. It is a 38-sided space-filling polyhedron, discovered in 1980. It would be a great model to 3D print. Problem is, I don't know how to calculate the coordinates. A picture is uploaded, and here are some links with more info. Can you figure this out?

Grunbaum paper:

Forum discussion:

Additional really cool space-filling polyhedra are here:

Well, that's certainly a good challenge. Make a 3D print of something noone's actually seen as yet...

In the horror movie "Leprechaun", the only defense the good people have is to throw shoes in the path of the evil Leprechaun. For some reason, the evil Leprechaun could not move on without first shining the shoes, or something like that.

I think I must be a Leprechaun, and these various modeling
challenges are like shoes.