"Bruno Luong" <email@example.com> wrote in message <firstname.lastname@example.org>... > "Torsten" wrote in message <email@example.com>... > > > Given a point on the spiral > > (t0*cos(t0)*Width,t0*sin(t0)*Width), > > the distance squared to another point on the spiral is given by > > d^2=(t*cos(t)*Width-t0*cos(t0)*Width)^2 + (t*sin(t)*Width-t0*sin(t0)*Width)^2. > > This is a quadratic equation in t you can solve analytically. > > IIUC, Torsen's formula is the euclidian 2D distance and not distance along the spiral. > > In order to find the distance along the curve, one need to compute the velocity wrt t, then integrate it, then solve the equation. This might give some mathematical equation not trivial to solved. Burt I haven't wrote i down (it should have a square-root somewhere and I bet it doesn't have a closed integration form). > > Bruno
True. The OP's passage > % Calculating the distance between each sample > dX=diff(x); dY=diff(y); vec=[dX; dY]'; > Distance = sqrt(vec(:,1).^2 + vec(:,2).^2); > figure(2); plot(Distance) seems to indicate that he refers to the Euclidean distance between two subsequent points on the spiral.