better method for setting Cartesian aspect ratios

There are now two methods in ProjectionControl for setting
aspect ratio:

  public void setAspect(double[] aspect)
         throws VisADException, RemoteException;

  public void setAspect2(double[] aspect)
         throws VisADException, RemoteException;

The first is the same implementation that has been available
previously.  This has the negative affect of squashing text
and other line graphics, and making unrealistic normals for

The second eliminates the negative affects.  Note however it
is only appropriate for displays with ScalarMaps to XAxis,
YAxis and ZAxis.  Displays based on spherical and other non-
Cartesian spatial coordinates are unaffected by setAspect2().

I have changed and in visad/examples
to use setAspect2().  Note that actually combines
both methods:

      control.setAspect2(new double[] {2.0, 1.0, 0.5});
      control.setAspect(new double[] {0.5, 0.5, 0.5});

Passing aspect numbers larger than 1.0 to setAspect2() avoids
text collisions in axis scales, then passing three identical
values (i.e., 0.5) to setAspect() scales the scene to fit in
the window.

Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738

  • 2000 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: