   the function to calculate the values of corners of cubes for marching cube algorithm?
  Hello,I recently downloaded marching cube demo from NeHe website. The demo worked perfectly. I learned much from this demo. But I have a question.For marching cube algorithm, it has to calculate the values of eight corners of cubes via a function and compared the values with isovalue. How to choose the function. If I used different function. My 3D surface is different from the same 3D data set. Usually the 3D surface is not correct. But the function of this demo is for ( int i = 0; i < number; i++) {val += POW4(gCubes.size) / (POW4(x - gCubes.center[0]) + POW4(y - gCubes.center[1]) + POW4(z - gCubes.center[2]));}return val;This function can make the correct 3D surface from my 3D data set. Is the function produced by some other algorithm? My main question is that If I have 3D data set (x,y,z), how do I choose the function to calculate the values of eight corners of cubes?    Thank you very much.</i>   <SPAN CLASS=editedby>[edited by - Crab &#111;n February 4, 2004 8:35:05 AM]</SPAN><SPAN CLASS=editedby>[edited by - Crab &#111;n February 6, 2004 4:28:12 AM]</SPAN><SPAN CLASS=editedby>[edited by - Crab &#111;n February 6, 2004 4:29:39 AM]</SPAN>   