Logarithmic Spirals

I spent last evening coding some circles & spirals in Flash. I love spirals!

A logarithmic spiral, equiangular spiral or growth spiral is a special kind of spiral curve which often appears in nature. The logarithmic spiral was first described by Descartes and later extensively investigated by Jakob Bernoulli, who called it Spira mirabilis, “the marvelous spiral.

This kind of simple Math and lengthy tweaking of geometry animation is akin to whittling a piece of wood for me, whenever I have some free time and get the urge to write some code with no particular objective. It’s very relaxing.

It went through numerous iterations over the weekend and truly came to life when I started using Vectors and local3DToGlobal to convert the x,y,z coords to draw the 2D lines. Throwing in some random offsets from time to time helps keep it interesting. I used Math.sin and Math.cos a lot with random offsets to create smooth undulating motion that sometimes reminds me of jelly fish or some sort of under water plant waving around in the current. Other times it takes on a galaxy formation.

Watch it for 10 minutes or so and you will see some interesting spiral explosions. I can stare at it for 20-30 minutes.

Like it? Share it

Share on LinkedIn

Share on Google Plus