[ODE] Submitting documentation

Russ Smith russ at q12.org
Fri May 30 11:49:01 2003


> Hmm, well this may do what I need, as long as I give a small size for that
> negligible dimension.  So do you think it would be wise to incorporate a
> second set of functions that take total mass, or just leave people to use
> dMassAdjust()?

i guess it's not too hard to add a second set of functions. they would
call the density based functions then call dMassAdjust(). note that when
you intend to use dMassAdjust(), you can just use a density of 1.0 in the
mass setting function, you don't need to calculate the 'real' density
(as both the mass and the density simply scale the mass numbers).

the reason i made the mass functions take the density instead of the total
mass is that you can make a dMassAdjust that rescales the mass (because
the old mass is in the mass object) but you can not rescale the density
(because then the mass object would need to record the object's volume as
well, which is kind of annoying to carry around in a mass object).

russ.

--
Russ Smith
http://www.q12.org/

On Fri, 30 May 2003, Martin C. Martin wrote:

>
>
> Russ Smith wrote:
> >
> > hi martin,
> >
> > more documentation is greatly appreciated!
>
> I'll do my best.
>
> > as for the mass functions - i've been using the convention that mass
> > setting functions take the density, not the total mass
>
> Yes, and we should definitely keep those, although I think having a second
> set that takes the total mass instead of density is useful some times.
> For example, when trying to model a real object, you're more likely to
> know the mass than the density, and that may be more intuitive to
> manipulate.  Sure, you can calculate the density from the mass if you go
> through the volume calculation, but that can be awkward and error prone.
> Also, in my application, I want simulate a rectangle with "normal" width
> and length but negligible thickness.  With the "total mass" functions you
> can specify a dimension of zero, as long as the other two are nonuser.
>
> > but it you want to specify the total mass
> > and not the density, then you call dMassAdjust() giving it the previously
> > initialized mass object and the new total mass.
>
>
> Thanks,
> Martin
>