cross-sections of 3D objects


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[3][num*num];
    int k = 0;
    for (int i=0; i<num; i++){
        for (int j=0; j<num; j++){
            plane2D[0][k] = xmin+(xmax-xmin)*j/(num-1.0f);
            plane2D[1][k] = ymin+(ymax-ymin)*j/(num-1.0f);
            plane2D[2][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, 

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

VisADProbeMaker:visad.SetException: Gridded3DSet.valueToGrid: 
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,

  • 2002 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: