#vector #geometry #graphics #curve-point


Bezier curve implementations using N-dimensional vectors

6 releases

0.5.0 Feb 19, 2023
0.1.4 Jun 23, 2021

#231 in Graphics APIs

Download history 94/week @ 2024-01-02 61/week @ 2024-01-09 1433/week @ 2024-01-16 346/week @ 2024-01-23 355/week @ 2024-01-30 339/week @ 2024-02-06 1118/week @ 2024-02-13 383/week @ 2024-02-20 372/week @ 2024-02-27 92/week @ 2024-03-05 221/week @ 2024-03-12 543/week @ 2024-03-19 247/week @ 2024-03-26 273/week @ 2024-04-02 324/week @ 2024-04-09 148/week @ 2024-04-16

1,158 downloads per month
Used in 2 crates


473 lines


A Bezier curve class supporting linear, quadratic and cubic Bezier curves, using an arbitrary point class.

Example uses would be for 2-dimensional Bezier curves whose coordinates are [f64; 2], or for 3-dimensional Bezier curves using coordinates of [f32; 3].

The Bezier curve supports bisection, and then splitting into straight lines within a given straightness bound; iterators are provided to automatically trace a Bezier as lines or points within such a straightness, for rendering puroses.

The Bezier type also supports rounding of corners and circular arc generation, utilizing a very accurate function for any angle of rounding up to 180 degrees, derived from a curve-fit from experimental data, rather than an explicit mathematical function for the control point generation (the standard analytical approach).

This crate is in beta; it is used in a small number of applications, and the functionality is mature; the API is stable, but may be enhanced.


Add this to your Cargo.toml:

bezier-nd = "0.5"


Release notes are available in RELEASES.md.


Licensed under either of

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


~29K SLoC