Loading

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

Contents

License

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

Makes

Thing Statistics

4540Views 2518Downloads

Summary

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.

Instructions

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

3D Print your file with 3D Hubs, the world’s largest online marketplace for 3D printing services.

App Info Launch App

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

3D Print a wide range of designs with Treatstock. Easy to use tools to get the perfect result. The global 3D printing network that connects you with high-quality and fast working print services nea...

App Info Launch App

Nice opjects to print.

Your Bowl12 next to one of the superbowls of MakeAlot.

Thanks,

wim

Ooh... pretty.

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:
http://www.ams.org/journals/bull/1980-03-03/S0273-0979-1980-14827-2/S0273-0979-1980-14827-2.pdfhttp://www.ams.org/journals/bu...

Forum discussion:
http://math.stackexchange.com/questions/49925/3d-picture-of-the-38-sided-engel-space-filling-polyhedronhttp://math.stackexchange.com/...

Additional really cool space-filling polyhedra are here:
http:
//http://www.steelpillow.com/polyhedra/five_sf/five.htmwww.steelpillow.com/polyhedra/...

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.
:-D

Top