Bezier curve approximation algorithm with biarcs
Simple C# application to illustrate the algorithm of approximating a cubic bezier curve with biarcs. The algorithm will also be available in Haskell, incorporated into my JuicyGcode project.
The algorithm will be explained in the blog post at http://dlacko.org/blog/2016/10/19/approximating-bezier-curves-by-biarcs/.
The entry point of the application is the
OnPaint” method in “
Form.cs”. You can set the bezier curve to be approximated there (first line) and you can also change the approximation
parameters at the “
Algorithm.ApproxCubicBezier” call (second line).
The application draws the original bezier curve (black color), the approximation biarcs (red color), and the full circles the arcs lie on (green color).
Use the community edition of Visual Studio 2015 to run it.