- #1
Bob65536
- 5
- 0
Let me start by saying I do not have a lot of background in linear algebra, but I'm not afraid of learning. I am working on a flash animation with action script. That does the following:
1. Start with a point.
2. Add width so it turns into a line.
3. Rotate about the x-y plane 360 deg.
4. Add height so it turns into a square.
5. Rotate about the x-y plane 360 deg.
6. Add depth so it turns into a cube.
7. Rotate about the x-z plane 360 deg.
8. Add 4 dimensional length so it turns into a hypercube.
...
I plan on going up to about 10 dimensions before the animation ends.
I have to code to:
-Create the wire frame for an nth dimensional cube.
-Orthographic projection of the verticies into 2d space for drawing.
-Animate the new "dimension being added". The last component of the vector for each vertex starts at zero and approaches the correct value over time.
Basically the only thing I am missing is rotating the cube. I am having a hard time generalizing rotations into nth dimensional space. I came across an article on Wikipedia that looks promising at http://en.wikipedia.org/wiki/Rotation_matrix#Axis_of_a_rotation. The formula is:
[tex]R = \mathbf{u}\otimes\mathbf{u} + \cos\theta(1-\mathbf{u}\otimes\mathbf{u}) + \sin\theta[\mathbf u]_{\times}[/tex]
where
R is the rotation matrix.
u is a unit vector.
[tex]\otimes[/tex] is the outer product.
[tex][\mathbf u]_{\times}[/tex] is the skew symmetric form of u.
I do not understand though how you get the skew symmetric form of u. Reading the Wikipedia page on skew symmetric matrices does not help me understand how u goes from a vector to a square matrix. Does anybody have any tips or references that might help please?
Thanks!
1. Start with a point.
2. Add width so it turns into a line.
3. Rotate about the x-y plane 360 deg.
4. Add height so it turns into a square.
5. Rotate about the x-y plane 360 deg.
6. Add depth so it turns into a cube.
7. Rotate about the x-z plane 360 deg.
8. Add 4 dimensional length so it turns into a hypercube.
...
I plan on going up to about 10 dimensions before the animation ends.
I have to code to:
-Create the wire frame for an nth dimensional cube.
-Orthographic projection of the verticies into 2d space for drawing.
-Animate the new "dimension being added". The last component of the vector for each vertex starts at zero and approaches the correct value over time.
Basically the only thing I am missing is rotating the cube. I am having a hard time generalizing rotations into nth dimensional space. I came across an article on Wikipedia that looks promising at http://en.wikipedia.org/wiki/Rotation_matrix#Axis_of_a_rotation. The formula is:
[tex]R = \mathbf{u}\otimes\mathbf{u} + \cos\theta(1-\mathbf{u}\otimes\mathbf{u}) + \sin\theta[\mathbf u]_{\times}[/tex]
where
R is the rotation matrix.
u is a unit vector.
[tex]\otimes[/tex] is the outer product.
[tex][\mathbf u]_{\times}[/tex] is the skew symmetric form of u.
I do not understand though how you get the skew symmetric form of u. Reading the Wikipedia page on skew symmetric matrices does not help me understand how u goes from a vector to a square matrix. Does anybody have any tips or references that might help please?
Thanks!