Re: rubik's cube

Date : Thu, 01 Nov 2007 14:45:13 +0100
To : XSI(at)Softimage.COM
From : André Adam <a_adam(at)49games.de>
Subject : Re: rubik's cube
I've attached a picture of an euler rubik and a quaternion rubik, side by side (no setup, simple cubes with frozen translation). The cubes performs multiple consecutive twists, the screenshots are each time taken in the middle of the individual rotation phases. I'm still pretty sure we're talking apples and oranges here, but the attached picture depicts what I wanted to point out.

   -André


Brent McPherson wrote:
Well not really.

I have been trying to say that the important part of the problem is the order in which rotations are applied to the cube. (but it could be any object really)

Using quaternions doesn't really change that part of the problem. You still need to remember the sequence of rotations (in the correct order) that are applied to the cube to get the final result.

In this situation mentioning quaternions is a red herring since it doesn't change the problem. (or the fact that rotations are not commutative! ;-)
--
Brent

-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of André Adam
Sent: Thursday, November 01, 2007 1:12 PM
To: XSI(at)Softimage.COM
Subject: Re: rubik's cube

So you have been talking about the twists of the rubik's cube, where I have been talking about the xyz components of Euler rotations.

Brent McPherson wrote:
Andre,

Order of rotations always matters. It is a mathematical consequence of how rotations are defined. (and not something we can work around in this universe anyway ;-)

If you rotate the top face of the cube by 90 degrees and then the left face by 90 degress you will get a different result than rotating the left face followed by the top face. Using quaternions doesn't change this fundamental fact.

I think you are confusing different things. Yes, quaternions have some very nice properties (for interpolation) but it doesn't help when you have stacked rotations. (as in a transform hierarchy)
--
Brent

-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of André Adam
Sent: Thursday, November 01, 2007 12:15 PM
To: XSI(at)Softimage.COM
Subject: Re: rubik's cube

-snip-
"Quaternions are not a magic bullet for rotations. It is simply a different way of interpolating between two orientations.
The problem with the Rubik's cube rig is not the interpolation but rather the fact that for rotations the order of operations is important"
-snip-

Not really, the trick about quaternions is that there is no order of operations, and the path of interpolation is always a straight line. In Euler space, order of operations and interpolation depend on each other.


Brent McPherson wrote:
Quaternions are not a magic bullet for rotations. It is simply a different way of interpolating between two orientations.

The problem with the Rubik's cube rig is not the interpolation but rather the fact that for rotations the order of operations is important and if we perform a rotation A followed by rotation B it will be very different than if we applied B first and then rotation A.

Therefore, the crux of the Rubik's cube rig (which seems to be a thread that comes up for every 3D application at some point) is how we apply a series of rotations to the cube one after the other. Therefore, most solutions I have seen involve stacking all the rotations that are applied to the cube.

I haven't seen one as elegant and animator friendly as Helge's solution though!
--
Brent

-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of André Adam
Sent: Thursday, November 01, 2007 7:59 AM
To: XSI(at)Softimage.COM
Subject: Re: rubik's cube

Depends on the rotation distance you are keyframing. If you rotate a section by 270°, quaternions will make that a -90° move. You would then have to set multiple keyframes on the way as a path guidance for the quaternion math, with all those hassles regarding the fcurve visualisation of quaternions introduced.

    -André


Andy Nicholas wrote:
What would happen if you converted the keys to quaternions? Wouldn't that
solve it?

Andy

JPEG image

  • Follow-Ups:

Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.