Polygon[, , ... ] is a graphics primitive that represents a filled polygon.
Polygon can be used in both Graphics and Graphics3D (two- and three-dimensional graphics).
The positions of points can be specified either in ordinary coordinates as x, y or x, y, z, or in scaled coordinates as Scaled[x, y] or Scaled[x, y, z].
Offset can be used to specify coordinates in two dimensions.
The boundary of the polygon is formed by joining the last point you specify to the first one.
In two dimensions, self-intersecting polygons are allowed.
In three dimensions, planar polygons that do not intersect themselves will be drawn exactly as you specify them. Other polygons will be broken into triangles.
You can use graphics directives such as GrayLevel and RGBColor to specify how polygons should be filled.
In three dimensions, the shading can be produced from simulated illumination.
In three-dimensional graphics, polygons are considered to have both a front and a back face. The sense of a polygon is defined in terms of its first three vertices. When taken in order, these vertices go in a counterclockwise direction when viewed from the front. (The frontward normal is thus obtained from a right-hand rule.)
You can use FaceForm to specify colors for the front and back faces of polygons.
In three-dimensional graphics, edges of polygons are shown as lines, with forms specified by the graphics directive EdgeForm.
See Section 2.10.1, Section 2.10.2 and Section 2.10.8.
See also: Raster, Rectangle, Cuboid, SurfaceColor.
Related packages: Geometry`Polytopes`, Graphics`Polyhedra`.
New in Version 1; modified in 3.