## Applet Components

**Instruction panel:**
In this panel the applet gives information to the user
regarding the execution of the algorithm and the status of the applet.

**Drawing Area:**
This is the white canvas
where the user enters the polygonal chain to be approximated by the iterative
end-points fitting algorithm. The user enters the polygonal chain by clicking
in this area. The user must double-click on the last point of the polygonal
chain.

**Error Bar:**
This is a scroll bar used to set the error tolerance required
of the approximation. This error is measured in pixels.

**Distance Criterion:**
This is a menu to select which criterion should be used
by the algorithm to obtain the approximation.

**Procedure Buttons:**
These are a set of buttons that allow the user to apply
the algorithm.

## Distance Criterion

This applet is equiped with two different distance criteria:
*Segment-Distance* and *Parallel-Strip*. The difference between
these distance criteria is described below:

**Segment-Distance**

This criterion specifies the distance as the minimum distance of a
point P to all points X, such that X belongs the the segment being considered.
The selection of a point is illustrated in the figure
below. The distance in consideration is drawn in magenta while the segment
is drawn in green.

**Parallel-Strip**

This criterion specifies the distance as the minimun
orthogonal distance from a point to the line containing the line-segment.
The selection of a point is llustrated in the figure below.
The distance being considered is highlighted in magenta while the line
containing the line-segment is highlighted in green.

*Back to Applet Components*

## Procedure Buttons

**Clear All**:
This button is used to clear the drawing area and restart
the algorithm.

**Repeat Polychain**:
This button is used to restart the algorithm using the
polygonal chain previously specified.

**Show Approximation**:
This button is used to execute the algorithm on the polygonal
chain inserted by the user. The approximation is drawn in blue
on the drawing area.

**Apply Step:**
This button is used to execute only one step of the algorithm.
The points being considered are painted in orange
on the drawing area. The distance being considered is highlighted in magenta
whereas the segment against which the distance is considered is drawn in
green. The algorithm progressively builds
the approximation highlighting the selected points in blue.

*Back to Applet
Components*