Next: Point of a planar Up: guid2 Previous: Functions Summary   Contents   Index

# Geometrical structures : Point, Curves, Polygons and Lists

The family of curves, polygons and lists objects are mainly used to handle geometrical processes, as mathematical morphology algorithms, shape analysis, snakes, ...

In MegaWave2, a curve (section 6.2) is a set of points in the plane that is, a set of (x, y) coordinates. Although there is no such explicit condition in the system library, most modules assume that this set is really a curve, meaning that points are adjacent for the 4 or 8-connectivity, and that the dimension of the set is less than 2. For a two-dimensional set of points, to avoid memory blowup, consider the segment structure (Section 7.4). A curve is implemented as a chain of points: the curve begins with a first point, from which we can go to the next point, and so one up to the last point. There is no condition set about the geometry of the curve (e.g. the curve can cut itself) but your algorithm may want to put some. There is no an a priori rule to interpolate the curve between two adjacent points in the chain, in the case where they are not adjacent in the plane. Your algorithm may have to process such interpolation.

You may want to handle a set of curves (it can be for example the result of an edge detector applied to an image). Such object is also provided in MegaWave2 (section 6.3) and it is implemented as a chain of curves.

What we call polygon (section 6.4) is basically a closed curve that is, a chain of (x, y) coordinates where the point next the last point is assumed to be the first point. But one can associate to a polygon a list of real parameters. It can be, for example, only one value which gives the gray level of the constant region delimited by the closed curve. The meaning of the parameters is not pre-defined, so you can used it freely in your algorithms.

You may also want to handle a set of polygons (it can be for example the result of a region-segmentation algorithm applied to an image). This object, explained in section 6.5, is of course implemented as a chain of polygons.

All of the objects we have enumerated can record integer or real coordinates (for some applications, you may need real coordinates - e.g. when you compute a P.D.E. to evolve a curve -). In the following, we give a full description of the objects for which coordinates are integers. By putting a `F` (floating-point precision) or `D` (double) at the beginning of the curve and polygon object's name, you get the corresponding object with real coordinates fields (see section 6.6 for a short description).

We shall begin our description by the basic object used by curves and polygons: the point.

Subsections

Next: Point of a planar Up: guid2 Previous: Functions Summary   Contents   Index
mw 2004-05-05