Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Which marching cubes algorithm does this implement? #3

Open
glebarez opened this issue Feb 29, 2024 · 1 comment
Open

Which marching cubes algorithm does this implement? #3

glebarez opened this issue Feb 29, 2024 · 1 comment

Comments

@glebarez
Copy link

marching_cubes from scikit-image provides 2 implementation for marching cubes algo:

  • The algorithm [1]_ is an improved version of Chernyaev's Marching
    Cubes 33 algorithm. It is an efficient algorithm that relies on
    heavy use of lookup tables to handle the many different cases,
    keeping the algorithm relatively easy. This implementation is
    written in Cython, ported from Lewiner's C++ implementation.
  • The classic Lorensen's algo

Which one does this library implements?

@schlegelp
Copy link
Contributor

I'm not familiar with the details of either of the scikit-image implementations to be honest.

I wrote this package based on an idea I had for getting a mesh from sparse voxel matrices and didn't bother looking at existing algorithms as I figured they were all predicated on a dense matrix as input.

Ultimately, it is just using some numpy magic to find surface voxels in the sparse matrix and turns them into mesh vertices + faces. There is no handling of the different cases for half-edges you find in typical marching cube algorithms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants