Components

 
  home
     

Projects

Products

Components

Contact Us

Design Background

Curriculum Vitae

Forum

Blog

Links

 

 

Line smoothing using Bezier curves
Added: 15Nov2002
Updated: 28Sep2004
Author: Nils Haeck M.Sc.

Languages: Delphi, Java, Visual C++

This package provides source code for customizable line smoothing, using Bezier curves. The package provides simple-to-integrate freehand line smoothing tools for use in vectorial or photo editors.

With this package, any user-drawn line can be approximated using a string of bezier curves.

  • The line approximation looks much better and less jagged than a user-drawn line.

  • Very fast results due to a highly optimized algorithm for finding the approximation.

  • The smoothing and precision can be adjusted. Please experiment with the demo to see how it works.

  • The Bezier approximation requires much less storage as the original line, since the number of segments is reduced enormously.

  • Bezier definitions are compatible with Windows GDI "PolyBezier" command, and can be easily integrated in GDI+ as well. For other platforms, there is an additional method that will draw the bezier approximation using line segments.

A free demo program can be downloaded.

Screenshot

This is a screenshot of the free demo application. The red line shows the approximation of the user-drawn black line.

Download

You can download a free demo program to evaluate the package before purchasing the source. Download executable here.

You can also download the Delphi and Visual C++ sample project, header files BezierApprox.pas and bezier.h, sample executables and documentation here.

Purchase Source

The Delphi / Java / Visual C++ source code can be purchased, and it contains:

BezierApprox.pas This unit contains methods to approximate any (user-drawn) line with a string of bezier curves. It also contains procedures to draw the bezier curves to the screen or any other device, as well as a highly optimized method to find distance from a point to the bezier curve.

BezierSmoother.Java This is the Java version of above source. thanks to Carlos Rocha and Hugo Solis.

main.pas,
main.dfm,
bezier.dpr

This is the source to the Delphi demo program.

bezier.h
bezier.cpp

C++ header and implementation
VCBezier folder

Visual C++ project folder (Microsoft Visual C++ 6.0)
Bezier.pdf Information about the package in Adobe PDF format.

Please use our order form at ShareIt. This package costs USD 99. As soon as your order is processed, you will receive an email with a link and password to the full source package. It includes the files stated above, and the licence allows unlimited use in your software.

Support is limited to help with implementation details, by email. If you wish to hire Simdesign for other graphics-related work, then please contact us by email for more information.

Related Links

MSDN information on "PolyBezier"
A reference of the Windows GDI "PolyBezier" command.

MSDN GDI+ information on Bezier splines
This is more general info on Bezier splines and their representation.

 

   Page last changed: 30Nov2011 © Copyright 2002-2011 SimDesign