# Polygonal chain

(Redirected from Polyline)
A simple polygonal chain
A self-intersecting polygonal chain
A closed polygonal chain

In geometry, a polygonal chain is a connected series of line segments. More formally, a polygonal chain P is a curve specified by a sequence of points $\scriptstyle(A_1, A_2, \dots, A_n)$ called its vertices. The curve itself consists of the line segments connecting the consecutive vertices. A polygonal chain may also be called a polygonal curve,[1] polygonal path,[2] polyline,[3] or piecewise linear curve,[3]

## Variations

A simple polygonal chain is one in which only consecutive (or the first and the last) segments intersect and only at their endpoints.

A closed polygonal chain is one in which the first vertex coincides with the last one, or, alternatively, the first and the last vertices are also connected by a line segment.[4] A simple closed polygonal chain in the plane is the boundary of a simple polygon. Often the term "polygon" is used in the meaning of "closed polygonal chain", but in some cases it is important to draw a distinction between a polygonal area and a polygonal chain.

A polygonal chain is called monotone, if there is a straight line L such that every line perpendicular to L intersects the chain at most once. Every nontrivial monotone polygonal chain is open. In comparison, a monotone polygon is a polygon (a closed chain) that can be partitioned into exactly two monotone chains.[5] The graphs of piecewise linear functions form monotone chains with respect to a horizontal line.

A set of n=17 points has a polygonal path with 4 same-sign slopes

## Properties

Every set of at least $n$ points contains a polygonal path of at least $\lfloor\sqrt{n-1}\rfloor$ edges in which all slopes have the same sign. This is a corollary of the Erdős–Szekeres theorem.

## Applications

Polygonal chains can often be used to approximate more complex curves. In this context, the Ramer–Douglas–Peucker algorithm can be used to find a polygonal chain with few segments that serves as an accurate approximation.[6][7]

In graph drawing, polygonal chains are often used to represent the edges of graphs, in drawing styles where drawing the edges as straight line segments would cause crossings, edge-vertex collisions, or other undesired features. In this context, it is often desired to draw edges with as few segments and bends as possible, to reduce the visual clutter in the drawing; the problem of minimizing the number of bends is called bend minimization.[8]

Polygonal chains are also a fundamental data type in computational geometry. For instance, a point location algorithm of Lee and Preparata operates by decomposing arbitrary planar subdivisions into an ordered sequence of monotone chains, in which a point location query problem may be solved by binary search; this method was later refined to give optimal time bounds for the point location problem.[9]