# Fibonacci spiral fun with Java3D

September 30, 2007 8 Comments

Recently I became fascinated with the Fibonacci series and the Golden Ratio, especially with how they turn up in nature. I had been meaning to explore the Java3D API for a while, so I thought it would be a good idea to try and generate some Fibonacci spirals and get to know Java3D that way. Here is one example of what I could come up with.

I was able to tweak the code to highlight interesting patterns. I actually thought for a moment that I had “discovered” a few things like for instance how if you number the “dots” by the order in which they are introduced into the simulation, the spirals that visually strike you are formed by joining the dots where the number difference is a fibonacci number.

Of course all this is common knowledge in the mathematics community. But I think I was able to create much prettier visualizations :) Here is a snapshot showing how the two most obvious spirals are where the dot-number difference is equal to 13 and 21 (successive Fibonacci numbers). Dot number 1 is on the far right.

And here is this interesting effect when the dots are numbered in reverse order, the dots corresponding to the Fibonacci sequence (1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144) line up along the x-axis.

Well, this is animation after all – so here is my first ever YouTube video :) If you are interested, here is the source code (not much documentation I’m afraid).

I found the fantastic sunflower photo on Flickr. The photo description has a good explanation of why the fibonacci spirals happen and the maths behind it. If you want to explore more, have a look at this Science News Online article.

Update 2008-12-13: Found this link to some nice mathematical analysis of number spirals (not Fibonacci): http://www.numberspiral.com/

Well done, really interesting project!

Reading the source code, Java3D doesn’t look so hard after all.

Hi there, thanks for ‘resuscitating’ my sunflower pic on Flickr… they have banned it from Flickr.explore

Wow! that was amazing :) Wish I could think up things like that :)

nice work – and nice explanation/webpage along with it :)

Pretty sweet stuff.

I’m doing a project on Fibonacci and the Golden Ratio.

It’s lots of fun.

:D

bravooooo

well done……..i like ur experiment.

keep it up

This looks really neat. I love drawing Fibonacci spirals.

I’m amazed, I have to admit. Seldom do I encounter a blog that’s both educative and

interesting, and without a doubt, you have hit the nail on the head.

The issue is an issue that too few people are speaking intelligently about.

I’m very happy I found this during my search for something relating to

this.