Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem where I have two clusters of 3D points and I am trying to find the two parallel lines that are a given distance $d$ (i.e $d$ is not a variable) apart that will be a best fit for the two clusters in the least squares sense. Currently I can find the best fit least squares line for each cluster independently using Principle Component Analysis. How would I change the least squares formulation to adapt to my problem??

Thank you,


share|cite|improve this question

Perhaps you could use a generalization of the Hough transform, somehow adapted to detect "parallel lines exactly d apart" rather than the more common "straight lines" detection or "circles" detection.

share|cite|improve this answer

Your Answer


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.