Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
549 views
Welcome To Ask or Share your Answers For Others

1 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...