22 stable releases (9 major)
|9.1.0||Jun 19, 2023|
|8.1.0||Mar 4, 2023|
|8.0.0||Nov 5, 2022|
|7.2.1||Sep 2, 2022|
#36 in Math
64,162 downloads per month
Used in 556 crates (3 directly)
Library for subdividing shapes, such as an icosahedron. This provides abstractions for almost anything to be possible, however there are many predetermined shapes.
In the case of the icosphere:
This starts off with an icoashedron, and then proceeds to subdivide it. The subdivided points form the dual to a goldberg polyhedron. In essence, each point on this sphere is either a hexagon or a pentagon.
Points are interpolated using the geometric
function to preserve their accuracy.
- Base shapes
- Interpolation functions
- Spherical interpolation
- Linear interpolation
- Normalized linear interpolation
- Basic optimizations for
p == 0.5in interpolation.
- An adjacency (neighbour) map which can be generated from the indices that this library creates.
A few more optimizations are coming, along with more options for generation:
- Remove nested triangle layers by placing them into their own
- Allow interpolation functions to have access to state. (This would permit certain things such as sampling noise as part of the generation).
Hexasphere is distributed under the terms of either the MIT license, or the Apache License (Version 2.0) at the user's choice.
See the files named LICENSE-MIT and LICENSE-APACHE2 relative to the root directory of this project for more details.