I'm trying to measure a Cube using computer vision. So I have a lot of lines in 3D space, I would like to find if three lines are perpendicular to each other in C++. Is that possible to find a fast method of doing that ?
consider the parametric equations for the lines:
$$P_1+\vec v_1t$$$$P_2+\vec v_2t$$$$P_3+\vec v_3t$$
and then impose that
$$\vec v_1\cdot \vec v_2=\vec v_2\cdot \vec v_3=\vec v_3\cdot \vec v_1=0$$