3
$\begingroup$

I'm trying to work out an algorithm where, given the equation for a spiral in polar coordinates, $r(\theta)$, and a point rectilinear coordinates, $P(x,y)$, I can work out the minimum distance between that point and the curve traced by that spiral. I was hoping to have a general solution for any spiral form, but if that's not possible, then a solution for a Fermat spiral $$r(\theta)=\pm a\sqrt{\theta}$$ would be most preferable.

I've tried to find a global minima using the second and third differential of the distance equation, but I keep getting stumped. Any one have any ideas? Thanks very much in advance.

  • 2
    You could convert the point into polar coordinates, $(r_P,\theta_P)$, so that the square of its distance from $(r,\theta)$ is $r^2+r_P^2-2rr_P\cos(\theta-\theta_P)$. That seems easier to differentiate as a function of $\theta$.2012-07-25

3 Answers 3