bezier-rs

Crates.iobezier-rs
lib.rsbezier-rs
version0.5.0
created_at2022-12-18 06:18:31.640785+00
updated_at2025-08-15 23:11:52.895264+00
descriptionComputational geometry algorithms for Bézier segments and shapes useful in the context of 2D graphics
homepagehttps://github.com/Keavon/Bezier-rs
repositoryhttps://github.com/Keavon/Bezier-rs
max_upload_size
id740260
size763,264
Keavon Chambers (Keavon)

documentation

https://keavon.github.io/Bezier-rs/

README

repocrates.iodocs.rsinteractive docs

Bezier-rs

Computational geometry algorithms for Bézier segments and paths useful in the context of 2D graphics.

Play with the interactive documentation which visualizes each API function in a fun, graphical manner:

View the interactive API


Deprecation Notice

Bezier-rs was built for the needs of Graphite, an open source 2D graphics editor. The library is now deprecated and has been archived in this repository by extracting its development history from Graphite's monorepo, with some cleanup in support of its standalone archival.

Graphite has moved to Kurbo as of 2025, which offers superior performance and correctness compared to the naïve and unoptimized algorithms implemented here. However, some algorithms offered by Bezier-rs are not yet available in Kurbo. Note also that Bezier-rs is anchor-centric while Kurbo (like SVG) is segment-centric, meaning paths in Bezier-rs are defined by their anchor points and incoming/outgoing handles, while Kurbo paths are defined by segment commands like move-to, line-to, quadratic-to, and cubic-to.

No further development will continue and 0.5 is the last major version. Interested contributors are encouraged to submit missing algorithms to Kurbo instead.

Features

Bezier-rs is inspired by Bezier.js and A Primer on Bézier Curves by Pomax. It is not a port, so its API differs and additionally covers paths, not only single Bézier segments. View the interactive documentation or the docs.rs documentation for more feature details.

Terminology

Bezier-rs uses the following terminology for vector data. These depictions are given for cubic Bézier curves.

Manipulators Curve/Bezier Segment Subpath/Path Open/Closed

Commit count: 0

cargo fmt