Define the angle of the line which has two different points in 3D

33 Views Asked by At

I have 2 points different points in 3D space $(x_1,y_1,z_1)$ and $(x_2,y_2,z_2)$. These are not on the origin. It creates a vector and I would like to define the angle between this vector and normal vector of the plane laid down on the $X$-$Y$ plane.

1

There are 1 best solutions below

0
On BEST ANSWER

Assuming define means determine the angle, viewing this vector as a true length looking on the edge of the $X$-$Y$ plane, the angle $L$ between the vector and the plane is:

$$L = \arctan(\frac{z_2 - z_1}{\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}})$$

The angle to the normal vector is therefore $90 - L$.