The angle between two 3D lines

  • Thread starter Thread starter somy
  • Start date Start date
  • Tags Tags
    3d Angle Lines
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 28K views
somy
Messages
137
Reaction score
0
Can anyone tell me how can I calculate the angle between two lines in 3D. I need in my codings.
I know it has a simple solution. but I really have mixed up!
Thanks.
 
Physics news on Phys.org
If the two lines actually intersect, then the angle is given by
[tex]cos(\theta)= \frac{u\cdot v}{|u||v|}[/tex] where u and v are any vectors pointing in the direction of each line. You can use the point of intersection and one point on each line to define those vectors.

If the line do not intersect (the "typical" case in 3d) then there is no angle between them.
 
Last edited by a moderator:
Thank you. I'll try it!