3
votes

I have an Archimedean spiral determined by the parametric equations x = r t * cos(t) and y = r t * sin(t).

I need to place n points equidistantly along the spiral. The exact definition of equidistant doesn't matter too much - it only has to be approximate.

Using just r, t and n as parameters, how can I calculate the coordinates of each equidistant point?

1
what do you mean by equidistantly? equal distance along the spiral, or in the xy plane? And what range of the spiral do you want to split? Since t is not defined, it could be infinite. And you can't deal with infinity in a finite context. Please rewise and update your question.Thomas
All variables will be defined by the programme. I'm looking for a general solution. I feel like "n equidistant points around a spiral" should be fairly self explanatorysnazzybouche
Then how about for(var i=0; i<n; ++i) console.log({x: i*r*Math.PI*2, y:0 }) ? All points are on the parametric spiral and all exactly by r*Math.PI*2 away from each other.Thomas
I'm not an expert but I'm fairly sure a curve with y = 0 isn't a spiralsnazzybouche

1 Answers

5
votes

You want to place points equidistantly corresponding to arc length. Arc length for Archimedean spiral (formula 4) is rather complex

s(t) = 1/(2*a) * (t * Sqrt(1 + t*t) + ln(t + Sqrt(1+t*t)))

and for exact positions one could use numerical methods, calculating t values for equidistant s1, s2, s3... arithmetical progression. It is possible though.

First approximation possible - calculate s(t) values for some sequence of t, then get intervals for needed s values and apply linear interpolation.

Second way - use Clackson scroll formula approximation, this approach looks very simple (perhaps inexact for small t values)

 t = 2 * Pi * Sqrt(2 * s / a)

Checked: quite reliable result

enter image description here