Skip to content

An implementation of the marching cubes algorithm in Python, the script generates multiple spheres and uses the algorithm to generate a mesh that can later be used for animations.

Notifications You must be signed in to change notification settings

Jaydeep-P/MarchingCubes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MarchingCubes

Naive implementation of the marching cubes algorithm in Python, this is extremely unoptimised code both in terms of memory and time complexity( not to mention that the code is written in Python)

The code simply makes .STL files by putting the vertices in a file that can later be animated ( in my case using blender) the points being used for the input are generated using a basic "meatball" algorithm.

Ways the code can be optimised:

  • Linear interpolation to calculate the vertices of triangles would result in smoother shapes at very little cost
  • The memory usage can be reduced quite significantly by not using a 3D array
  • Just use C++ or any other lower level language, this is simple to do as the whole code doesn't really depend on any python specific features.
  • Writing the output simultaneously to reduce memory usage
  • Making the functions multi-threaded, this is the largest improvement and should be handled first.

About

An implementation of the marching cubes algorithm in Python, the script generates multiple spheres and uses the algorithm to generate a mesh that can later be used for animations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages