Re: Display questions

Hi Doug,

> I have a 3D display with terrain, satellite, lightning,...
> 1) My satellite data looks like (lon,lat) --> val, and I'd like it to
> sit near the "bottom" of the box (low on the Z axis). I tried various
> combinations of constant maps to Display.ZAxis and Display.ZAxisOffset
> as arguments to Display.addReference with no luck, it just sits in the
> middle of the box. I don't really want to complicate the data type. I
> would settle for (lon,lat,lev) --> val but I can't get that to render
> the data in any way other than points. Is (lon,lat) --> (val,z) my only
> option?

ConstantMap(-1.0, Display.ZAxis) should work.  I'm travelling
until the end of August, but if it doesn't work send your code
and one of the other VisAD folks can take a look at it.

> 2) Speaking of points..., the terrain looks pretty cool in point mode,
> but I'd like the satellite as a surface.
> GraphicsModeControl.setPointMode() applies to the entire display. Is
> there a way to display one field in point mode and another not?

The way to do this is to destroy the topology of the terrain
domain Set by changing its MathType from ((lon, lat) -> alt)
to (index -> (lon, lat, alt)).  Something like:

  FlatField terrain = ...
  float[][] vals = terrain.getDomainSet().getSamples();
  float[][] alts = terrain.getValues();
  float[][] new_vals = {vals[0], vals[1], alts[0]};
  FunctionType func = (functionType)
    MathType.stringToType("(index -> (lon, lat, alt))");
  Integer1DSet set = new Integer1DSet(vals[0].length);
  FlatField new_terrain = new FlatField(func, set);

p.s., SGI will make a big announcement today at Siggraph.
The rumor is that they're getting out of the graphics
business.  Another rumors says they will focus on the
Linux server business.  But we all know what rumors are
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738

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