Created
October 1, 2013 17:06
-
-
Save apricote/6781796 to your computer and use it in GitHub Desktop.
Rotation Matrixes for 4 Dimensions
#### Axis that stay the same ####
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########## zw ########### | |
cos -sin 0 0 | |
sin cos 0 0 | |
0 0 1 0 | |
0 0 0 1 | |
########## yw ########### | |
cos 0 sin 0 | |
0 1 0 0 | |
-sin 0 cos 0 | |
0 0 0 1 | |
########## xw ########### | |
1 0 0 0 | |
0 cos -sin 0 | |
0 sin cos 0 | |
0 0 0 1 | |
########## xy ########### | |
1 0 0 0 | |
0 1 0 0 | |
0 0 cos sin | |
0 0 sin cos | |
########## xz ########### | |
1 0 0 0 | |
0 cos 0 sin | |
0 0 1 0 | |
0 -sin 0 cos | |
########## yz ########### | |
cos 0 0 sin | |
0 1 0 0 | |
0 0 1 0 | |
-sin 0 0 cos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
double[][] zw = { { cos, -sin, 0, 0 }, | |
{ sin, cos, 0, 0 }, | |
{ 0, 0, 1, 0 }, | |
{ 0, 0, 0, 1 } }; | |
double[][] yw = { { cos, 0, sin, 0 }, | |
{ 0, 1, 0, 0 }, | |
{ -sin, 0, cos, 0 }, | |
{ 0, 0, 0, 1 } }; | |
double[][] xw = { { 1, 0, 0, 0 }, | |
{ 0, cos, -sin, 0 }, | |
{ 0, sin, cos, 0 }, | |
{ 0, 0, 0, 1 } }; | |
double[][] xy = { { 1, 0, 0, 0 }, | |
{ 0, 1, 0, 0 }, | |
{ 0, 0, cos, sin }, | |
{ 0, 0, -sin, cos } }; | |
double[][] xz = { { 1, 0, 0, 0 }, | |
{ 0, cos, 0, sin }, | |
{ 0, 0, 1, 0 }, | |
{ 0, -sin, 0, cos } }; | |
double[][] yz = { { cos, 0, 0, sin }, | |
{ 0, 1, 0, 0 }, | |
{ 0, 0, 1, 0 }, | |
{ -sin, 0, 0, cos } }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment