New path offsetting implementation

Just wanted to highlight PR 2390, which adds several features to ci::Shape2d and ci::Path2d. More specifically, it adds support for calculating offset curves from paths, based on the research and implementation of Raph Levien. These are necessarily approximations (since a cubic Bezier offset curve is no longer representable by a cubic bezier) but this implementation supports tolerances and is very well-suited for typical Cinder uses.

This code also adds a sophisticated path-stroking implementation (including the standard types of joins, caps, and dashing) and calculation of points of intersection between multiple curves, among other thigns.

Here’s a short demo video:
https://vimeo.com/1147501490

2 Likes