# Degenerate case of normal computation in marching cubes

I'm implementing the marching cubes, reference is this. I managed to get the geometric reconstruction (the mesh) however I do struggle with the normals.

In section 4 they explain the gradient can be firstly estimated using central difference using 8 cubes sharing the vertex $(i,j,k)$. However consider for example case 1 (figure 3) in the paper assume for example you have 8 cubes with one vertex "on" and all the other "off". All the central difference (assuming binary values) would give you 0, therefore I wouldn't be able to estimate the normal in the cube vertex, and later linear interpolate.

Is there some subtlety I'm missing? I wouldn't personally use central difference, but assuming I'm sweeping in a certain direction and then interpolate a point in a cube edge I would use for example forward difference, which to me make more sense, however I'm not 100% sure of the "sense" of this.

In their scheme they give a good explanation of why their approach make sense. Not sure I can justify mine.

• You compute the normal "for each vertex of a cube" not "for a cube", my example case was to compute the normal for a vertex shared by 8 cubes, where such vertex is for example "on" and all the others "off". If you read the paper and use their formula you would get $(0,0,0)^T$ which doesn't make sense as normal. – user8469759 Jun 21 '18 at 9:29