Crates.io | nbezier |
lib.rs | nbezier |
version | 0.2.1 |
source | src |
created_at | 2022-09-27 22:08:27.409538 |
updated_at | 2022-09-27 22:08:27.409538 |
description | Bezier curve library based on nalgebra |
homepage | https://github.com/gammelalf/nbezier |
repository | https://github.com/gammelalf/nbezier |
max_upload_size | |
id | 675238 |
size | 81,289 |
nbezier aims to be a general purpose library for working with bezier curves of any degree.
It uses nalgebra (hence the name) to implement a generic BezierCurve
.
This library also provides a non-generic type SimpleCurve
hiding nalgebra's complexity.
SimpleCurve
is optimised for cubic bezier curves while supporting arbitrary degree.
SimpleCurve
optimised?Using nalgebra BezierCurve
is generic over its degree.
SimpleCurve
is an enum storing curves of degree 1, 2, 3 and anything above in its 4 variants.
Since these low degrees are their own variant with dedicated type, rust can monomorphize these
computing a lot of "magical constants" at compile time.
Also these degree's variants are stored exclusively on the stack
giving them an enormous performance boost.