Polygon
A polygon (from the Greek poly, for "many", and gwnos, for "angle") is a closed planar path composed of a finite number of sequential straight line segments. The term polygon sometimes also describes the interior of the polygon (the open area that this path encloses) or the union of both. The straight line segments that make up the polygon are called its sides or edges and the points where the sides meet are the polygon's vertices.
| Table of contents |
|
2 Taxonomic classification 3 Properties 4 Point in polygon test 5 External link |
| Polygon names | Note: you can help Wikipedia by putting
the following polygons in "Category:Polygons". |
|
|---|---|---|
| Name | Sides | |
| triangle | 3 | |
| quadrilateral | 4 | |
| pentagon | 5 | |
| hexagon | 6 | |
| heptagon (avoid "septagon") | 7 | |
| octagon | 8 | |
| enneagon (avoid "nonagon") | 9 | |
| decagon | 10 | |
| hendecagon (avoid "undecagon") | 11 | |
| dodecagon (avoid "duodecagon") | 12 | |
| triskaidecagon | 13 | |
| heptakaidecagon | 17 | |
| enneadecagon | 19 | |
| icosagon | 20 | |
| icosikaihenagon | 21 | |
| icosikaitetragon | 24 | |
| tricontagon | 30 | |
| tetracontagon | 40 | |
| tetracontakaihexagon | 46 | |
| pentcontagon | 50 | |
| hexacontagon | 60 | |
| heptacontagon | 70 | |
| heptacontakaiheptagon | 77 | |
| octacontagon | 80 | |
| enneacontagon | 90 | |
| hectagon (avoid "centagon") | 100 | |
| chiliagon | 1000 | |
| myriagon | 10,000 | |
| megagon | 106 | |
| googolgon | 10100 | |
The taxonomic classification of polygons is illustrated by the following tree:
We will assume Euclidean geometry throughout.
Any polygon, regular or irregular, complex or simple, has as many angles as it has sides. The sum of the inner angles of a simple n-gon is (n-2)π radians (or (n-2)180°), and the inner angle of a regular n-gon is (n-2)π/n radians (or (n-2)180°/n). This can be seen in two different ways:
Taxonomic classification
Polygon
/ \\
Simple Complex
/ \\
Convex Concave
/
Cyclic
/
Regular
Properties
The area A of a simple polygon can be computed if the cartesian coordinates (x1, y1), (x2, y2), ..., (xn, yn) of its vertices, listed in order as the area is circulated in counter-clockwise fashion, are known. The formula is
- A = 1/2 · (x1y2 - x2y1 + x2y3 - x3y2 + ... + xny1 - x1yn)
- = 1/2 · (x1(y2 - yn) + x2(y3 - y1) + x3(y4 - y2) + ... + xn(y1 - yn-1))
If the polygon can be drawn on an equally-spaced grid such that all its vertices are grid points, Pick's theorem gives a simple formula for the polygon's area based on the numbers of interior and boundary grid points.
If any two simple polygons of equal area are given, then the first can be cut into polygonal pieces which can be reassembled to form the second polygon. This is the Bolyai-Gerwien theorem.
All regular polygons are concyclic, as are all triangles and rectangles (see circumcircle).
A regular n-sided polygon can be constructed with ruler and compass if and only if the odd prime factors of n are distinct Fermat primes. See constructible polygon.
In computer graphics and computational geometry, it is often necessary to determine whether a given point P = (x0,y0) lies inside a simple polygon given by a sequence of line segments. It is known as Point in polygon test.
See also: geometric shape, polyhedron, polytope, cyclic polygon, synthetic geometry.
Point in polygon test
External link
Optimized Point-in-Polygon code
http://www.ecse.rpi.edu/Homepages/wrf/research/geom/pnpoly.html