Signed angle between two 3D vectors

  • Context: Undergrad 
  • Thread starter Thread starter cakeathon
  • Start date Start date
  • Tags Tags
    3d Angle Vectors
Click For Summary

Discussion Overview

The discussion focuses on calculating the signed angle between two 3D vectors, exploring the complexities involved in determining the direction of rotation needed to align one vector with another. Participants consider various mathematical approaches and conceptual frameworks related to vector rotation in three-dimensional space.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant seeks a method to calculate the signed angle between two 3D vectors, noting the known formula for the unsigned angle.
  • Another participant explains that the sign of the angle depends on the axis of rotation and describes how the plane of rotation is defined by the two vectors and the origin.
  • A participant provides examples using specific vectors in the xy-plane, illustrating how the cross product determines the direction of rotation and the resulting angle.
  • Concerns are raised about the consistency of the cross product's handedness and how it affects the determination of the signed angle, particularly when the normal vector flips direction.
  • Discussion includes the idea that there is no inherent distinction between "positive" and "negative" normals in all cases, leading to ambiguity in defining the direction of rotation.
  • Another participant notes the anti-commutative property of the cross product, which further complicates the determination of the signed angle.
  • A related thread is mentioned, suggesting that similar concepts have been discussed in the context of 2D planes, which may also apply to 3D scenarios.

Areas of Agreement / Disagreement

Participants express differing views on how to consistently define the signed angle and the implications of the cross product's handedness. The discussion remains unresolved, with multiple competing perspectives on the topic.

Contextual Notes

Participants highlight limitations related to the definitions of positive and negative normals, as well as the dependence on the chosen axis of rotation. The discussion does not resolve these complexities.

cakeathon
Messages
3
Reaction score
0
Hi all, I am looking for some help please.

I want to calculate the signed angle between two 3D (x,y,z) vectors. I know the formula to find the unsigned angle;

angle = arccos(A.B / |A||B|)

but how do I get the signed angle? From searching through the internet it seems that there isn't an obvious/easy solution ?


To clarify: Assume the two vectors can lie on any plane. Taking the first vector as a reference I want to know the angle that I would need to rotate the first vector to line it up with the second vector.


Can someone more clever than me point me in the right direction, or prehaps offer a solution please ?
 
Physics news on Phys.org
The sign of the angle depends on the axis you use.

Take the angle between x = (0, 1, 0) and y = (1, 0, 0). We see that y is actually x rotated 90 degrees along the z axis (described by the vector (0, 0, 1)). But we can equivalently say that y is x rotated -90 degrees through the negative z axis (described (0, 0, -1)).

Suppose you have two points, p1 and p2, such that p2 is p1 rotated in some plane. A plane is uniquely specified by three points (assuming that all three are distinct and do not lie on a single line). The plane of our rotation is defined by the origin, p1, and p2.

The axis about which they rotate is the normal of this plane. Each plane actually has two normals (a positive one and a negative one), which can be found by taking either the left-handed or right-handed cross product of p1 and p2.

Once you have chosen which axis you want, you can define positive rotation to be the usual counter-clockwise direction along that axis.
 
Thanks Tic Tac, I understand what you are saying. Let me give you an example of my problem:

keeping things simple for my small brain, we have two vectors on (lets say) the xy plane
vec1 = 1,0,0
vec2 = 1,1,0

the cross product, CP = 0,0,+1 (in the 'positive' direction) and the angle between them is 45 degress. (Using right hand rule, vec1 is rotated counter clockwise around CP by 45 degrees to align with vec2). Perfect.


now let's say vec2 = -1,1,0. CP is still 0,0,+1 and the angle is +135 degrees. Perfect.

now let's say vec2 = -1,-1,0. But now the CP flips to the other direction and CP is now 0,0,-1 (in the 'negative' direction) and the angle is +45. But actually I want the angle answer to be -45.


So maybe the question I should ask is how do I work out if the Cross Product of my two vectors is in the 'positive' direction rather than the 'negative' direction for the plane defined by my two vectors. In the real world this plane can be in any orientation.
 
now let's say vec2 = -1,-1,0. But now the CP flips to the other direction and CP is now 0,0,-1 (in the 'negative' direction) and the angle is +45. But actually I want the angle answer to be -45.

You can't have your cake that way.

As long as you've fixed your cross product's handedness, there will be situations where the normal flips. It may look inconvenient to you, but it ensures that the cross product is continuous and the angles are defined in a consistent way.

It might help to realize there is no general distinction between the "negative" normal and the "positive" one. For the z-axis, it makes sense, but take a pair of vectors like [1, 1, 0] and [0, 1, 1]. The two normal possibilities are then [1, -1, 1] and [-1, 1, -1], and it's not clear either is "positive". The best you can do is say one is right-handed versus left handed.

Also, note the property of the cross product that it is anti-commutative. For all a and b, a x b = -(b x a).
 
Tac-Tics said:
It might help to realize there is no general distinction between the "negative" normal and the "positive" one. For the z-axis, it makes sense, but take a pair of vectors like [1, 1, 0] and [0, 1, 1]. The two normal possibilities are then [1, -1, 1] and [-1, 1, -1], and it's not clear either is "positive". The best you can do is say one is right-handed versus left handed.

Yes that does help, I can see your point. Thankyou :smile:
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 26 ·
Replies
26
Views
4K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K