Rotations in spherical coordinates

Click For Summary
The discussion centers on the nature of rotations in spherical coordinates, specifically questioning whether a transformation defined by T(1,θ,φ) = (1,θ+Δθ,φ+Δφ) constitutes a rotation. It is clarified that T does not preserve distance and is not defined near θ = 0. The uniqueness of rotations taking one vector to another in 3D is debated, with the conclusion that multiple rotations can connect two points on a sphere. Efficient methods for rotating vectors in spherical coordinates are sought, with quaternions suggested as a solution to avoid computational inefficiencies and gimbal lock. The conversation highlights the importance of understanding rotation representations and the mathematical properties of quaternions in this context.
mahnamahna
Messages
5
Reaction score
0
I have a few questions about rotations.

First off if i have two vectors

r_{a,b}=(1,\theta_{a,b},\phi_{a,b})

And i define \Delta\theta=\theta_b-\theta_a and \Delta\phi=\phi_b-\phi_a.

Then take the map T(1,\theta,\phi)=(1,\theta+\Delta\theta,\phi+\Delta\phi).
Is T a rotation? I would think it is, but I can't imagine what the rotation matrix would be or what the rotation axis would be.

Also, is a rotation which takes a vector \vec{r_a} to \vec{r_b} unique? I would think not as you could always compose a rotation about \vec{r_b} afterwards and get a new rotation. But various sources online seem to talk about "the" rotation which takes one to the other.

Lastly any helpful resources on rotations especially in higher dimensions (which is my next project) would be helpful. Thanks a lot for any input you can give me, I have terribly confused myself.
 
Physics news on Phys.org
welcome to pf!

hi mahnamahna! welcome to pf! :smile:

(have a delta: ∆ and a theta: θ and a phi: φ :wink:)
mahnamahna said:
take the map T(1,\theta,\phi)=(1,\theta+\Delta\theta,\phi+\Delta\phi).
Is T a rotation? I would think it is, but I can't imagine what the rotation matrix would be or what the rotation axis would be.

T isn't even defined near θ = 0 (since 0 ≤ θ ≤ π).

and T doesn't preserve distance.
Also, is a rotation which takes a vector \vec{r_a} to \vec{r_b} unique?

i don't understand … what exactly are ra and rb? :confused:
 
Hi, thanks for the response.

If we don't require a unique representation of each point in spherical coordinates than we can allow θ to have any value we want so the map will be defined there. Also can you give an example of T not preserving distance? I am having trouble coming up with one.

ra and rb are just any two (unit) vectors. My question is in 3D is there a unique rotation which takes one vector to another? Thanks again.
 
hi mahnamahna! :smile:
mahnamahna said:
Hi, thanks for the response.

If we don't require a unique representation of each point in spherical coordinates than we can allow θ to have any value we want so the map will be defined there. Also can you give an example of T not preserving distance? I am having trouble coming up with one.

T moves any circle of latitude onto a different circle of latitude … it will have a different length :wink:
ra and rb are just any two (unit) vectors. My question is in 3D is there a unique rotation which takes one vector to another?

no of course not …

there are infinitely many circles joining two points on a sphere, from the great circle between them down to the circle with those two points as diameter
 
Thanks a lot for your clear explanations! So with just shifting the angles out, I don't suppose you know of a efficient way to rotate vectors in spherical coordinates?
 
i don't understand the question :confused:

a rotation is a rotation … just rotate them
 
I know, I was just asking if there is a computationally efficient way to calculate the rotation. I have the points all in spherical coordinates whether there was a better way to rotate them than transform to cartesian and then back to spherical.
 
mahnamahna said:
I know, I was just asking if there is a computationally efficient way to calculate the rotation. I have the points all in spherical coordinates whether there was a better way to rotate them than transform to cartesian and then back to spherical.

With regards to rotations, Ken Shoemake published an article on the use of quaternions in rotations. Also like tiny-tim has said, rotations preserve length and many rotation groups have a determinant of 1.

Also when you are rotating in 3-space you have six degrees of freedom of which 3 degrees are rotational and the other three translational.

You should look into quaternions for rotation. The basic idea is that you choose a unit vector to rotate around and then your provide the counter clockwise angle to rotate around: in other words you put your unit vector at the origin and it points wherever and you rotate counter clockwise around the vector.

When you deal with multiple rotations, you can use methods of interpolation like SLERPing which interpolates between two quaternions and a parameter in the domain [0,1].

When you use quaternions you avoid gimbal lock as well.

The basic way to do a rotation is to set your quaternion up, perform the rotation, convert to matrix representation, and then use rot = M x V where V is your vector and rot is the rotated vector.

So in hindsight when you rotate it might be better to think about a rotation in the angle-axis formulation instead of the euler angle formulation.
 
All pure rotations have determinant value +1. Rotations + reflections (rotoreflections) have determinant value -1. It's rather easy to prove that that's the case:

R.RT = I
det(R)*det(RT) = det(R)2 = 1

Quaternions are not as frightening as they might at first seem. They consist of 4-vectors which can be decomposed into a scalar part and a 3-vector part. In the axis-angle formulation of rotation:

q0 (scalar) = cos(a/2)
qi = ni*sin(a/2)
for angle a and direction vector n. One can also express quaternions in terms of Euler angles. Note a sign ambiguity: adding 360d to a reverses the sign, but does not change the rotation matrix. That matrix is:

Rij = 2qiqj + 2q0eijkqk + dij(q02 - qvec2)

Be careful of sign conventions on the second term, the eijk one.

Quaternions can also be implemented with Pauli matrices:

Q = q0*I + i*qk(sigma)k

Be careful of sign conventions on the second term also.

For rotation matrices, quaternions are normalized q02 + qvec2 = 1


For rotating a vector n1 to n2, I've found this formula for the quaternion:

qscalar = (cos(mix)*(1 + n1.n2))/sqrt(2(1 + n1.n2))
qvector = (- cos(mix)*cross(n1,n2) + sin(mix)*(n1 + n2))/sqrt(2(1 + n1.n2))
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 3 ·
Replies
3
Views
10K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
22
Views
4K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K