3

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?

4
  • 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
    Jun 24, 2017 at 21:26
  • 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 explanatory Jun 24, 2017 at 21:55
  • 1
    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
    Jun 24, 2017 at 22:06
  • 1
    I'm not an expert but I'm fairly sure a curve with y = 0 isn't a spiral Jun 24, 2017 at 23:00

1 Answer 1

6

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

s(t) = a/2 * (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

16
  • Looks good to me, I'll give this a test and report back. Cheers! Jun 25, 2017 at 5:27
  • In your formulas, is your a the same as my r? Jun 25, 2017 at 5:27
  • Yes, it is the same, scale coefficient
    – MBo
    Jun 25, 2017 at 8:00
  • Trying to work through the linked document - it seems like s still contains θ? If so, then surely the formula will not work (as my t is the document's θ); if not so, then what is s? Thank you! Jun 25, 2017 at 16:49
  • 1
    @sharkyenergy OK, too old theme ;) I tangled different definitions. For spiral defintion r=a*t/(2Pi), and a=20 in your case, s=a*t^2/(4Pi), t=2*sqrt(Pi*s/a), r=sqrt(s*a/Pi)
    – MBo
    Feb 7, 2021 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.