Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The angle between two 3D lines

  1. Jul 5, 2006 #1
    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!!!
  2. jcsd
  3. Jul 5, 2006 #2


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

  4. Jul 6, 2006 #3


    User Avatar
    Staff Emeritus
    Science Advisor

    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: Jul 6, 2006
  5. Jul 6, 2006 #4
    Thank you. I'll try it!!!
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: The angle between two 3D lines
  1. Angles in 3d (Replies: 2)