Re: Problem imaging a matrix

Hi Wallace,

> I've been following through Ugo Taddei's VisAD Tutorial. In section 4.3 of
> the tutorial, it discusses an example where, among other things, a color
> and height mapped image of a matrix is obtained. I decided to substitute my
> own matrix and the resulting image didn't look like what I expected. So I
> decided to test things with an identity matrix instead. I expected to see a
> ridge along the diagonal. Instead I obtained a series of peaks (going to 1)
> and valleys (going to zero) along the diagonal. There are 5 peaks and 4
> valleys. I've obtained the same results with both Java3D 1.2.2 and 1.3.
> Interestingly, if I comment out the line which adds the altitude map to the
> display, the resulting flat display is appropriately color mapped along the
> diagonal as I would expect. So whatever "problem" I'm having seems to be
> only in the z-mapping.
> 
> Are my assumptions about what I should expect correct? Any suggestions
> about what may be occurring would be greatly appreciated.

I order to speed up rendering, by default VisAD reduces the
resolution of terrain surfaces using texture mapping.  You
can disable this in two different ways:

  GraphicsModeControl mode = display.getGraphicsModeControl();
  mode.setTextureEnable(false);  // disable texture mapping

or:

  GraphicsModeControl mode = display.getGraphicsModeControl();
  mode.setCurvedSize(1); // map texture onto full-res terrain

Cheers,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html