I'm currently implementing a curve widget that will be drawn using skia so I'm limited to drawing cubic Bezier segments.
The user will be able to choose different interpolations. E.g. Catmull-Rom.
What I need to do then is to calculate the CVs for a Bezier segment from the CVs of a Catmull-Rom segment. This is called a basis change and quiet trivial.
So I expected some Rust crate to cover this already but I didn't find any. I wonder if this crate would be a good one to offer this functionality, even if behind a feature gate?
A basic API would let the user choose a basis (what is called an Interpolation in this crate, I guess) or supply a custom basis matrix. The latter would make it easy to evaluate custom splines via the available methods in this crate. Assuming their basis can be changed to one of those covered by this crate.
I'm currently implementing a curve widget that will be drawn using
skia
so I'm limited to drawing cubic Bezier segments.The user will be able to choose different interpolations. E.g. Catmull-Rom. What I need to do then is to calculate the CVs for a Bezier segment from the CVs of a Catmull-Rom segment. This is called a basis change and quiet trivial.
So I expected some Rust crate to cover this already but I didn't find any. I wonder if this crate would be a good one to offer this functionality, even if behind a feature gate? A basic API would let the user choose a basis (what is called an
Interpolation
in this crate, I guess) or supply a custom basis matrix. The latter would make it easy to evaluate custom splines via the available methods in this crate. Assuming their basis can be changed to one of those covered by this crate.