section_path: Computer graphics
section_name: Computer graphics
paragraph_text: Computer graphics
  
  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 color, shading and texture), connectivity information, and materials.
  
  Any surface is modelled as a tessellation called polygon mesh. If a square mesh has n + 1 points (vertices) per side, there are n squared squares in the mesh, or 2 n squared triangles since there are two triangles in a square. There are (n + 1) / 2(n) vertices per triangle. Where n is large, this approaches one half. Or, each vertex inside the square mesh connects four edges (lines).
  
  The imaging system calls up the structure of polygons needed for the scene to be created from the database. This is transferred to active memory and finally, to the display system (screen, TV monitors etc.) so that the scene can be viewed. During this process, the imaging system renders polygons in correct perspective ready for transmission of the processed data to the display system. Although polygons are two-dimensional, through the system computer they are placed in a visual scene in the correct three-dimensional orientation.
  
  In computer graphics and computational geometry, it is often necessary to determine whether a given point P = (x 0, y 0) {\displaystyle P=(x_{0},y_{0})} lies inside a simple polygon given by a sequence of line segments. This is called the point in polygon test.