changeset 20:ebc55ce699ec

Rotate the other way around: z, y, x - more useful to us
author Josef "Jeff" Sipek <jeffpc@optonline.net>
date Sat, 03 Dec 2005 00:35:58 -0500
parents 4722afb8751c
children d51cb04bdbee
files rotate.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/rotate.c	Sat Dec 03 00:35:05 2005 -0500
+++ b/rotate.c	Sat Dec 03 00:35:58 2005 -0500
@@ -3,13 +3,13 @@
 #include <string.h>
 #include <math.h>
 
-void rotate_header(float omega, float phi, float rho)
+void rotate_header(float a, float b, float g)
 {
 	printf("%f %f %f\n"
 	       "%f %f %f\n"
-	       "%f %f %f", cos(phi)*cos(rho), cos(rho)*sin(omega)*sin(phi)-cos(omega)*sin(rho), cos(omega)*cos(rho)*sin(phi)+sin(omega)*sin(rho),
-	       		   cos(phi)*sin(rho), cos(omega)*cos(rho)+sin(omega)*sin(phi)*sin(rho), -cos(rho)*sin(omega)+cos(omega)*sin(phi)*sin(rho),
-			   -sin(phi), cos(phi)*sin(omega), cos(omega)*cos(phi));
+	       "%f %f %f", cos(a)*cos(b), -cos(g)*sin(a)+cos(a)*sin(b)*sin(g), cos(a)*cos(g)*sin(b)+sin(a)*sin(g),
+	       		   cos(b)*sin(a), cos(a)*cos(g)+sin(a)*sin(b)*sin(g), cos(g)*sin(a)*sin(b)-cos(a)*sin(g),
+			   -sin(b), cos(b)*sin(g), cos(b)*cos(g));
 }
 
 int main(int argc, char** argv)