# fitting two parallel lines to two clusters of points

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,

Mustafa

-