THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/01/2007 at 01:20, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.2-10.0
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
---------
I'm going to frame the question differently in an attempt to arouse the interest of the developers. :)
We all know that Ken Shoemake has a general solution for converting matrices to Euler angles. But, as admitted in the text itself, the solutions are not unique (there are multiple possible Euler angles for any matrix). This is not useful for my purposes. The results must be consistent with the Euler angle system in place and HPB results in discontinous results!
The problem is the fact that Cinema 4D uses a hybrid rotation system - namely its version of HPB - so as to avoid gimbal lock. This introduces even more complexity into any solution whereby the HPB rotations are converted to Euler angles (just six possible permutations: XYZ, XZY, YXZ, YZX, ZXY, ZYX). Since HPB rotatons 'jump' to other values nonsequentially to avoid gimbal lock, simple procedural solutions require more information on the system. To date (several years) I have found no comparable system on which to base calculations!
I have just been considering a tabular solution, but the storage required is ridiculous (over 3GB! even for 1 degree resolutions). Although I know that it is difficult to wrench yourselves from divulging the magical formulas for HPB angle calculations, it would be very helpful to understand them to solve the problem of converting these mysterious angle representations to a non-gimbal-lock-friendly system such as these ordered Euler angles.
It is funny that Euler to HPB is as simple as rotation matrix concatentation, but vice versa is impossibly difficult - or, should I say, so inconsistent as to be not viable. The key here seems to be knowing when, why, and how HPB swaps values or changes values discontinuously to avoid gimbal lock - these make all standard calculations impossible.
This conversion problem has caused me much grief. I cannot use any standard Cinema 4D features to advantage while my systems must remain unidirectional and closed to them (IK being the current concern). Now I'm beggging!
Thank you very much,