A C++ implementation of the algorithm for solving the "distance to a Bézier curve" problem, described in Graphics Gems:
- Solving the Nearest-Point-on-Curve Problem for transforming the problem into a Bernstein polynomial form.
- A Bézier Curve-Based Root-Finder for accurately solving the resulting polynomial equations.
Note: This implementation seems to work well for low-degree cases (e.g., cubic Bézier curves) but is less robust for higher-degree cases.
main.cpp
Main algorithm implementation and examples.plot_bezier.m
MATLAB script for reading output and plotting.