.TH MRCHCUBE 6 "IRIT Version 7.0" .SH NAME MRCHCUBE PolygonType MRCHCUBE( ListType VolumeSpec, PointType CubeDim, NumericType SkipFactor, NumericType IsoVal ) Applies (a variation of) the marching cubes algorithm (see W. E.Lorensen and H. E.Cline. "Marching Cubes: A High Resolution 3D Surface Construction Algorithm." Computer Graphics (SIGGRAPH '87 Proceedings), Vol. 21, No. 4, pp 163-169, July 1987.) to the given volumetric data set or trivariate. VolumeSpec can be a list of three or five objects as follows: 3 a triplet of the form (TrivarType TV, NumericType Axis, NumericType TVNormal) 5 a 5-tuple of the form (StringType FileName, NumericType DataType, NumericType Width, NumericType Height, NumericType Depth ) In the first case, the trivariate TV is iso surface contoured at level IsoVal along the prescribed Axis (Note a trivariate need not be a scalar function, while Marching Cubes assumes a scalar function). If TVNormals is not zero, much more accurate normals are derived using the trivariate function which is also slower. Otherwise, first order differencing on the cubes is employed for normal estimation. In the second case, the volume file prescribed by FileName is loaded and iso surface contoured. The file is assumed to hold Width * Height * Depth (Width first, Depth order last) scalar numeric values of type DataType: 1 Regular ascii (separated by while spaces) 2 Two bytes short integer. 3 Four bytes long integer. 4 One byte (char) integer. 5 Four bytes float. 6 Eight bytes double. Beware of the little vs big Endian problem! We assume here you read in the volume in the same machine type this file was writeen with. CubeDim allows the user to prescribe the real cell size (not necessarily cubical. SkipFactor allow the skipping ofdata in large data sets. SkipFactor = 1 skips nothing. SkipFactor = 2, skips every other scalar value, reducing in half all dimensions, etc. Last but not least, IsoVal sets the iso surface level. See also COVERISO, TVLOAD, and TMORPH. Example: IsoSrf = MRCHCUBE( list( ThreeCyls, 1, TRUE ), point( 1, 1, 1 ), 1, 0.12 ); Iso surface contour the X axis of trivariate ThreeCyls and use the trivariate to get better normal's estimations. Cell size is unit cube like, no skipping of data and iso surface level is 0.12.