Re: [css-transforms-1] [css-transforms-2] Quaternion rotation when one angle is 0

On Fri, Aug 21, 2015 at 3:22 PM, Shane Stephens <shans@google.com> wrote:
> Hi list,
>
> When interpolating between rotations with different axis alignment, we
> always fall back on matrix decomposition.
>
> However, if one of the angles is 0, then the resulting behavior is that the
> rotation axis snaps immediately to the other axis.

If you don't wanna follow any math, this situation is analogous to
color interpolation when one color is transparent.  A
fully-transparent color loses all hue information, so there's no
preferred way to transition to/from a hued color.

In colors, we have the magic of premultiplication to make this work in
a reasonable and attractive way.  This avoids us having to do the
hacks that were discussed some time ago, where gradients like "red,
transparent, blue" act like the transparent is "transparent red" in
the first transition and like it's "transparent blue" in the second.
To the best of my knowledge, tho, there's no such similar thing for
rotation interpolation, so we *do* have to do hacks like this, and
that's what Shane's proposal does.

~TJ

Received on Saturday, 22 August 2015 00:04:04 UTC