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.
Watch video scan line polygon fill algorithm in computer graphics(✔) | computer graphics notes online without registration, duration hours minute second in high quality. This video was added by user QuickCS 14 February 2018, don't forget to share it with your friends and acquaintances, it has been viewed on our site 183,54 once and liked it 2.5 thousand people.