On Wed, 20 Jun 2001, Chris Thorne wrote:

> Re the precision problem I was not able to run your applet from the link, maybe it
> was the firewall. Can you please try using doubles not floats for your
> calculations and transforms and let me know how it goes.

My basic scene graph looks like:

root --- position       --- rotation       --- geometry
         TransformGroup     TransformGroup

There is a rotation interpolator linked to the rotation TransformGroup
that spins the object. I do not change the rotation transform (by hand,
the interpolator is the only thing affecting it,) I only change the
position.

The code that I use to change the scene graph is linked to a scroll bar:

public void adjustmentValueChanged(AdjustmentEvent e) {
  if(e.getSource() == zoomBar && orbitTranslation != null) {
    orbitTransform.setTranslation(new Vector3d(0, 0, zoomBar.getValue()));
    orbitTranslation.setTransform(orbitTransform);
  }
}

So the only conversion is from an int (zoomBar.getValue()) to a double.
The jitter though happens all the time, not just when the distance is
changing. If it were a conversion error in the distance it seems like it
would happen only when the value is being changed. A rounding error can
cause a value to be converted to a less precise one, but it would only
happen once, right? Whatever the less precise value is, it wouldn't
change.

This jitter is all the time though as it is spinning which seems like a
rounding error somewhere in the scene graph. The rotation interpolator is
only dealing with small values and it is the insertion of a large
translation into the graph that causes jitter so it seems like it would be
an error in whatever is walking the graph to find the position of
different points.

I am not sure what would be going on with you not being able to see it. It
may have to do with the tags used to embed the applet in the page. I have
browsed it in Mozilla 0.9 and IE 5.5, but I can't speak for older
browsers. Actually now that I remember I think it might have had
something to do with all of the classes being used being packaged in
the jar (instead of having the main one outside and the supporting ones
inside.) You could download the jar and run it; they are executable so you
can do "java -jar Translation.jar" after downloading it from:
http://www.himinbi.org/jars/Translation.jar

Will Holcomb

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to