September 4, 2012

Fibonacci, nature and GIMP

WORDS BY   Mariano Cecowski

POSTED IN   programming | python | misc | gimp | math | misc


I'm a fan of Vi Hart's mathematical videos, and was particularly blown up by a 3-videos series on Spirals, Fibonacci and being a plant that I strongly suggest (if you can keep up the pace!).

My wife tried to reproduce some of the Vi's great drawings, but small errors in the angle quickly added up gave poor results. That's when the programmer in me couldn't help automatizing it in the computer, and what best that to do it in GIMP?

So, I ended up doing a very simple Python script for GIMP (my first one!) that let's you create such golden-ratio spiral figures from a single image. For instance, you can use a petal to create a flower, or, as in this example, a leave to create a plant.

Original

Original

Resulting image

Resulting image

You can even create an animation, sending something down a spiral fall (this time the object is not rotated by the golden-angle, but by a smaller one)

Animation

Animation

You can get the script from the GIMP's plugin registry. Enjoy and leave any interesting results at the registry's entry page.