Some stuff from old marching cubes sample