More GriddedNDSet Questions
Bill Hibbard
hiding at japan.com
Sat Apr 7 16:12:02 MDT 2007
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 dont 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 dont 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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
Url: http://mailman.unidata.ucar.edu/mailing_lists/archives/visad/attachments/20070407/8ba19e79/attachment.ksh
More information about the visad
mailing list