compute a vector which is perpendicular to another given vector (all are in 3D)
Your question is confusing, do you want to find the point of intersection or do you want a perpendicular vector?
There's an infinite amount of vectors that are perpendicular to your given vector. If you want just any of those, turn your v1
vector by 90 degrees: v2 = (-y1, x1, z1)
.
As for the line crossing, take into account that (as said before) 2 lines in 3D space will almost never cross each other. Solution: http://softsurfer.com/Archive/algorithm_0106/algorithm_0106.htm.
Google is your friend.
niro
Updated on June 04, 2022Comments
-
niro almost 2 years
I have a vector
v1
(supposev1= a1,b2,c1
) and thisv1
passes through the pointx1,y1,z1
. Now I need a second vector,v2
which is perpendicular to thev1
. Suppose thatv2
is passing through the second pointx2,y2,z2
.However, my final goal is to find the intersection point of above two lines. So, could you help me to find the vector which is perpendicular to another given vector? PLZ Anyone helps me.