Jump to content
  • Advertisement
Sign in to follow this  
Lode

4D rotations

This topic is 4516 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In a 2D rotation, if you rotate a system of two orthogonal axes, both axes have to move, you can't do a 2D rotation where one of the axes stays at it's position. In a 3D rotation however you can rotate a system of three orthogonal axes, and do the rotation around one axis, so that only two of the three axes move. I'm wondering now, in a 4D rotation, is it possible to rotate a system of 4 orthogonal axes so that 2 of those axes remain at their position and 2 move? And in a 5D rotation, is it possible that 3 axes remain at their position while 2 move? And so on...

Share this post


Link to post
Share on other sites
Advertisement
I would argue that you could rotate around 1 axis. In the case of 2D this axis is not part of the space since it has to be perpendicular to the both available vectors of the basis. In 3D and above it is part of the space, so I assume that you could preserve only 1 axis in all spaces of dimensions greater than 2.

This isn't a proof in the mathematical sense, so I may be wrong...

Share this post


Link to post
Share on other sites
[edit]Please ignore this post. I didn't think it through, and so what I wrote it wrong.[/edit]

All axes are orthogonal, so if you rotate along one axis, that axis will remain and all others will move, regardless of the dimensions.

Remember, for 2D rotations you are basically extending the system into 3 dimensions and rotating along the z-axis, which is why both the x-axis and the y-axis move.

[Edited by - Jaywalk on January 12, 2006 6:45:16 AM]

Share this post


Link to post
Share on other sites
I think you are mistaken there, Jaywalk.

Rotations in 2d and 3d are tricky! And I'm saying this, because they create the impression that we need an axis to rotate around. This is false. A rotation is a matrix with determinant==1. It doesn't use any axis information, it can directly alter only TWO of the coordinates of the transformed points. Therefore, a rotation works directly on a plane defined by two of the system's axes, not around an arbitrary axis!

In 2d, there is only one rotation matrix, since there is only one plane, the XY plane. The matrix is:

[ cos(a) -sin(a) ]
[ sin(a) cos(a) ]

In 3d, there are three, since there are three planes XY,YZ,XZ ...

[ cos(a) -sin(a) 0 ] [ 1 0 0 ]
Rxy(a) = [ sin(a) cos(a) 0 ], Ryz(a) = [ 0 cos(a) -sin(a) ]
[ 0 0 1 ] [ 0 sin(a) cos(a) ]

[ cos(a) 0 -sin(a) ]
Rxz(a) = [ 0 1 0 ]
[ sin(a) 0 cos(a) ]

In 4d, there are six planes, XY,XZ,XW,YZ,YW,ZW. Therefore there are 6 matrices:

[ 1 0 0 0 ]
Rzw(a) = [ 0 1 0 0 ]
[ 0 0 cos(a) -sin(a) ], etc...
[ 0 0 sin(a) cos(a) ]

Each of those matrices can only alter two of a point's coordinates. The reason why you can achieve any orientation with one matrix, comes from the fact that you can combine them with multiplication and change base vectors to get the desired effect. However, when viewed as a sequence of rotations, each one affects only a single plane at a time.

Quote:

I'm wondering now, in a 4D rotation, is it possible to rotate a system of 4 orthogonal axes so that 2 of those axes remain at their position and 2 move?

And in a 5D rotation, is it possible that 3 axes remain at their position while 2 move? And so on...

The answer to both your questions is yes.

Rotations are -in essence- matrices. However, for each matrix, there is a set of vectors that do not change direction when multiplied with it. They only change length. These vectors are called eigenvectors of the matrix and the respective factor of change of length, is called its eigenvalue. This is expressed as:
M*v == k*v, where M is the matrix, v is the eigenvector and k its eigenvalue.

A 3d rotation matrix must have eigenvectors too. What vectors will they be? Think about it... You have a matrix that rotates 3d vectors, but there are 3 vectors of the space, that aren't affected by the matrix (in terms of direction)
What will they be? Clearly, for a vector to remain unaffected by a rotation matrix, it should be colinear with the axis perpendicular to the plane of rotation.
The matrix that rotates the XY plane in 3d, has eigenvector {0,0,1} with eigenvalue 1. This means, that all vectors colinear with the rotation axis {0,0,1}, do not change at all.
The matrix that rotates the XY plane in 4D, has eigenvectors {0,0,1,0} and {0,0,0,1}, meaning that these two axes, Z and W, (and any vector parallel to them) are unaffected by the matrix
Similarly, the one in 5D, has eigenvectors {0,0,1,0,0}, {0,0,0,1,0} and {0,0,0,0,1}, therefore these three axes remain unaffected by the rotation.
Generally, you can find the plane of any rotation; just find its eigenvectors, they will be all the axes that are perpendicular to that plane, therefore you will be left with the two that define the plane.

Surprisingly (?), the 2D rotation matrix only has 2 eigenvectors, both of which have complex components. They are {-i,1} and {i,1}, with eigenvalues (cos(a)-i*sin(a)) and (cos(a)+i*sin(a)) respectively.
Therefore, a 2d rotation can be thought of, as a rotation around the complex axis, perpendicular to both {-i,1} and {i,1}

Share this post


Link to post
Share on other sites
So can you say that in a 3D rotation you're rotating around an axis, while in a 4D rotation, you're rotating around a plane, and in higher dimensions you're rotating around hyperplanes?

Share this post


Link to post
Share on other sites
What you can say is that:
1. In Rn, any orthonormal matrix with determinant==1 is a rotation because it preserves distances and relative position among points. (without introducing reflection, change of system's handed-ness).
2. A single rotation, works on a specific plane designated by two of the system's axes. There will be only two coordinates that will be affected by the rotation.
3. Although it's very intuitive -for us humans- to think that there's is always an axis perpendicular to the plane of rotation, the truth is that:

a) there may be none (2d)
b) there may only be one (3d)
c) there may be more than one axis perpendicular to the plane (4D and beyond). In this case, if the dimension of space is n, there will be n-2 axes concurrently perpendicular to the plane of rotation, which will all be eigenvectors of the matrix. The rest 2, will be the original two axes that define the plane of rotation in the first place.
There will also be 2 eigenvectors, for 2 complex axes.

edit:
fixed a mistake in (c)
edit2:
added 'orthonormal' in 1. as suggested by jjd

[Edited by - someusername on January 11, 2006 8:10:41 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by someusername
What you can say is that:
1. In Rn, any matrix with determinant==1 is a rotation because it preserves distances and relative position among points. (without introducing reflection, change of system's handed-ness).
2. A single rotation, works on a specific plane designated by two of the system's axes. There will be only two coordinates that will be affected by the rotation.
3. Although it's very intuitive -for us humans- to think that there's is always an axis perpendicular to the plane of rotation, the truth is that:

a) there may be none (2d)
b) there may only be one (3d)
c) there may be more than one axis perpendicular to the plane (4D and beyond). In this case, if the dimension of space is n, there will be n-2 axes concurrently perpendicular to the plane of rotation, which will all be eigenvectors of the matrix. The rest 2, will be the original two axes that define the plane of rotation in the first place.
There will also be 2 eigenvectors, for 2 complex axes.

edit:
fixed a mistake in (c)



Having a determinant of one seems like a necessary condition, but I don't think it is sufficient. For example, take a diagonal matrix with the following entries along the diagonal {1/2,1,1,2}, it's determinant is 1. This is not a rotation and it scales the components. I think it is necessary for the transformation matrix needs to be orthonormal to achieve that you are stating. Note that an orthogonal transformation has a determinant of 1 or -1.

Share this post


Link to post
Share on other sites
no problem, I just wanted to point out that thinking such concepts -that can be generalized in arbitrary number of dimensions- in 2d or 3d, is usually bad, because they turn out to be over-simplified instances of the original problem and one may end up missing the whole idea.

If you break up an orientation in discrete rotations, they all work on one plane at a time, and -in fact- that plane is defined by the world axes, not arbitrary ones. You'll have to make a similarity transform to another orientation, to force the rotation to change plane.

This is also how quaternions work. Given any two quaternions Q1,Q2, you can always find two orthogonal rotations (rotations that don't affect the planes of each other) that have the same effect as the rotation Q1*v*Q2, on the 4-vector v

To be honest though, I'm having a little trouble understanding the meaning of the complex axes in the eigenvectors...

Share this post


Link to post
Share on other sites
Quote:
Original post by Lode
So can you say that in a 3D rotation you're rotating around an axis, while in a 4D rotation, you're rotating around a plane, and in higher dimensions you're rotating around hyperplanes?


no, thats exactly not the point of the above post.

all rotations take place IN a plane.

the rotation acts AROUND everything that is peripendicular to said plane, an n-2 dimensional space. in 2d thats a point, in 3d an axis, and in 4d, hard to imagine as it is, a plane.

btw, not only 2d rotation matrices have complex eigenvalues. all rotation matrices have 2 complex eigenvalues/vectors, but for higher dimensions, there are also an n-2 set of real, non-rotating eigendirections

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!