Calculate Angle Between 2 Lines in 3D - Easy Formula

  • Thread starter Thread starter ikeoe
  • Start date Start date
  • Tags Tags
    Angle Calculation
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
4 replies · 2K views
ikeoe
Messages
3
Reaction score
0

Homework Statement



Can someone help me to find angle between 2 lines in 3D? I have 2 lines from (-x, 0, -y) to (0, 0, 0) to (0, x, y). I can use CAD to get the answer. But my shop guys will need some kind of formula. The easier way please, thank all.

Homework Equations



Example: (-10, 0, -6) to (0, 0, 0) to (0, 10, 6) is 105.3 degree.

The Attempt at a Solution

 
Physics news on Phys.org
Welcome to PF!

ikeoe said:
Can someone help me to find angle between 2 lines in 3D? I have 2 lines from (-x, 0, -y) to (0, 0, 0) to (0, x, y). I can use CAD to get the answer. But my shop guys will need some kind of formula. The easier way please, thank all.

Hi ikeoe! Welcome to PF!:smile:

(what's CAD? :confused:)

Hint: a.b = |a| |b| cos θ,

so cos θ = a.b/√(a.a)√(b.b) :smile:
 
Say you have three points, A, B, C. You want to find the angle between lines AB and BC.

You can represent lines by vectors. Line AB would be the vector A - B and BC would be the line B - C. Then, to get the angle, you just need to use the dot product formula:

x * y = |x| |y| cos(theta)

Where * is the dot product, |x| is the length of the vector x, and theta is the smallest positive angle between the two vectors.

I'll leave the algebra to you.
 
Thank you, tiny-tim. CAD is Computer Aided Design mostly used from AutoDesk AutoCAD.
 
Great, thanks to Tac-Tics.