https://github.com/hughsk/icosphere
Generates icosphere meshes of varying levels of complexity
https://github.com/hughsk/icosphere
Last synced: 3 months ago
JSON representation
Generates icosphere meshes of varying levels of complexity
- Host: GitHub
- URL: https://github.com/hughsk/icosphere
- Owner: hughsk
- License: other
- Created: 2014-05-20T16:13:16.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-11-20T11:23:31.000Z (over 10 years ago)
- Last Synced: 2025-03-12T21:49:39.430Z (3 months ago)
- Language: JavaScript
- Size: 358 KB
- Stars: 38
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# icosphere [](http://github.com/badges/stability-badges)
Generates icosphere meshes of varying levels of complexity – implementation
sourced from [this article](http://blog.andreaskahler.com/2009/06/creating-icosphere-mesh-in-code.html).* [demo with face normals](http://hughsk.io/icosphere)
* [demo with vertex normals](http://hughsk.io/icosphere?smooth)[](http://hughsk.io/icosphere)
## Usage
[](https://nodei.co/npm/icosphere/)
### mesh = icosphere(subdivisions)
Creates a new icosphere mesh object. You'll want to keep `subdivisions` within
the range of 0 and 5 or it starts to get really costly. The mesh object has
the following properties:* `cells`: an indexed list of each triangle's positions.
* `positions`: a list of positions for each vertex.### See Also
* [Creating an icosphere mesh in code](http://blog.andreaskahler.com/2009/06/creating-icosphere-mesh-in-code.html)
* [gl-simplicial-complex](https://github.com/mikolalysenko/gl-simplicial-complex)
* [conway-hart](https://github.com/mikolalysenko/conway-hart)
* [mesh-viewer](https://github.com/mikolalysenko/mesh-viewer)
* [TrimeshJS](https://github.com/mikolalysenko/TrimeshJS)
* [unindex-mesh](https://github.com/hughsk/unindex-mesh)## License
MIT. See [LICENSE.md](http://github.com/hughsk/icosphere/blob/master/LICENSE.md) for details.