← Back

ofxCubicBezierToBiarc

github.com/CarstenHoyer/ofxCubicBezierToBiarc · @CarstenHoyer
OF 0.10 2D Geometry

Addon approximating cubic bezier curves with biarc segments (2D, based on the bezier2biarc implementation).

4 2 Last commit 7y ago Created 7y ago

Branches ahead of master

These branches have commits not yet on master — could be unmerged fixes or work in progress worth a look.

develop 1 commit ahead · last commit 7y ago

README

Bezier curve approximation algorithm with biarcs



Synopsis

This is more or less a one-to-one implementation of https://github.com/domoszlai/bezier2biarc for openFrameworks.

Installation

You can install this as any other openFrameworks addon.

Implementation

The algorithm is explained by Domoszlai in this blog post: http://dlacko.org/blog/2016/10/19/approximating-bezier-curves-by-biarcs/.

Usage

Create a number of cubic bezier paths in openFrameworks.

Convert them to BiArcs by calling ofxCubicBezierToBiArc::ApproxCubicBezier().

Limitations

The code only works in 2D space. It will not check if the input actually is cubic beziers, and it has not been tested on other inputs.

Screenshots



Original paths

Original paths

BiArc paths

BiArc paths

Overlay of original and BiArcs.(here the BiArcs are translated by ofPoint(1,1) to make them more visible)

Overlay

Get this addon

HTTPS
SSH