Gridded3DSet.isosurf() method, color levels

Hello Bill H. and the VisAD list,

i have a question concerning the isosurf() method of the Gridded3DSet
class.  Two of the parameters,                    

byte[][] auxValues,
byte[][] auxLevels,

store R,G,B color values.  The first array looks like the R,G,B color
values of the original gridded data, and the second array looks like it
stores the computed R,G,B color values of new polygon vertices.  Is this
correct?

If this is correct, then my question is, how are the R,G,B color values of
the new polygon vertices being computed?  It looks like there's a
repeating pattern of code responsible this:

  for (int j=0; j<naux; j++) {           
    t = (int) ( cp * ((auxValues[j][pt + 1 + ydim + xdim_x_ydim] < 0) ?
        ((float) auxValues[j][pt + 1 + ydim + xdim_x_ydim]) + 256.0f :
        ((float) auxValues[j][pt + 1 + ydim + xdim_x_ydim]) ) +
        (1.0f - cp) * ((auxValues[j][pt + 1 + xdim_x_ydim] < 0) ?
        ((float) auxValues[j][pt + 1 + xdim_x_ydim]) + 256.0f :
        ((float) auxValues[j][pt + 1 + xdim_x_ydim]) ) );
        tempaux[j][nvet] = (byte)
        ( (t < 0) ? 0 : ((t > 255) ? -1 : ((t < 128) ? t : t - 256) ) );
  }

i don't quite understand what is happening at a conceptual or
implementation level here. :)  Anyone have any ideas?  Is there any other
code computing color levels?  Or is it only this repeating procedure?

-cheers, bob

PS  Thanks to Bill H. for answering my last question.

Robert S Laramee        tel:    (603) 868-1361 (new as of 19 Jan '00)
9 Woodman Ave, #316     office: (603) 862-0350
Durham, NH 03828        URL:   http://www.cs.unh.edu/~rlaramee


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