Polygon

A polygonal region within a 2-dimensional Frame

Description:

The Polygon class implements a polygonal area, defined by a collection of vertices, within a 2-dimensional Frame. The vertices are connected together by geodesic curves within the encapsulated Frame. For instance, if the encapsulated Frame is a simple Frame then the geodesics will be straight lines, but if the Frame is a SkyFrame then the geodesics will be great circles. Note, for a basic Frame the vertices must be supplied in an order such that the inside of the polygon is to the left of the boundary as the vertices are traversed, assuming the Frame axes are displayed in the usual right-handed coordinate convention - X axis (axis 1) points to the right and the Y axis (axis 2) points upwards. Supplying them in the reverse order will effectively negate the polygon.

Within a SkyFrame, neighbouring vertices are always joined using the shortest path. Thus if an edge of 180 degrees or more in length is required, it should be split into section each of which is less than 180 degrees. The closed path joining all the vertices in order will divide the celestial sphere into two disjoint regions. The inside of the polygon is the region which is circled in an anti-clockwise manner (when viewed from the inside of the celestial sphere) when moving through the list of vertices in the order in which they were supplied when the Polygon was created (i.e. the inside is to the left of the boundary when moving through the vertices in the order supplied).

Constructor Function

astPolygon

Inheritance

The Polygon class inherits from the Region class.

Attributes

In addition to those attributes common to all Regions, every Polygon also has the following attributes:

Functions

In addition to those functions applicable to all Regions, the following functions may also be applied to all Polygons: