> Date: Wed, 19 Feb 2003 09:36:08 +1000 > From: Jasmine Kwok <[EMAIL PROTECTED]> > > I checked for if (1+(dy*scale_factor)) to ensure that its greater than 0 > before i go through the transformation but it doesn't help.
If this is a view platform transform, is the scaling the same across X, Y, and Z? Are you getting any BadTransformExceptions? (Catch BadTransformException when doing a TransformGroup.setTransform() to be sure). Is there any message from the JVM when you find your application hanging? When zooming at the extreme ends of the scale, it's not uncommon to get non-congruent transforms due to numerical inaccuracy, especially if you're accumulating incremental zoom factors into a single matrix. > I do not quite understand about the part on using Math.pow. Do you mean that > I can try to replace if (1+(dy*scale_factor)) with Math.pow(2.0, exp)? And > exp will be calculated according to the mouse movement? No, it was just an alternative way to compute a scale factor. I just suggested it because it gets rid of the problem of scaling to 0 and produces a nice geometric zoom instead of a linear zoom, without having to accumulate incremental scale factors. But it's not at the root of your problem. -- Mark Hood =========================================================================== 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".
