The representation usually used for a line in two dimensions is of
the form

where *m* is the gradient of the line and
*c* is the intercept of the line with the *y* axis
(Fig 20).

**Fig. 20 Line representation**

An alternative
representation of a line is

where
*r* is the perpendicular distance from the line to the
origin and is the
angle the line makes with the
*x* axis, as shown in Fig 20.

The
latter form has the advantage that the gradient *m*, with
a range has been replaced by the range of angles
.

This is easier to deal with computationally.

(This will be important later -- see Hough Transforms).

Another alternative representation of an edge or line (again, see Fig 20) is by the vector pair , where is a direction vector (usually normalised) along the edge and is a vector from the origin to the closest point on the line.

Thus, the length of is the perpendicular distance of the line from the origin.

This form of line representation is useful for both two- and three-dimensional lines, and indeed for three-dimensional lines this form is preferable.

Another advantage of this form of line representation is that the
line can be *parametrised*.

Thus, we can specify the
position of any point on the line, such as the end of an edge, by
its distance *t* along the line. Therefore the coordinates of a point
or are

David Marshall 1994-1997