Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>1) It depends on yoru implementation. You'll need to have a data structure where you can lookup the values at each corner (vertex) of the voxel or cube. This can be a 3d image (ie: an 3D texture in OpenGL), or it can be a customized array data structure, or any other format you wish.</p> <p>2) You need to check the vertices of the cube. There are different optimizations on this, but in general, start with the first corner, and just check the values of all 8 corners of the cube.</p> <p>3) Most (fast) algorithms create a bitmask to use as a lookup table into a static array of options. There are only so many possible options for this.</p> <p>4) Once you've made the triangles from the triTable, you can use OpenGL to render them.</p> <blockquote> <p>Let's say i have a point cloud data of an apple. how do i proceed?</p> </blockquote> <p>This isn't going to work with marching cubes. Marching cubes requires voxel data, so you'd need to use some algorithm to put the point cloud of data into a cubic volume. Gaussian Splatting is an option here.</p> <p>Normally, if you are working from a point cloud, and want to see the surface, you should look at surface reconstruction algorithms instead of marching cubes.</p> <p>If you want to learn more, I'd highly recommend reading some books on visualization techniques. A good one is from the Kitware folks - <a href="http://kitware.stores.yahoo.net/vistooltex.html" rel="nofollow noreferrer">The Visualization Toolkit</a>.</p> <p>You might want to take a look at <a href="http://www.vtk.org/" rel="nofollow noreferrer">VTK</a>. It has a C++ implementation of <a href="http://www.vtk.org/doc/nightly/html/classvtkMarchingCubes.html" rel="nofollow noreferrer">Marching Cubes</a>, and is fully open sourced.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload