Glam Prestige Journal

Bright entertainment trends with youth appeal.

$\begingroup$

I know for given 2 vector $\vec{u},\vec{v}$ the angle between them achieved by - $$\cos{\theta} = \frac{\vec{u} \cdot \vec{v}}{\|\mathbf{u}\|\|\mathbf{v}\|}$$

but what if I want to calculate the $\theta$ between two 3D line ?

For example given 2 lines which each of them represented by two 3D points - $$line1: (3,2,-5)\hspace{5 mm }, (1,1,1) \\ line2: (1,-4,6)\hspace{5 mm }, (1,1,1)$$

How should I caclculate the angle $\theta$ between those 2 lines ?

$\endgroup$

1 Answer

$\begingroup$

You can think of the formula as giving the angle between two lines intersecting the origin. So just "move" the intersection of your lines to the origin, and apply the equation.

Shifting lines by $( -1,-1,-1 )$ gives us:

Line $1$ is spanned by the vector $\vec{u} = ( 2,1,-6 )$

Line $2$ is spanned by the vector $\vec{v} = (0,-5,5)$

Now calculating the angle between the lines is a direct application of the equation you gave.

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy