The SuperFormulaThe superformula is well explained on Paul Bourke website and on Wikipedia here:
http://en.wikipedia.org/wiki/SuperformulaIn polar coordinates, with r the radius and φ the angle, the superformula is as per the first figure below from Wikipedia.
The formula appeared in a work by Johan Gielis in 2003. It was obtained by generalizing the superellipse in order to create organic shapes. The superformula can be used to describe many complex shapes and curves that are found in nature by inserting the formula into standard polar coordinate shapes such as the sphere, cylinder, disk, torus or cone.
Example – The sphere.Remember the sphere second mapping:
x = r * Cos(u) * Cos (v)
y = r * Sin(v)
z = r * Sin(u) * Cos (v)
if you replace the r parameter with the superformula in u, v or both you get the supershapes in 3D presented in Paul Bourke website. The formula becomes:
In u:
R(u) = second figure
And in v
R(v) = third figure
This gives us three variations of the supershape sphere formula:
U only:
x = R(u) * Cos(u) * Cos (v)
y = Sin(v)
z = R(u) * Sin(u) * Cos (v)
v only:
x = Cos(u) * R(v) * Cos (v)
y = R(v) * Sin(v)
z = Sin(u) * R(v) * Cos (v)
both u and v, which is the general representation seen on various websites and the basis of the Supershape_Sphere ICE Compound:
x = R(u) * Cos(u) * R(v) * Cos (v)
y = R(v) * Sin(v)
z = R(u) * Sin(u) * R(v) * Cos (v)
The parameters:M is the angular coefficient multiplier. If m = 0 we get the sphere representation. If m is an integer, the shape is closed. If m is a fraction, the shape is open but we can rotate u or v multiple times to create a petal/star shape with intersecting polygons. M being a multiplier will control the number of points in the shape (wave or star like shape), example m=5 will create a shape with five bumps or start points.
a and b are the radius controls. They can be any numbers except zero (to avoid a division by zero error). Negative numbers need to be converted to positive using an absolute to avoid imaginary numbers issue.
n1, n2 and n3 are the exponent controlling the supershape. This is where the magic happen. They can be any numbers, positive or negatives. Small values have the greatest impact. Note that if you make n1 equal to zero, x, y and z will be equal to zero.
So google up "superformula" and "supershape", feed those parameters you found into the supershape formula, give it some colours and see how flexible the superformula is.
Cheers!