Fast and lightweight class for using the Bezier curves of any order in C++
Algorithm implementations are based on A Primer on Bezier Curves by Pomax
- dynamic operations
- any order of curve
- optimized for real-time calculations
- get value, curvature, tangent and normal for parameter t
- get t from projection any point onto a curve
- get derivative curve
- split into two subcurves
- find extremes and bounding box
- find points of intersection with another curve
- elevate/lower order
- manipulate control points
- manipulate dot on curve (only for quadratic and cubic curves)
- c++11
- Eigen3
Add compile flag -march=native
when compiling to use vectorization with Eigen.
A small Qt5 based program written as a playground for manipulating Bezier curves.
- starts with two Bezier curves (with 4 and 5 control points respectively)
- Zoom in/out: Ctrl + mouse wheel
- Manipulate control point or point on curve: Left mouse buttom
- Project mouse pointer on all curves and show tangent: Right mouse buttom
- Split curve at mouse point: Middle mouse buttom
- Raise order of the curve: Double left click
- Lower order of the curve Double right click
- Toggle bounding boxes and curve intersections: Double middle click
- qt5-default
Apache License Version 2.0