Title: Stupid idea? Gimbal lock Post by: ZsquaredplusC on December 03, 2009, 04:19:37 AM I thought this might be worth throwing out there....
The discussions of the various formulas include rotating around X then Y then Z etc, and if the order of rotations are changed then the result is different. This reminds me of "gimbal lock" when rotating angles in 3D http://en.wikipedia.org/wiki/Gimbal_lock The usual fix is to use quaternion rotations so the resulting rotation is correct and gimbal free no matter what the rotated angles are. Is this worth trying with the r,phi and theta calcs? Then there is no worry of doing the Y first if X angle is 0 etc. Title: Re: Stupid idea? Gimbal lock Post by: Tglad on December 03, 2009, 08:25:55 AM If you replace phi and theta with a quaternion representing the rotation then you end up with the rounded mandelbrot which is like a lathed mandelbrot spinning around its main axis. You are right (I think) that gimbal lock is one way of looking at the problem... the lock points are singularities and this is where the (remaining) problem lies.. as any small shape that gets rotated to near the lock point will get squashed in one direction. You'll notice that the Z^2 on a 2d mandelbrot will never squash a small shape (e.g. 4 points in a square) in any one direction... it will only scale the whole shape or rotate the whole shape. I think the perfect 3d mandelbulb would likewise only scale and rotate small shapes when it maps onto itself. Its called a conformal map. This means using coordinates that don't have singularities and don't have gimbal lock. The 'hairy ball problem' states that there are no coordinates on a sphere that are singularity-free, so I think the 3d mandelbulb will not use a rotation around a sphere, but a different shape. |