cross-sections of 3D objects

Hello,

I have created 3D shapes with the gridded3DSet with manifold dimension=2.
Therefore, the 3D objects are not solids, but are more like closed surfaces.
I understand that VisAD can do volume rendering with cross-sections with
resampling based on several earlier messages including one with sample code by
Bill.  But I am wondering what's the best way to get a cross-section of my
shape if they are not true solids with volume.  As a simple example, if a
cross-section of my sphere is taken, the 2D plane should only show the rim
(the circumference) of the circle.

I have also tried the following code from one of earlier message to resample:

if (w == null) w = new RealType("testing", null, null);
float[][] plane2D = new float[num*num];
int k = 0;
for (int i=0; i<num; i++){
for (int j=0; j<num; j++){
plane2D[k] = xmin+(xmax-xmin)*j/(num-1.0f);
plane2D[k] = ymin+(ymax-ymin)*j/(num-1.0f);
plane2D[k++] = (float)zplane;
}
}
// construct a Gridded3Dset with manifold dimension = 2
// whose N * N samples lie on a plane at z = zplane
Gridded3DSet plane_set = new Gridded3DSet(xyz, plane2D, num, num);
FlatField fplane = (FlatField)field.resample(plane_set,
Data.WEIGHTED_AVERAGE, Data.NO_ERRORS);

However, I got this error message when I ran my program:

ManifoldDimension must be 3

I am not sure how this works because the Set in field is a Gridded3DSet with
manifold dimension of 2.

How should this be done in VisAD?

Thanks very much,
john

• 2002 messages navigation, sorted by:
• Search the visad archives: