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.
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 sub-zoom-factor 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.
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 sub-zoom-factor 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.
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 Glyco-nutrients? Ask me.
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 Glyco-nutrients? Ask me.
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 Glyco-nutrients? Ask me.
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 Glyco-nutrients? Ask me.