The angle between two 3D lines

  • Thread starter somy
  • Start date
  • #1
137
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.
 

Answers and Replies

  • #3
HallsofIvy
Science Advisor
Homework Helper
41,833
961
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:
  • #4
137
0
Thank you. I'll try it!!!
 

Related Threads on The angle between two 3D lines

Replies
2
Views
686
Replies
7
Views
6K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
2
Views
4K
  • Last Post
Replies
7
Views
12K
Replies
12
Views
2K
  • Last Post
Replies
2
Views
31K
  • Last Post
Replies
2
Views
17K
  • Last Post
Replies
3
Views
4K
  • Last Post
Replies
3
Views
3K
Top