The Funky 4

A few posts back, I talked about a tool chain whereby I used Lua coding to create a polyhedron, which was then rendered by OpenScad.  That tool chain works particularly well when I actually want to perform some boolean CSG operations on my objects.  In many cases though, I’m not really doing any CSG, I’m just generating objects directly using math.

The SuperShape object is one that I’ve used before, to demonstrate that tool chain.  On my machine, the process of rendering one of these supershape objects in OpenScad (using F6) was about a minute and a half.  Well, thinking about the millions of triangles per second that a modern graphics card is capable of displaying, I know it’s not about the drawing speed, but rather the computations.

In the case of these supershapes, there’s really no reason in the world to get the CGAL involved in trying to do CSG operations, because I’m not doing any CSG operations.  So, to go further, I just figured I’d render my shapes directly in Lua, and save a trip through OpenScad.  In the picture above, I’ve rendered the SuperShape 4 times, using a high enough polygon count that it would take a significant amount of time.  This render took roughly 4 seconds of wall clock time to render…

Since there’s not CSG involved, I can simply export to .stl, and be done with it, in that same amount of time.  If I want to do any CSG on this object, I can import it into OpenScad as usual and perform operations there.

What this gives me is a tool chain whereby rapidly experimenting with new math derived shapes is painlessly easy, blazingly fast, and I can export to anything I want to do further processing.

This combined with a coloring scheme that allows me to use colors like: Burnt Sienna, Carribean Green, Carnation Pink, and Eggplant, provides a righteous system.

I did check on Thingiverse, and my first uploaded design was on Nov 20th 2010.  So, I guess that is my anniversary date.  I will be making this little tool available for others to play with about that time.

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s