Akarshan Nigam
Akarshan Nigam
Tech(AIML)
Assignment
Q1. Write a short note on Filling Polygons Clipping Lines.
A1. Filling polygons is the process of coloring the interior of a
polygon with a specified color. This is often used to create solid
shapes or to color in 2D shapes. There are various algorithms for
filling polygons such as the Scanline Algorithm, Boundary Fill
Algorithm, and Flood Fill Algorithm.
Clipping Lines, on the other hand, is the process of removing the
parts of lines or shapes that lie outside a specified area, known as
the clipping region. Clipping is often used to limit the rendering of
objects to a certain area, such as the viewport of a graphics window.
There are several algorithms for clipping lines such as the Cohen-
Sutherland algorithm, Liang-Barsky algorithm, and Sutherland-
Hodgman algorithm.