Marching Cubes Algorithm Python If Statements