andrewrgarcia / voxelmap

A Python library for making voxel and 3D mesh models from images and arrays
https://voxelmap.vercel.app
MIT License
20 stars 2 forks source link

Implement a three-dimensional Convex Hull algorithm to process voxels at the surface of voxel models from Goxel imports #6

Closed andrewrgarcia closed 1 year ago

andrewrgarcia commented 1 year ago

Some 3D models may have internal voxels which are not seen and are thus a waste of memory, computation-wise.

A 3D Convex Hull algorithm will process the external voxels which are visible alone.

This will reduce the time complexities of rendering and dynamic manipulation of 3D objects with "n" lengths from O(n^3) to O(n^2) for cases where internal voxels are present.

While a Jarvis algorithm wraps all points by considering the most counterclockwise trios: sketches(1)

A 3-D Convex Hull algorithm will generate a hull from an initial triangle plane of 3 voxels and pivot around the external points in 3-D space until the hull closes:

sketches

Some useful references: https://www.cs.jhu.edu/~misha/Spring16/09.pdf

andrewrgarcia commented 1 year ago

It is currently being developed as MeshWrap in voxelmap versions >= 2.1.0 see source-code

andrewrgarcia commented 1 year ago

Current issues with MeshWrap

Update: MeshWrap has been supplanted with MarchingMesh function

andrewrgarcia commented 1 year ago

This issue has been resolved with the MarchingMesh() function; applying a marching cubes function from scikit-image.