Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fogleman/simplify
3D mesh simplification in Go.
https://github.com/fogleman/simplify
Last synced: 1 day ago
JSON representation
3D mesh simplification in Go.
- Host: GitHub
- URL: https://github.com/fogleman/simplify
- Owner: fogleman
- License: mit
- Created: 2016-05-11T02:27:57.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-16T17:19:06.000Z (over 7 years ago)
- Last Synced: 2024-08-02T07:24:25.839Z (3 months ago)
- Language: Go
- Homepage:
- Size: 18.6 KB
- Stars: 246
- Watchers: 13
- Forks: 31
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-game-engine-dev - 3D Mesh Simplification - 3D mesh simplification. (Libraries / Go)
README
## 3D Mesh Simplification
Implementation of
[Surface Simplification Using Quadric Error Metrics, SIGGRAPH 97](http://cseweb.ucsd.edu/~ravir/190/2016/garland97.pdf),
written in Go.![Bunny](http://i.imgur.com/Ttf5XzH.png)
270,000 faces vs. 2,700 faces (1%)
---
### Install
go get -u github.com/fogleman/simplify/cmd/simplify
### Command-Line Usage
Usage: simplify [-f FACTOR] input.stl output.stl
$ simplify -f 0.1 bunny.stl out.stl
Loading bunny.stl
Input mesh contains 270021 faces
Simplifying to 10% of original...
Output mesh contains 27001 faces
Writing out.stl### API Usage
```go
// Use LoadSTL (ASCII) or LoadBinarySTL
mesh, err := simplify.LoadBinarySTL(inputPath)
// handle err
mesh = mesh.Simplify(factor)
mesh.SaveBinarySTL(outputPath)
```---
![Animated](http://i.imgur.com/LXke1ur.gif)
Iteratively simplifying by 50% until only 16 faces remain