For normal calculation, you have two options. You can take the cross product of two edges of the triangle, shown here, which will make each vertex of the triangle have the same normal, thus giving you flat shading. The other option gives you smooth normals and is done by linearly...

c++,algorithm,3d,marching-cubes

Lots of questions. I am going to try to give some pointers. First of 200^3 is a pretty small dataset for ct! what about 1024^3? :) Marching cubes is built for regular grids. So wether data is defined at cube vertices or centers really does not matter: just shift by...

c++,algorithm,graphics,3d,marching-cubes

The marching cubes algorithm is -- as explained in the linked description -- an algorithm to build a polygonal representation from sampled data. The double val[8]; are the samples for the 8 vertices of the cube. So they are not computed they are measurements from e.g. MRI scans. So the...

python,numpy,3d,marching-cubes

I figure it out So, each coordinate [X][Y][Z] is the voxel coordinate. Positive Value mean this voxel is inside the geometrie (where I previously spawn a cube) and negative value mean it is outise the geometry (where there is nothing)...

http://en.wikipedia.org/wiki/Marching_cubes http://en.wikipedia.org/wiki/Marching_cubes#External_links Paul Bourke. "Overview and source code". http://paulbourke.net/geometry/polygonise/ Qt_MARCHING_CUBES.zip: Qt/OpenGL example courtesy Dr. Klaus Miltenberger. http://paulbourke.net/geometry/polygonise/Qt_MARCHING_CUBES.zip The example requires boost, but looks like it probably should work. In his example, it has in marchingcubes.cpp, a few different methods for calculating the marching cubes: vMarchCube1 and vMarchCube2. In the comments...

The ones you have mentioned are the most prominent ones. However keep in mind that they have some limitations too: Extended Marching Cubes (EMC) - preserves sharp features by taking into account the sample normals (and thus gradients of the normals), this method however is still not topologically consistent (homeomorphic),...