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

Опубликовано: 14 Февраль 2018
на канале: QuickCS
183,545
2.5k

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.


Смотрите видео scan line polygon fill algorithm in computer graphics(✔) | computer graphics notes онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь QuickCS 14 Февраль 2018, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 183,54 раз и оно понравилось 2.5 тысяч людям.