Re: Constrained quaternion rotation



"Alberto Bencivenni" <info@xxxxxxxxxxx> wrote in message
news:c1ccd40f-ff86-4b4b-9b51-a3e72c509c3d@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I tryed also this, and the result is that the model rotates around one
World axis.

We are looking to pin down one axis to a World plane instead, it will
move too but always in that plane.

You have a model orientation, and then you have rotations of that
model. My understanding of your problem description is that you
want one axis of the model orientation to be in the world yz-plane
after each rotation is applied. My mistake in suggesting the closest
x-quaternion is that I imagined two axes pinned to the plane, in which
case the third axis is the x-axis and you rotate about it.

Reviewing my first response to your post, what is your objection to that
method? After each rotation is applied to the object, you apply a second
rotation (a "correction", so to speak) to force the body z-axis onto the
world yz-plane. There are infinitely many correction rotations, because
the model can rotate about its body z-axis through any angle you want.
You can constrain this by choosing the body-z-axis-angle so that the
body x-axis and body y-axis are as close as possible to their values
before you applied the motion rotation to the object.

If you want, email to me the original object orientation and a sequence
of quaternions representing the rotations (without corrections). I can
quickly implement what I suggested here and send it to you. The final
rotations might not be what you want, but at least that will allow you
to quantify what you dislike about the behavior during rotations.

Your Quaternion ClosestX (Quaternion p, float minAngle, float
maxAngle) asks for minAngle and maxAngle that don't apply to our case.

My Quaternion class has *two* functions named GetClosestX. The
first listed in the header is
Quaternion GetClosestX() const;
and gives you the closest quaternion of the form cos(t) + sin(t)*i without
angle constraints on t. The second listed in the header is
Quaternion GetClosestX(const Constraints& rkXCon) const;
where you can specify angle constraints on t.

--
Dave Eberly
http://www.geometrictools.com


.



Relevant Pages

  • euler angles ,
    ... talks about fixed axis rotation where you rotate an object about each of the ... It then talks about Euler angles, ... rotations always happen along the updated object axes in some order. ...
    (comp.graphics.algorithms)
  • Re: overlapping area of two ellipses
    ... I have two ellipses, which I know their centers, axis a and axis b and ... rotations for each of them. ... approximates the overlapping area is ok. ... ellipses...So if I can find a reasonable approximation, ...
    (comp.graphics.algorithms)
  • Re: overlapping area of two ellipses
    ... I have twoellipses, which I know their centers, axis a and axis b and ... rotations for each of them. ... Identical ellipses: ... No overlapping ellipses: ...
    (comp.graphics.algorithms)
  • overlapping area of two ellipses
    ... I have two ellipses, which I know their centers, axis a and axis b and ... rotations for each of them. ... approximates the overlapping area is ok. ... ellipses...So if I can find a reasonable approximation, ...
    (comp.graphics.algorithms)
  • Quaternions for a continuous sequence of rotations?
    ... that is equivalent to a sequence of specified rotations, ... Now think of a situation where the axis and angle change ...
    (sci.math)

Loading