Back to Browse

scan line polygon fill algorithm in computer graphics(✔) | computer graphics notes

215.9K views
Feb 14, 2018
8:06

In this video we will learn scan line polygon fill algorithm in computer graphics. We will learn the basic concept of scan line polygon fill algorithm. We will also take a look at an example of scan line polygon fill algorithm, Scan line polygon filling algorithm is used for solid color filling in polygons. Steps to perform: For Scan line polygon filling there are three steps to perform in the following order: Find the intersections of the scan line with all edges of the polygon. Sort the intersections by increasing x-coordinate i.e. from left to right. Make pairs of the intersections and fill in color within all the pixels inside the pair. Special Cases: Some scan-line intersections at polygon vertices require special handling. A scan line passing through a vertex intersects two polygon edges at that position, adding two points to the list of intersections for the scan line. In this example Scan line y and Scan line y` both pass through an vertex or an edge endpoint. Now in case of scan line y` the scan line is intersecting 4 edges i.e. even number of edges and Also passing through a vertex/endpoint. ALSO both the edges that are connected to the vertex are on SAME SIDE, of the scan line. SO we need to count the vertex/endpoint TWICE so that we can make pairs of intersection points (8,12) & (12,14). Thank you guys for watching this video. PLEASE SUBSCRIBE TO OUR CHANNEL. LIKE AND SHARE THIS VIDEO.

Download

1 formats

Video Formats

360pmp410.3 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

scan line polygon fill algorithm in computer graphics(✔) | computer graphics notes | NatokHD