I have a vector v1 (suppose v1= a1,b2,c1) and this v1 passes through the point x1,y1,z1. Now I need a second vector, v2 which is perpendicular to the v1. Suppose that v2 is passing through the second point x2,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.
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
v1vector 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.