[ODE] Is it possible to Scale a given Inertia-Matrix?

Petr Sovis petr at preality.com
Wed Jun 16 11:07:10 MST 2004


Ixx = SUMi (mi * (yi^2 + zi^2))
Iyy = SUMi (mi * (xi^2 + zi^2))
Izz = SUMi (mi * (xi^2 + yi^2))
Ixy = - SUMi ( mi * xi * yi )
Ixz = - SUMi ( mi * xi * zi )
Iyz = - SUMi ( mi * yi * zi )

assume:  xi = scalex * nxi,  yi = scaley * nyi, zi = scalez * nzi

so the simplier version  :) is :
Ixx = SUMi (mi * (scaley^2 nyi^2 + scalez^2 * nzi^2))
Iyy = ..
Izz = ..
Ixy = - SUMi (mi * scalex * nxi * scaley * nyi)
Iyz =
Ixz = ...

"I" can only be scale when "scalex == scaley == scalez  == scale" because of
Ixx, Iyy, Izz square xi,yi,zi

NewIxx = scale^2 Ixx
NewIyy = scale^2 Iyy
NewIzz = scale^2 Izz
NewIxy = scale^2 Ixy
NewIxz = scale^2 Ixz
NewIyz = scale^2 Iyz

---------------------------------
OR: the extended :) version

Ixx = SUMi (mi * (yi^2 + zi^2)) = SUMi (mi * yi^2) + SUMi (mi * zi^2) = b +
c
Iyy = SUMi (mi * (xi^2 + zi^2)) = a + c;
Izz = SUMi (mi * (xi^2 + yi^2)) = a + b;

Ixy = - SUMi (mi * oldscalex * nxi * oldscaley * nyi)
Iyz =
Ixz = ...

compute a,b,c - solve linear set of equations

and apply the new scale:

NewIxx = nscaley^2 * b + nscalez^2 * c
NewIyy = nscalex^2 * a + nscalez^2 * c
NewIzz = nscalex^2 * a + nscaley^2 * b
NewIxy = nscalex * nscaley * Ixy;
NewIyz = nscaley * nscalez * Iyz;
NewIxz = nscalex * nscalez * Ixz;

Petr Sovis

P.S. I hope, I'm right. Otherwise, sorry for mislead.


----- Original Message ----- 
From: "Bob Dowland" <Bob.Dowland at blue52.co.uk>
To: <ode at q12.org>
Sent: Wednesday, June 16, 2004 10:17 AM
Subject: RE: [ODE] Is it possible to Scale a given Inertia-Matrix?


> The inertia integral is linear in M (total mass) - so straight scaling
could be used as a way to simply change the overall mass of the object.
>
> > > (ok, for boxes it is trivial, because you could do it with
> > scaling the
> > > Parameters for dMassSetBox(..) but how to do it for other
> > Primitives?)
>
> Do it the same way - write the function that computes the integral for
your case and vary the parameters as required.
>
> > -----Original Message-----
> > From: GARY VANSICKLE [mailto:g.r.vansickle at worldnet.att.net]
> > Sent: 16 June 2004 04:25
> > To: ode at q12.org
> > Subject: RE: [ODE] Is it possible to Scale a given Inertia-Matrix?
> >
> >
> > > -----Original Message-----
> > > From: ode-bounces at q12.org [mailto:ode-bounces at q12.org] On
> > Behalf Of Chris
> > > Duwenkamp
> > > Sent: Tuesday, June 15, 2004 12:08 PM
> > > To: ode at q12.org
> > > Subject: [ODE] Is it possible to Scale a given Inertia-Matrix?
> > >
> > > Hallo!
> > >
> > > Is there any possibility to scale a given Inertia-Matrix?
> > >
> > > For example : you have a 1x1x1 Inertia for a Box and want
> > it to scal 2x3x2
> > > so that you have a 2x3x3 box..
> > >
> > > (ok, for boxes it is trivial, because you could do it with
> > scaling the
> > > Parameters for dMassSetBox(..) but how to do it for other
> > Primitives?)
> > >
> >
> > The inertia tensor integral has
> > distance-from-axis-of-rotation as a squared
> > factor, so I don't think scaling works in general.  My calc
> > gets rustier by
> > the year though so I could be wrong....
> >
> > -- 
> > Gary R. Van Sickle
> >
> >
> > _______________________________________________
> > ODE mailing list
> > ODE at q12.org
> > http://q12.org/mailman/listinfo/ode
> >
>
> **********************************************************************
> The information contained in this email and its attachments is
> confidential.  It is intended only for the named addressees
> and may not be disclosed to anyone else without consent from
> Blue 52 Games Limited. Blue 52 give no warranty that this email
> message (including any attachments to it) is free of any virus
> or other harmful matter and accepts no responsibility for any
> loss or damage resulting from the recipient receiving, opening
>  or using it.
> **********************************************************************
>
>
>
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>



More information about the ODE mailing list