A polygon is a closed figure where the sides are all line segments. Each side must intersect exactly two other sides but only at their endpoints. The sides must be non-collinear and have a common endpoint. A polygon is usually named after how many sides it has, a polygon with n-sides is called an n-gon. In computer graphics, a polygon is a primitive used in modelling and rendering. They are defined in a database, containing arrays of vertices (the coordinates of the geometrical vertices, as well as other attributes of the polygon, such as colour, shading and texture), connectivity information, and materials. In geometry, there are kinds of polygons which can be classified as the simplex or complex polygon, concave or convex polygon and regular or irregular polygon. There are many types in regular polygons such as quadrilateral, pentagon, Hexagon, Heptagon, Octagon, Nonagon, Decagon etc.