-
1 Attachment(s)
Intersecting Lines in 3D
Hi all,
If you look at the pic below I have two lines in 3D that pass over each other. I want to calculate the point shown by the blue cross. This is halfway between the two lines in the z axis.
When the two lines cross they have the same x and y values but not z.
The vectors that describe the lines are...
Line 1: 154.21x - 437.83y - 1.46z
Line 2: -190.44x -351.4y - 15.7z
Is this possible? I would be very grateful for some help, thanks
S
:)
-
You need 3 equations to solve 3 variables. You need to find a third equation (and don't change x+y=z to 2x+2y=2z) to solve it.
Right now all you can do is get things like x = 5 + 2y instead of x = 3y + 4 + z. You can only eliminate one variable because you only have 2 equations.
-
I've solved it now :)
I approached it in 2D. I had coordinates that lay on each line. I ignored the z axis to start with and found the equation of each line in the form y = mx + c. Then found the gradient and intercept and put these two equations equal to each other to find the X,Y coordinates of where they cross.
Then it was easy to find the halfway point in the z axis.
Problem ended up being a lot simpler than I thought.
Stu
-
Is this resolved or are you looking for another answer? :confused: