static const char sccsid[] = "@(#)hypertorus.c 1.2 05/09/28 xlockmore";
#endif
-/* Copyright (c) 2003-2005 Carsten Steger <carsten@mirsanmir.org>. */
+/* Copyright (c) 2003-2007 Carsten Steger <carsten@mirsanmir.org>. */
/*
* Permission to use, copy, modify, and distribute this software and its
* C. Steger - 03/05/18: Initial version
* C. Steger - 05/09/28: Added the spirals appearance mode
* and trackball support
+ * C. Steger - 07/01/23: Improved 4d trackball support
*/
/*
#define DTHETA 2.1
#define DTHETA_STR "2.1"
-#define DEF_DISPLAY_MODE DISP_SURFACE_STR
+#define DEF_DISPLAY_MODE DISP_TRANSPARENT_STR
#define DEF_APPEARANCE APPEARANCE_BANDS_STR
#define DEF_COLORS COLORS_COLORWHEEL_STR
#define DEF_3D_PROJECTION DISP_3D_PERSPECTIVE_STR
rotatewx(m,al);
rotatewy(m,be);
rotatewz(m,de);
- rotatexy(m,ze);
rotatexz(m,et);
+ rotatexy(m,ze);
rotateyz(m,th);
}
r12 = 2.0*(q[1]*q[2]+q[0]*q[3]);
r22 = 1.0-2.0*(q[1]*q[1]+q[0]*q[0]);
- ze = atan2(-r12,r22)*180.0/M_PI;
- et = atan2(r02,sqrt(r00*r00+r01*r01))*180.0/M_PI;
- th = atan2(-r01,r00)*180.0/M_PI;
+ et = atan2(-r12,r22)*180.0/M_PI;
+ th = atan2(r02,sqrt(r00*r00+r01*r01))*180.0/M_PI;
+ ze = atan2(-r01,r00)*180.0/M_PI;
- rotateall(al,be,de,ze,et,th,m);
+ rotateall(al,be,de,ze,et,-th,m);
}