8
$\begingroup$

I have a helix in parametric equations that wraps around the Z axis and a point in space. I want to determine the shortest distance between this helix and the point, how would i go about doing that?

I've tried using Pythagorean theorem to get the distance and then taking the derivative of the distance function to find the zeros but I can't seem to get an explicit equation for T and I'm stuck at that.

(I apologize for the tags, not sure how to tag it and I cant create new ones either)

  • 0
    You may want to tag this as differential geometry2010-12-07

1 Answers 1

9

Let the helix be given by $(\cos t, \sin t, ht)$ (after scaling). If $P$ is your point $(a,b,c)$, and $Q = (\cos t, \sin t, ht)$ is the nearest point on the helix, then $PQ$ is perpendicular to the tangent at $Q$, which is just $(-\sin t, \cos t, h)$:

$-(\cos t - a)\sin t + (\sin t - b)\cos t + (ht - c)h = 0 $

This simplifies to $A \sin(t+B) + Ct + D = 0$ for some constants $A,B,C,D,$ as Moron said. But then you have to solve this numerically. There will be more than one solution in general, but (as Jonas Kibelbek pointed out in the comments) you only need to check the solutions with $z$-coordinate in the interval $[c-\pi h, c+\pi h)$.

  • 0
    I guess you could account for that possibility too by also checking distance from the point to the point on the helix with the same z coordinate, and then just choose the smallest distance value, but I see your point in that it is not general because between those two special cases there are many cases which are not accounted for. But, making some assumptions about the given helix, it can still be useful for many applications.2017-01-21