Orientation of A Simple Polygon
In two dimensions, given an ordered set of three or more connected vertices (points) (such as in connect-the-dots) which forms a simple polygon, the orientation of the resulting polygon is directly related to the sign of the angle at any vertex of the convex hull of the polygon, for example, of the angle ABC in the picture. In computations, the sign of the smaller angle formed by a pair of vectors is typically determined by the sign of the cross product of the vectors. The latter one may be calculated as the sign of the determinant of their orientation matrix. In the particular case when the two vectors are defined by two line segments with common endpoint, such as the sides BA and BC of the angle ABC in our example, the orientation matrix may be defined as follows:
A formula for its determinant may be obtained, e.g., using the method of cofactor expansion:
If the determinant is negative, then the polygon is oriented clockwise. If the determinant is positive, the polygon is oriented counterclockwise. The determinant is non-zero if points A, B, and C are non-collinear. In the above example, with points ordered A, B, C, etc., the determinant is negative, and therefore the polygon is clockwise.
Read more about this topic: Curve Orientation
Famous quotes containing the words orientation and/or simple:
“Every orientation presupposes a disorientation.”
—Hans Magnus Enzensberger (b. 1929)
“A more simple and natural man it would be hard to find. Vice and disease, which cast such a sombre moral hue over the world, seemed to have hardly any existence for him.”
—Henry David Thoreau (18171862)