More GriddedNDSet Questions
Kenneth Evans, Jr.
evans at aps.anl.gov
Sat Apr 7 21:03:03 MDT 2007
Bill,
What I see is pairs of triangles when I zoom in. That is probably what
a curved texture map looks like? I can send an image if that would help,
but I don't think I am seeing anything unusual. It's just it is different
when using a Gridded2DSet than when using a Linear2DSet, even though the
grid data is equivalent.
Thanks,
-Ken
_____
From: owner-visad at unidata.ucar.edu [mailto:owner-visad at unidata.ucar.edu] On
Behalf Of Bill Hibbard
Sent: Saturday, April 07, 2007 5:12 PM
To: Kenneth Evans; Visad
Subject: Re: More GriddedNDSet Questions
Hi Ken,
I've thought about it and cannot explain the exact events
you are seeing. But in general I can say that when you see
pixels as squares centered on sample locations, your data
are being rendered using texture mapping (you can disble
this via GraphicsModeControl). When you see pixels as
pairs of triangles, you are not seeing texture mapping.
The main thing that confuses me is that with a GriddedSet
you should see a curved texture map and should not see
triangles. If you set a transparency (i.e., alpha) value that
might disable texture mapping for the GriddedSet, but not
for the LinearSet (which uses non-curved texture mapping).
That's all I can think of.
Good luck,
Bill
----- Original Message -----
From: "Kenneth Evans"
To: Visad
Subject: More GriddedNDSet Questions
Date: Fri, 6 Apr 2007 11:29:48 -0500
Hi,
I guess I still don't understand GriddedNDSets. What I am trying to do this
time is the following:
I have a 2D array of intensity data as found, for example in an image. If I
plot that as (x, y) -> Intensity using a Linear2DSet:
Linear2DSet( xMin, xMax, nX, yMin, yMax, nY)
Then I get a plot with the pixels showing as squares. The squares are
centered at the values in the set and extend past the axes.
If I do the same thing, using a Gridded2DSet:
Gridded2DDoubleSet(domainType, new double[][] {xVals[0], yVals[0]}, nX, nY);
where xVals[0] is {xMin, ., xMax, Xmin,.} etc. (that is, they are intended
to be the same values as used in the Linear2DSet), then the squares get
turned into triangles, and nothing extends beyond the axes. The two plots
don't "look" the same. Apart from the overextending, the second appears
washed out.
In general, I want to do coordinate transformations, so the xVals and yVals
will be arbitrary. In that case there will be distortion of the pixels, and
I can see that interpolation of some sort is necessary. It just seems that
two results should look the same as long as there is no distortion.
Am I doing something wrong or is this just the way it is?
-Ken
--
<http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=en-mail_a_01>
More information about the visad
mailing list