
I need some actionscript that will make a "golden section" spiral. I'd love it if I could have the spiral drawn rather than just appear. I'm relatively new to Flash, please  any help is greatly appreciated.
reference link follows:
http://dgleahy.com/dgl/p14.html

I dont know what is that 1.618 means. The reference web that you included here just scared me. I did not read it.
Well, you want a spiral animation, so we do animation. If the whole 360 degree (or 2*Math.PI) is divided into 20, then we get a subzoomfactor f, that Math.pow(f,20) will be the zoom factor that we need for the radius of outer circle/the radius of inner circle. In the fla below I divide a circle as 60 parts.
I can not solve the equation, so I just made an approximation function. Here is the fla I draw mulitple lines to simulate the picture in that web page.
http://dr_ericlin.tripod.com/forum/spiral5.html
http://dr_ericlin.tripod.com/forum/spiral5.zip

can't download from tripod
Eric,
The swf you posted looks like exactly what I need, but I can't download the .zip file. Tripod won't allow. You can email it to me
perry@inkandpaper.org
Thanks for your help

Hi  could you please send me this file that you made?
Hi
I found an old post of yours in the flashkit forum with a link to a golden mean spiral  but the link no longer works.
Would you be good enough to send it to me?
Many thanks in advance
Dan Vantari
wb@bookoffire.net
Heres the post
Originally Posted by ericlin
I dont know what is that 1.618 means. The reference web that you included here just scared me. I did not read it.
Well, you want a spiral animation, so we do animation. If the whole 360 degree (or 2*Math.PI) is divided into 20, then we get a subzoomfactor f, that Math.pow(f,20) will be the zoom factor that we need for the radius of outer circle/the radius of inner circle. In the fla below I divide a circle as 60 parts.
I can not solve the equation, so I just made an approximation function. Here is the fla I draw mulitple lines to simulate the picture in that web page.
http://dr_ericlin.tripod.com/forum/spiral5.html
http://dr_ericlin.tripod.com/forum/spiral5.zip
Try to have as much time outdoors in nature as you do at a computer and have a great day.
PS Want the most important health supplement ever? Heard of Glyconutrients? Ask me.

Senior Member
his code has very old line drawing method; it can be done much simpler now:
Code:
// as per http://en.wikipedia.org/wiki/Golden_spiral
function spiral (a, t) {
var f = 0.5 * (1 + Math.sqrt (5));
var c = Math.pow (f, 2 / Math.PI);
return a * Math.pow (c, t);
}
this.lineStyle (1);
for (var t = 0; t < 23; t += 0.1) {
var r = spiral (1, t);
var x = Stage.width/2 + r * Math.sin (t);
var y = Stage.height/2 + r * Math.cos (t);
if (t == 0) {
this.moveTo (x, y);
}
this.lineTo (x, y);
}

Thanks thats a great beginning and the Wikipedia article is interesting.
WB
Try to have as much time outdoors in nature as you do at a computer and have a great day.
PS Want the most important health supplement ever? Heard of Glyconutrients? Ask me.

When in doubt ask
Here is another similar code for a spiral.
Please see the attached FLA. (F8).
Last edited by Eager Beaver; 08192007 at 02:17 PM.
<signature removed by admin>

Thanks Eager Beaver itsd good to have one that draws the line.
Try to have as much time outdoors in nature as you do at a computer and have a great day.
PS Want the most important health supplement ever? Heard of Glyconutrients? Ask me.

Senior Member
here goes my spiral code spinoff.

Oh very nice !
The code is way beyond me but I like the shrinking spiral.
Whats the black semi circular shape there for?
Cool anyway
WB
Try to have as much time outdoors in nature as you do at a computer and have a great day.
PS Want the most important health supplement ever? Heard of Glyconutrients? Ask me.

Senior Member
Originally Posted by White Bird
Whats the black semi circular shape there for?
?

Fibonacci Sequence <3 From the Da Vinci Code :P We use it alot in maths atm.
Posting Permissions
 You may not post new threads
 You may not post replies
 You may not post attachments
 You may not edit your posts

Forum Rules

Click Here to Expand Forum to Full Width
Poll by Flashkit.com
