Creating a Golden Spiral with the Spiral tool

General discussions about Inkscape.
sotomo
Posts: 2
Joined: Wed Nov 21, 2018 3:17 pm

Creating a Golden Spiral with the Spiral tool

Postby sotomo » Wed Nov 21, 2018 3:34 pm

Hello, I was wondering if it is possible to create a perfect Fibonacci spiral with the Spiral tool. Or is it mathematically impossible? If it is possible, what would be the correct combination of Turns, Divergence, Inner radius, width and height?

The reason I ask is because I am attempting to use the "Pattern Along Path" method to paste a path onto the spiral. Others have created a Fibonacci spiral using separate paths. However, when I join those paths, the "Pattern Along Path" method doesn't seem to work, and seems to give me random lines all over the place. I might be doing something wrong when joining those paths. But at any rate, I thought it would also be interesting to know if I could start off with an actual swirl.

Please forgive me for jumping in with just one question. I've had many questions answered by this forum via search before actually joining, and really appreciate all the expert knowledge that's helped me at various times.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Creating a Golden Spiral with the Spiral tool

Postby Lazur » Thu Nov 22, 2018 7:46 am

Hi.

Had constructed many of those spirals myself I never used the spiral tool. The pattern along path effect should work fluently with paths as an input. As a matter of fact if you apply the lpe to the spiral it should convert to a path to function.
Thus you should experiece the same result if a spiral was drawn with the spiral tool and converted to a path right after before applying the effect.
Which is a rather crude representation of a spiral in my humble opinion, plotting that by 4 or 8 nodes only on a full turn.

Instead, with the render/parametric curves extension you can set up more samples and set the number of turns, divergence accurately.

It is a logarithmic spiral with a quarter turn having a [(5^0,5)-1]/2 scale factor.

The parametres for a circle is like

x=r*sin(t)
y=r*cos(t)

for a full turn the t value is 2pi.

For the spiral, you need to set the "r" parametre as a function of t, as
a*(t/8pi)^{[(5^0,5)-1]/2} where a is constant, determining the size of the plot.

So the function should be like something
x=a*(t/8pi)^{[(5^0,5)-1]/2}*sin(t)
x=a*(t/8pi)^{[(5^0,5)-1]/2}*cos(t)

Writing this from memory, would need to check the exact formula that can be copy-pasted.

All in all, first check the pattern along path to work as expected.

sotomo
Posts: 2
Joined: Wed Nov 21, 2018 3:17 pm

Re: Creating a Golden Spiral with the Spiral tool

Postby sotomo » Thu Nov 22, 2018 11:20 am

Wow, your work on this is impressive. My end goal is to create a Fibonacci spiral that can be cut with a laser cutter. I was able to finally accomplish this using the Bezier tool with "Shape: none", hand tracing a Fibonacci spiral, and then adding the pattern along path. In this case, the pattern was a stretched out circle.

Pattern along path did not work with the path that was created by joining nodes of a Fibonocci spiral made of separate parts. I don't know why.

I really wish I understood parametric curves. Maybe I'll utilize it on my next project. I tried pasting your formula into the extension and got some errors, so I just gave up, just for now. I could use more training when it comes to that extension and parametric equations in general.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Creating a Golden Spiral with the Spiral tool

Postby Lazur » Thu Nov 22, 2018 9:11 pm

Ok was too sleepy yesterday.
First, the function to call the radius is the opposite, something like 0,618^t -so with t=0 the multiply value is 1...
Then dug up the righ "jargon" for n^t -it can be written by pow(n,t) in inkscape terms.
Thus the correct functions are
X-Function: cos(t*2*pi)*1000*pow(((pow(5,0.5)-1)/8),t)
Y-Function: sin(t*2*pi)*1000*pow(((pow(5,0.5)-1)/8),t)

Made it into an svg -click to download:
Image


Return to “General Discussions”