Fit arc of spiral given segments

126 Views Asked by At

I am working with a nearly Archimedian Spiral (change in radius is linear). It progresses in time, and I have taken the newest point along the spiral at .4s time intervals. (That may not be too important here though).

enter image description here

So with this image in mind (an (x,y) plot), I want to smooth out the curves. The kinks in the current image indicate the measurements that I took. I have the radial vectors for those points, but I want to find the radial vectors (or (x,y) coordinates) along the newly fit curve. Ultimately, I need a continuous set of data for this spiral.

1

There are 1 best solutions below

0
On

Let me consider the most general problem where you have $n$ ordered data points of coordinates $(x_i,y_i)$.

Compute for each data point the distance parameter $d_i$ defined as $$ d_{i+1}=d_i+\sqrt{(x_{i+1}-x_i)^2+(y_{i+1}-y_i)^2} \qquad (i=1,\cdots,n-1)$$ with $d_1=0$.

After that, for each data point $i$, $(x_i,y_i,d_i)$. So, build two parametric cubic splines, one for $x=f(d)$ and another for $y=g(d)$, $d$ varying from $0$ to $d_n$. The splines will exactly go through all the data points.

Now, for a choosen value of $d$ (which is a continuous variable), you can compute the corresponding $x$ and $y$ and get a smooth description of the whole curve.