More GriddedNDSet Questions
Bill Hibbard
hiding at japan.com
Sun Apr 15 14:17:07 MDT 2007
Ken,
All the evidence you present says that the system is using
texture mapping with your Linear2DSet and not using texture
mapping with your Gridded2DDoubleSet (the slowness is
consistent with not using texture mapping). If you're ready to
compile VisAD from its source, you could uncomment the
print statements for the computation of the isTextureMap
and curvedTexture flags, in the ShadowFunctionOrSetType.java
file in the visad package. Uncomment two sets of print
statements, between (at least in the old version of source
on my home machine) lines 453-477 and lines 713-733.
It would be a good idea to eliminate all displayed data
except the Field of interest, so you don't confuse with the
print output of other data.
Feel free to send the results to the list, and we'll try to
figure out what's happening.
Good luck,
Bill
----- Original Message -----
From: "Kenneth Evans, Jr."
To: Visad
Subject: RE: More GriddedNDSet Questions
Date: Sat, 14 Apr 2007 12:01:57 -0500
Bill,
I am attaching a picture of what I get with the Gridded2DDouble set.
They are triangles and dont extend beyond the plot range, whereas
with the Linear2D set, they are pixels and extend .5 pixel beyond the
plot boundary (presumably TextureMaps). Moreover, the display is
verrry slow in the Gridded2DDouble case. The lines of code that are
different in the two cases are:
// Create the domain set
if(xVals2D == null && yVals2D == null) {
// Define a linear domain set with the indices
domainSet = new Linear2DSet(xMin, xMax, nX, yMin, yMax, nY);
System.out.println("Linear2DSet");
} else {
xVals1D = new double[1][nX * nY];
yVals1D = new double[1][nX * nY];
xVals1D[0] = VUtils.convert2DArrayTo1DArray(xVals2D, nY, nX);
yVals1D[0] = VUtils.convert2DArrayTo1DArray(yVals2D, nY, nX);
domainSet = new Gridded2DDoubleSet(domainType, new double[][] {
xVals1D[0], yVals1D[0]}, nX, nY);
System.out.println("Gridded2DDoubleSet");
}
This is from a generic 2D plot class. If you give it x and y values
it uses the Gridded2DDoubleSet, otherwise the Linear2DSet. I can
send the whole file, if necessary. The domainTypes are defined:
// Define types
xType = RealType.getRealType(xLabel, null, null);
yType = RealType.getRealType(yLabel, null, null);
RealType[] domainTypes = new RealType[2];
domainTypes[0] = xType;
domainTypes[1] = yType;
domainType = new RealTupleType(domainTypes);
The fact that it is slow is more important to me than that is using
triangles.
gmc.getTextureEnable returns true in both cases. I dont explicitly
set it.
The VisAD version is the Jan 07 version.
Thanks,
-Ken
--------------------------------------------------------------------
From: owner-visad at unidata.ucar.edu
[mailto:owner-visad at unidata.ucar.edu] On Behalf Of Bill Hibbard
Sent: Monday, April 09, 2007 5:46 PM
To: Kenneth Evans, Jr.; Visad
Subject: RE: More GriddedNDSet Questions
Hi Ken,
Pairs of triangles indicate that the system is not using curved
texture maps. I don't understand why it would use square
texture maps with your LinearSet and not use curved texture
maps with your GriddedSet, unless (according to my reading
of the code in VisAD) you are making transparent surfaces.
I doubt that sending an image will help.
Good luck,
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 dont think I am seeing anything unusual. Its
just it is different when using a Gridded2DSet than when using a
Linear2DSet, even though the grid data is equivalent.
--
[IMAGE]
<< Gridded2DSet.Triangles.png >>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
Url: http://mailman.unidata.ucar.edu/mailing_lists/archives/visad/attachments/20070415/0b98c2a7/attachment.ksh
More information about the visad
mailing list