Fast Detection of the Geometric Form of Two-Dimensional Cubic Bézier Curves

Stephen Vincent
Adobe Systems

This paper appears in issue Volume 7, Number 3.
Purchase this issue from the akpeters.com web site.

Abstract

This paper presents and algorithm that determines, from the control points of a cubic two-dimensional Bézier durve, the geometric form of the curve (arch, single inflection, two inflections, cusp, loop, or the degenerate forms staight line or point). The algorithm is based on a case analysis of the signs fo the determinants of the control-point triples. Source code is avaialble online.

Author Information

Stephen Vincent, Adobe Systems, 1551800 Stokes Street, San Jose, CA 95126 svincent@ca.inter.net

Source Code

Source code for a C implementation of this algorithm is available here: BezType.c (6K HTML text). The code was empirically tested against a large sample of randomly generated curves whose geometric characteristics were determined by subdividing the curve into a large number of small linear sections and exhaustively testing for curve types.

BibTeX Entry

@article{Vincent02,
  author = "Stephen Vincent",
  title = "Fast Detection of the Geometric Form of Two-Dimensional Cubic Bézier Curves",
  journal = "journal of graphics, gpu, and game tools",
  volume = "7",
  number = "3",
  pages = "43-51",
  year = "2002",
}