Andy Hook sent me an article on the science magazine Nature's web site called Maths gets into shape. The article discusses a new "Superformula" published in a scientific paper by a botanist named Johan Gielis which although very simple in mathematical terms yields a vast number of various shapes much like those found in nature.

"When I found the formula, all these beautiful shapes came rolling out of my computer," says Gielis, at University of Nijmegen, Holland. "It seemed too good to be true - I spent two years thinking 'What did I do wrong?' and 'How come no one else has discovered it?'" Having spoken to mathematicians, he reckons that he's found something new.I just had to see something called Superformula so I bought the American Journal of Botany paper for $7 (only to find out it was freely available elsewhere on the net. Here, let me save you the seven bucks: Superformula.pdf). I read through the paper during dinner last night, and after I got home from the Kinky show I decided to try to implement it as a Java applet. By 3AM I had the Superellipse formula working, but was having trouble converting the Superformula to cartesian (x,y) coordinates. This morning my friend Jeff Shore found a web page with some C code that implemented Superformula and I was able to get the applet working by adapting that. I still don't think it is implemented correctly though, but I don't have time to work on it more right now so I decided to just post it here and maybe someone who is a better mathematician than I (that's most people) can take a look at the source code and fix it for me :)
Here's the applet. Playing with a b and m seem the most interesting so far. You can type in values directly and use the Calculate button or just use the sliders to the right.
Start off by changing m (0,1,2,3.... you'll see the pattern)
You can get the source code and some more information here.
If you want to see the Superellipse formula in action, select it above the drawing area then set n1=2 and play with a and b in the ~100 range.









Thank you very much, i'm $7 richer. I read about the Superformula in a spanish journal, i seek for information in the net and i found an interesting web page, http://astronomy.swin.edu.au/~pbourke/ (probably the page that your friend found) but not the paper from Gielis. I implemented the Superformula in Matlab language to draw it, and then i wrote a script for 3DStudio, to test some 3D models build from these "supershapes". A good way to spend a rainy Sunday afternoon?
I'm sorry, i have no idea about Java Programming,
but i promise to have a look on your code. Ah, sorry about my english!
Posted by: mokelebembe | 2003.06.15 at 10:21 PM
For the superformula in 3D see
http://astronomy.swin.edu.au/~pbourke/tmp/supershape3d/
Posted by: 3D | 2003.07.12 at 06:58 AM
This is amazing! This "Superformula" describes just a circle but when we start changing 6 parameters we can get- I don't hestitate to say it- every shape which exists in nature!!! One parameter changes a circle into a elipse, another a triangle into a square. When we change all of them we get a figure with different shape, amount of edges, bigger or smaller symmetry. We can not even recognize the prototype. I admire Mr John Gielis for inventing "Superformula":)
Posted by: Joanna G | 2003.12.28 at 07:22 AM
We have to remember that the nature doesn't know any numbers. Those are stricly human invention and are used by us to explain or only describe our universe. Mathematik - science - is just the way of our understanding, a language in which we communicate to speak about the phenomenons around us. That's way I think that everything is possible to be contain in such formulas(even in one-major), but they don't determine anything, so our superformula isn't a discovery, it's rather an invention; and certainly it is not a revolution in science. /Gregorius, Poland
Posted by: ... | 2004.01.20 at 05:55 AM
A simple generator of pretty shapes I did a while ago:
http://www.brite.electric-chipmunk.com/?page=stars&dots=1
You're welcome to post any comments in the forum!
Posted by: Brite | 2004.02.04 at 05:45 AM
I modified my "3D landscape" thingy (http://www.brite.electric-chipmunk.com/index.php?page=landscape) and used a slightly modified superformula. Effects are interesting:
http://www.brite.electric-chipmunk.com/index.php?page=landscape1&n1=2&n2=8&n3=0&as=20&as1=45&ac=&ac1=&cos=1.3&sin=1.5&cos1=0.6&sin1=1.7&zero=
or
http://www.brite.electric-chipmunk.com/index.php?page=landscape1&n1=0&n2=0&n3=5&as=37&as1=5&ac=13&ac1=56&cos=0.4&sin=2.8&cos1=1.6&sin1=2.2&zero=
Posted by: Brite | 2004.02.14 at 07:09 AM
It's realy amazing! JOHAN GIELIS FROM ANTWRPIA IS GENIUS!!! Now every game can use this formula to create real world in our PC!!! You deserve to NOBEL!!!
/sorry, I now that my English isn't very good, but I'm 16 and I'm from Poland (we speak polish in this country :)
Thx to WIEDZA I ZYCIE (scientific American in USA)
Posted by: Martin Rapacz | 2004.03.11 at 02:25 PM