Computer Graphics
Solid Area (Polygon) Filling
- Chapter 3 -
A polygon is a chain of connected line segments. It is specified by points called Vertices (aka nodes), usually denoted by P0, P1, P2, …… Pn. The first vertex is called the initial or starting point and the last vertex is called the final or terminal point.
Each Polygon is also known as MESH, because it consists of multiple components that jointly make up the shape. These components are known as Vertex, Edges and Faces or Polygon. Each Vertex is a point where tow or more then two lines or edges intersect and is denoted be a sequence number i.e V1, or P1. etc.. An Edge is a Line between two Points or Vertex and is denoted by E1, E2. etc. A Face or Polygon is a closed area of any object, where all edges meet and intersect forming a closed boundary and that inner section is known as a Face or just a single Polygon .
Fill Polygon / Filling Solid Area of Polygon
Question: How do we know if a given point is inside or outside a polygon?
Answer: We use various algorithms to determine if the point in question is Inside or Outside the polygon. these are generally called Inside-Outside Tests.
Inside-Outside Test
To Scan Convert a polygon means to paint the interior of the polygon shape. To fill the polygon shape with solid color. How to differentiate between the interior and the exterior of a polygon.
Two techniques
1. Odd – Even Method
2. Winding Number Method
1. Odd – Even Method
2. Winding Number Method
No comments:
Post a Comment