问题
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:
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
来源:https://stackoverflow.com/questions/44741045/placing-points-equidistantly-along-an-archimedean-spiral