# Homework Help: Angle Calculation

1. Oct 20, 2008

### ikeoe

1. The problem statement, all variables and given/known data

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.

2. Relevant equations

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

3. The attempt at a solution

2. Oct 20, 2008

### tiny-tim

Welcome to PF!

Hi ikeoe! Welcome to PF!

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

so cos θ = a.b/√(a.a)√(b.b)

3. Oct 20, 2008

### Tac-Tics

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.

4. Oct 20, 2008

### ikeoe

Thank you, tiny-tim. CAD is Computer Aided Design mostly used from AutoDesk AutoCAD.

5. Oct 20, 2008

### ikeoe

Great, thanks to Tac-Tics.