Input: A sequence of points, v1, ... vn, and a real e, an allowable error.
Output: A subset vi1, ... vis of input vertices, such that for each j and k (1 <= j <= s-1, ij <= k <= vi(j+1)), the distance between a point vk and a segment vijvi(j+1) is at most e.
Measure: The number of selected points, i.e., s.
This applet realizes the algorithm given in the following paper.
H. Imai and M. Iri, ``Computational-Geometric Methods for Polygonal Approximation of a Curve,'' Computer Vision, Graphics and Image Processing, 36, pp. 31--41, 1986.
How to use the applet
1) Draw a curve using the right button of the mouse.
2) Set e using the scroll bar.
3) Click "show graph" with the left button. Red edges are candidates for output edges.
4) Click "compute" with the left button. Blue edges constitute an optimal solution.
Known bugs.
For 3) and 4) above, you should click buttons twice.