Simple marching cubes algorithm implementation