Angle difference between 2 directions in 3d

Keshawn Moran

Keshawn Moran

Answered question

2022-11-07

Direction in 3d space described with 2 values: Horizontal and Vertical (x and y) ranging the full 360 degrees (from -180 to +180), thus describing every possible view direction.
It seems fairly straight forward to me, that the angle between (0,0) and (5,0) would be 5 degrees.
But what is the angle between (0,0) and (5,5). If it was 2 points in 2d I would use Pythagoras theorem; having the difference be ( 5 2 + 5 2 ). But I don't think that would apply in 3d? How do I go about calculating the angle between these 2 directions?

Answer & Explanation

Regan Holloway

Regan Holloway

Beginner2022-11-08Added 17 answers

Step 1
If I understood well, by a "direction" ( ϕ , θ ) (I assume the angles between 0 and 2 π) you mean the unit vector u ( ϕ , θ ) = ( cos θ cos ϕ , cos θ sin ϕ , sin θ ). The angle α between u ( θ , ϕ ) and u ( θ , ϕ ) may be calculated by taking the scalar product u ( θ , ϕ ) u ( θ , ϕ ) as follows: cos α = cos θ cos θ ( cos ϕ cos ϕ + sin ϕ sin ϕ ) + sin θ sin θ = cos θ cos θ cos ( ϕ ϕ ) + sin θ sin θ ,
Step 2
Hence α = cos 1 ( cos θ cos θ cos ( ϕ ϕ ) + sin θ sin θ )

Do you have a similar question?

Recalculate according to your conditions!

New Questions in High school geometry

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?