Title: The 4d rotation matrix! Post by: DarkBeam on November 20, 2016, 12:33:21 PM I calculated it using a cute online tool.
Can be obtained multiplying six matrixes each for a 2d rot... I just hope that I copied it correctly. First row (x); aeg; -bci-adfi-aehj; bdk-acfk+adfjl; -aehik+bcjk+adfjk-acfl. Second row (y); beg;aci-bdfi-behj;-adk-bcfk-behil-acjl+bdfjl;-behik-acjk+bdfjk+adl+bcfl. Third row (z); fg; dei-fhj;cek-fhil-dejl; -fhik-dejk-cel. Last row (w); h; gj; gil; gik. Cos xy=a,sin xy=b, then yz, xz, xw,yw and last zw. (Abcdefghijkl) That should give all possible 4d rotations. Title: Re: The 4d rotation matrix! Post by: claude on November 20, 2016, 12:56:14 PM The trouble with doing it that way is that animations will look weird, because the 6 base rotations don't all commute (ie, A * B != B * A). and so the order matters (eg, if you want to double the rotation angles you go from ABC to AABBCC instead of ABCABC).
There's a better way to do it using a pair of quaternions, with a qslerp (quaternion spherical linear interpolation) technique for tweening rotational animations. See: Quote http://www.cs.indiana.edu/pub/techreports/TR406.pdf which presents "a new form of the 4D orthogonal rotation matrix parameterized in terms of two separate 3-sphere coordinates", as well as the rolling ball algorithm for interactive orientation adjustment"Rotations for N-Dimensional Graphics" Andrew J. Hanson Title: Re: The 4d rotation matrix! Post by: Sabine on November 20, 2016, 01:40:49 PM No idea if this is any help, cause I really understand almost none of it ;D http://www.geeks3d.com/20141201/how-to-rotate-a-vertex-by-a-quaternion-in-glsl/ in which he/she transforms rotation axis and position into two quaternions (with glsl-code... ;D) |