spaceroots
 

Documents

Drawing an elliptical arc using polylines, quadratic or cubic Bézier curves

This paper presents algorithms to approximate an elliptical arc using line segments, quadratic or cubic Bézier curves, given a required accuracy. The algorithms are two-fold: the first part explains how too choose the control points and the second part explains how to compute the approximation error. A simple method to split the arc into sub-arcs in order to respect the required accuracy is also presented.

In addition to the on-line version, this document is available in LaTeX, PostScript and PDF formats in the downloads page, a Java class implementing the algorithms is also available.

Quick computation of the distance between a point and an ellipse

This paper presents an algorithm to quickly compute the distance between a point and an ellipse. The point can be inside, outside, or on the ellipse. The algorithms is efficient even with very degenerated ellipses (i.e. flat ellipses whose semi-minor axis isconsiderably smaller than the semi-major axis).

In addition to the on-line version, this document is available in LaTeX, PostScript and PDF formats in the downloads page, a Java class implementing the algorithm is also available.

Finding the circle that best fits a set of points

This paper presents an algorithm to fit a circle against a set of points in 2D.

In addition to the on-line version, this document is available in LaTeX, PostScript and PDF formats in the downloads page, a Java class implementing the algorithm is also available.