https://github.com/bchao1/marching-cubes
Marching-cubes algorithm (beta).
https://github.com/bchao1/marching-cubes
Last synced: 7 months ago
JSON representation
Marching-cubes algorithm (beta).
- Host: GitHub
- URL: https://github.com/bchao1/marching-cubes
- Owner: bchao1
- Created: 2020-09-11T13:46:38.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-11T16:18:20.000Z (about 5 years ago)
- Last Synced: 2025-01-28T03:17:28.504Z (8 months ago)
- Language: Python
- Size: 490 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Marching Cubes Algorithm
Use [Marching Cubes](https://en.wikipedia.org/wiki/Marching_cubes) to generate triangle mesh from implicit functions.
**Implicit functions** (in the 3-variable case): functions written in form f(x, y, z) = V. V is usually called the isosurface value.|Marching cubes size|0.2|0.1|0.05|
|--|--|--|--|
|Rendered mesh||||
|Number of faces|392|1616|6552|
|Number of vertices|728|2708|11236|The mesh is rendered by the [renderer I wrote](https://github.com/bchao1/go-render).
## Usage
See `main.py`. Modify parameters as you wish. There are some implicit functions already defined in `src/functions.py`.## References
- [Marching Cubes Algorithm](http://paulbourke.net/geometry/polygonise/)
- [Plotting 3D implicit fields with Python](https://stackoverflow.com/questions/29054828/is-it-possible-to-plot-implicit-3d-equation-using-sympy)
- [Catmull-Clark Subdivision](https://en.wikipedia.org/wiki/Catmull–Clark_subdivision_surface) is an algorithm to smooth the surfaces of a polygon mesh