RE: Problem with Display.ZAxis Using Different Colors for same Z

  • To: "'Bill Hibbard'" <billh@xxxxxxxxxxxxx>
  • Subject: RE: Problem with Display.ZAxis Using Different Colors for same Z
  • From: "Ken Evans" <evans@xxxxxxxxxxx>
  • Date: Mon, 10 Jul 2006 10:23:15 -0500

I tried using contours as in Test 37 as you suggested.  In that example I am
not sure what the FlatField.fillField() is supposed to be doing.  (There is
no Javadoc, and I didn't understand the code, or at least its purpose, with
a moderate amount of effort.)

Based on that example, I used the mapping:

((col, row, intensity) -> data)

with the maps:

    ScalarMap colMap = new ScalarMap(colType, Display.XAxis);
    ScalarMap rowMap = new ScalarMap(rowType, Display.YAxis);
    ScalarMap funcMap = new ScalarMap(intensityType, Display.ZAxis);
    ScalarMap rgbMap = new ScalarMap(intensityType, Display.RGB);
    ScalarMap conMap = new ScalarMap(intensityType, Display.IsoContour);

This gives the results attached, one with the conMap and the other without.
I note:

1. data is not used and it doesn't make any difference what it is -- all
zeros or using FlatField.fillField().  Thus, the mapping is somewhat
meaningless.  It is all done in the domain.

2. Without the conMap the results are the same as for gmc.setCurvedSize(0)
in my original case.  That is, there is shading, and the colors are at a
consistent height anyway.  Setting gmc.setCurvedSize(n) makes no difference
this time, nor does setTextureEnable(true) (unless I have made a mistake).

3. With conMap, there is shading *and* distinct contours.  These are
(almost) all at a consistent height.  There are a couple points with the
wrong colors.  The basic difference is that the colors are in bands, rather
than continuously varying.  I also always get shading.

4. The time and memory requirements make this mode completely impractical
for my images, which run 2048x2048 or higher.

I also did essentially the same thing using:

((col, row) -> intensity)

using the same maps as above.  This is more sensible for what I am doing.

The results look and behave the same.  I haven't been able to get it to use
texture.  Consequently, it is too slow and memory intensive to be practical
for my uses.  It does 50x50 plots reasonably fast and with reasonable
memory, though.

I should note that the contour calculation itself is time consuming for this
random data.  With smooth data and not using FILL, displaying 3D contontours
is reasonably fast.  Thus there are two problems -- contour calculation and

Thus, so far I have fast with inconsistent height vs. color or slow and
memory intensive with reasonable (but not perfect) height vs. color



Attachment: Gaussian.3.gif
Description: GIF image

Attachment: Gaussian.4.gif
Description: GIF image