Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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)

share|improve this question
4  
Try taking the derivative of the square of the distance function. –  Qiaochu Yuan Dec 7 '10 at 5:53
    
@Qiaochu: Ill give that a try right now. @Timothy: I'll try that as plan "B", heh –  Faken Dec 7 '10 at 5:58
3  
I doubt there will be a closed form solution. Seems like we will have to solve $ A \sin(t+B) + Ct + D = 0$. –  Aryabhata Dec 7 '10 at 6:02
    
I can't do it, can't get the equation in explicit form. How would i go about trying this in cylindrical coordinates? Got any links for me to read up on about attempting something like this? –  Faken Dec 7 '10 at 6:07
    
I don't think cylindrical coordinates will help; the formula for distance will just get messier. If the point has nice coordinates and the helix has nice parametrization, and no "obvious" solution like t=3pi/2 works, then I would guess the answer is too messy to write down. In that case, I would ask a computer to find the minimum distance. –  Jonas Kibelbek Dec 7 '10 at 8:58

1 Answer 1

up vote 7 down vote accepted

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)$.

share|improve this answer
2  
There will be infinitely many points that are local minima and local maxima in distance, but the closest point(s) will have z-coordinate within h*pi of the z-coordinate of the point (a,b,c). –  Jonas Kibelbek Dec 7 '10 at 12:37
2  
@Jonas Kibelbek: There are only a finite number of local minima and maxima. But you are right about the closest point(s). I have edited my response. –  TonyK Dec 7 '10 at 13:28
    
Yes! There are only finitely many. It's clear from the equation and, now that I see it, geometrically as well. –  Jonas Kibelbek Dec 7 '10 at 14:45
    
Hmm, unfortunately this will be part of a computer program, thus i must have a explicit equation otherwise the run times will be too slow (and i also don't want to write an numerical method just to solve this) –  Faken Dec 7 '10 at 19:06
    
@Faken: Do you realise that you're asking the impossible? If you had an explicit equation to solve this problem, then you would have an explicit equation to solve $A\sin(t+B)+Ct+D=0$ for any values of $A,B,C,D$. Which is impossible. So you'll have to settle for what we've given you, I'm afraid. –  TonyK Dec 27 '10 at 23:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.