Monthly Archive: June 2011

Super Shapes Generator

Open /scripts/analysis-and-simulation/super-shapes-generator

Having just done the Spherical Harmonics demo, and with most of the infrastructure already in place, it would have been remiss not to do a Super Shapes demo. Super Shapes are 3D forms generated using Johan Gielis' generalisation of the superellipse formula, often termed the superformula. This was proposed in 2003 as a framework for simulating natural forms and is basically an equation with four input paramaters that generate a range of natural polygons. Two superformula (hence eight parameters) are used to generate complex 3D forms. By modulating the radius and/or Z coordinates, it can also create shells, spirals and helixes.

Spherical Harmonics Shape Generator

Open /scripts/analysis-and-simulation/spherical-harmonics-shape-generator

I have recently been looking at the use of spherical harmonics as a way of doing real-time diffuse lighting and shadowing effects in OpenGL. As I usually only really understand stuff when I can see it, I did a quick viewer in Processing to help make sure I was getting all the algorithms correct. Some of the visualisations and shapes started to look pretty good, so I figured I’d polish it a bit and put it up on my site. Apart from the visuals, spherical harmonics look really interesting as a means to simplify and relatively accurately approximate complex lighting environments.