The angle between two 3D lines

  • Thread starter Thread starter somy
  • Start date Start date
  • Tags Tags
    3d Angle Lines
Click For Summary

Discussion Overview

The discussion focuses on how to calculate the angle between two lines in three-dimensional space, addressing both theoretical and practical aspects relevant to coding applications.

Discussion Character

  • Technical explanation, Homework-related

Main Points Raised

  • One participant requests assistance with calculating the angle between two 3D lines for coding purposes, expressing confusion over the solution.
  • Another participant suggests using the dot product to find the angle and provides a link for further information.
  • A third participant explains that if the two lines intersect, the angle can be calculated using the formula cos(θ) = (u·v) / (|u||v|), where u and v are direction vectors of the lines. They note that if the lines do not intersect, there is no angle between them.
  • A later reply expresses gratitude and indicates an intention to try the suggested method.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the conditions under which the angle can be calculated, as there are differing views on the case of intersecting versus non-intersecting lines.

Contextual Notes

The discussion does not clarify the assumptions regarding the definitions of the lines or the context in which the angle is to be calculated, particularly in cases where the lines do not intersect.

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!
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 8 ·
Replies
8
Views
9K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
17
Views
3K
  • · Replies 21 ·
Replies
21
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K
Replies
1
Views
2K