[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Thread Index]
[Monthly Archives] [List Home]

Re: [Virtools] Flipping axis.



Great topic!  It is a good exercise for studying all of those transforms...

A couple of comments:
1) The scale of the 3D Frames is set to X=2.  This will contribute to an
increased round off error amount, particularly if the rotation is about Z so
I suggest that, in your final version, you ensure that the scale is constant
in each direction.
2) Performing incremental rotates, rather than rotating to an absolute
angle, also contributes to round off error.

Try running the cmo and hold down the Right arrow key.  It should take 5 to
10 revolutions before the frame has disappeared from the screen.

Now, set the scale for each frame to (1,1,1), set the IC on each frame, and
try again.  It should take longer than my patience for the frame to go off
screen.

I believe that this issue was (sort of) addressed on the Discussion board
with respect to rotating tires on a car model.

It seems to me that the most stable version would be to turn the problem on
its head and to do the classic:
1) make the targetEntity a child of the centerOfWorld
2) rotate the centerOfWorld as desired, keeping hierarchy

This assumes that you want the centerOfWorld to always face the
targetEntity, etc.

The attached cmo renames the entities and illustrates what I mean.  You can
change the referential on Rotate to Center or World to get different control
effects.

If you watch the output of Op in Trace mode, you will see that the round off
error in this approach is much less and will actually increase and decrease
for a lower long-term error.

I'm sorry, but I don't have the time to do the script for absolute rotation
rather than relative rotation... I suspect that it is considerably more
complex :-)

Hope this helps.

David Callele

----- Original Message -----
From: "ChrGarnier" <chrgarnier@wanadoo.fr>
To: "Virt_User_Group" <virtools-user-group@lists.theswapmeet.com>
Sent: Tuesday, November 06, 2001 1:35 PM
Subject: Re: [Virtools] Flipping axis.


Flipping axis.I do agree with Mr Araya.
Set the orientation using obj1-obj2 "distance" as Up and X cross Y as Z with
X being the actual Right.
Do not forget to Normalize both.
Well this is the solution I already sent.
See the companion file!

Christian Garnier.
  ----- Original Message -----
  From: Araya
  To: Virtools-User-Group (E-mail)
  Sent: Tuesday, November 06, 2001 9:56 AM
  Subject: Re: [Virtools] Flipping axis.


  Hi there,

  I don't think the "Look At" + "Keep At Constant Distance" will work, as
the "Look At" building block has a flipping effect at the poles.
  To avoid such an effect, you need to provide an additionnal information
about the "up" direction you suppose for your world.
  The "Look At" bb is an easy to use bb and it solve most of the cases, as
in most cases we only want to provide a looking direction implying the
natural "up" direction to be the Y world axis [0,1,0].

  The solution is to specify a custom "up" direction, which impede the
flipping effect. But this direction isn't absolute. Let say we choose the
world X axis [1,0,0]. Then the flipping effect will appear along the X
poles.

  - So the first solution I found is to given the orientation an "up"
direction to be the Y axis of the 3d frame it self. That way the flipping
effect would only appear if the 3d frame rotate about more than 90 degrees
(which should append in a constant motion).
  To do so use the "Set Orientation" building bock. "up" pIn would be the Y
axis of the "targetEntity" frame (get it with the "Get Up" paramOp).
  As saw that you wanted your orientation to look toward the Y axis. In this
case set "local up" pIn to be [0,1,0].

  - Another solution is to set the rotation in polar coordinates, or simply
increment the rotation as I did in the attached .cmo.

  Hope this help.

  Araya

    ----- Original Message -----
    From: tomas sala
    To: Virtools-User-Group (E-mail)
    Sent: Monday, November 05, 2001 10:45 PM
    Subject: Re: [Virtools] Flipping axis.



    if you don't want the flipping, as I understand from your question..
    Try using a lookat BB to target the object towards te center frame, a
keep at constant distance BB , to keep it in a spere..
    and use a translate to translate the object over its axis . since it is
rotating the translation wil rotate as well. keeping it moving in a sphere,
    The keep at constant distance BB is to adjust for any possible
inaccuracy's (i don't think its neccesary with the lookat at 100 percent)

    and i think then it will nicely flip over the poles since it's just a
local translate and not a rotation.. not quite sure.. but that's my penny...

    otherwise its back to making exceptions and using math..

    hope this helps.

    Tomas Sala
    tomas@littlechicken.nl

    www.littlechicken.nl
      ----- Original Message -----
      From: Kam Memarzia
      To: Virtools-User-Group (E-mail)
      Sent: Monday, November 05, 2001 5:46 PM
      Subject: [Virtools] Flipping axis.


      Hi,

      I've been hitting my head against this seemingly simple puzzle for
some time & I wonder if there is a genius out there who can resolve it.

      In the attached .cmo you'll find two 3dFrames (who at the moment are
looking at each other.)

      The effect I am after is that of a moving entity whose local
oreintation is set such that its `Direction` is always pointing down towards
the centre of the sphere.

      The puzzle is how to resolve this direction without the Flipping
effect at the poles.

      So far I can not get past : "As the entity moves over each pole the
other two axis flipp around".

      See attached.

      Thanks for your help.

      Kam Memarzia






Rotate00.cmo


References: