easiest way to store orientation and do rotations of a ball?

  • Follow


Hey guys,

I'm currently making a program which imitates physics of a rotating
ball. Currently I'm trying to figure out the best way to store the
orientation of a ball, and then apply further transformations to it.
Currently the way that I'm thinking of storing x,y,z positions of the
initial "top" of the ball, then somehow using opengl to rotate to that
position and draw it (although I haven't figured out how to do this).
These positions x,y,z, positions are modified by the ball rolling
(rotated first by the angular momentum of the x axis, then by the y).
Does anyone know how to implement this, or do they have a better way
of implementing storing orientation? Also any help with rolling ball
physics would be a big help.

- Steve
0
Reply stevovore 10/29/2003 11:57:35 PM

"Steve" <stevovore@yahoo.com> wrote in message
news:ae94935c.0310291557.1469b102@posting.google.com...
> Hey guys,
>
> I'm currently making a program which imitates physics of a rotating
> ball. Currently I'm trying to figure out the best way to store the
> orientation of a ball, and then apply further transformations to it.
> Currently the way that I'm thinking of storing x,y,z positions of the
> initial "top" of the ball, then somehow using opengl to rotate to that
> position and draw it (although I haven't figured out how to do this).
> These positions x,y,z, positions are modified by the ball rolling
> (rotated first by the angular momentum of the x axis, then by the y).
> Does anyone know how to implement this, or do they have a better way
> of implementing storing orientation? Also any help with rolling ball
> physics would be a big help.

You should try to look for some information on quaternions. That's how
rotations are usually handled.

    Alan.


0
Reply Alan 10/30/2003 8:12:16 PM



Alan Garny wrote:
> 
> "Steve" <stevovore@yahoo.com> wrote in message
> news:ae94935c.0310291557.1469b102@posting.google.com...
> > Hey guys,
> >
> > I'm currently making a program which imitates physics of a rotating
> > ball. Currently I'm trying to figure out the best way to store the
> > orientation of a ball, and then apply further transformations to it.
> > Currently the way that I'm thinking of storing x,y,z positions of the
> > initial "top" of the ball, then somehow using opengl to rotate to that
> > position and draw it (although I haven't figured out how to do this).
> > These positions x,y,z, positions are modified by the ball rolling
> > (rotated first by the angular momentum of the x axis, then by the y).
> > Does anyone know how to implement this, or do they have a better way
> > of implementing storing orientation? Also any help with rolling ball
> > physics would be a big help.
> 
> You should try to look for some information on quaternions. That's how
> rotations are usually handled.

.... or matrices.

Using Euler angles as the OP seems to do, almost always leads to
serious problems, especially if rotations can occour in any order.
Any book on computer graphics contains a chapter about matrices
and/or quaternions.

-- 
Karl Heinz Buchegger
kbuchegg@gascad.at
0
Reply Karl 10/31/2003 11:07:05 AM

Karl Heinz Buchegger wrote:
> Alan Garny wrote:
>>
>>You should try to look for some information on quaternions. That's how
>>rotations are usually handled.
> 
> 
> .... or matrices.
> 

Yep. Matrices will work just fine.

The only thing quaternions can do which matrices can't is
interpolation of two orientations. After that it's a matter
of personal taste.


-- 
<\___/>          For email, remove my socks.
/ O O \
\_____/  FTB.    Why isn't there mouse-flavored cat food?



0
Reply fungus 10/31/2003 11:58:18 AM

3 Replies
363 Views

(page loaded in 0.388 seconds)

Similiar Articles:













7/26/2012 5:34:28 PM


Reply: