0% found this document useful (0 votes)
12 views9 pages

Lecture 15

Uploaded by

Mayur Mahajan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views9 pages

Lecture 15

Uploaded by

Mayur Mahajan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Subject – Computer Graphics

Course Code-22318 Class-CO3I

Presented By,
Mrs. B.A.Chatterjee

1
UNIT II
Raster Scan Graphics

Computer Engineering 2
Lecture 15

Computer Engineering 3
Company
Boundary Fill Algorithm
LOGO
Advantages of Boundary Fill Algorithm

•Simple
•Easy to implement.
•Works for any type of polygons.

Computer Engineering 4
Company
Boundary Fill Algorithm
LOGO
Disadvantages of Boundary Fill Algorithm
•Does not work if the boundary is specified with multiple colours.
•Need to specify seed point contained within the polygon.
•Uses extensive stacking.
•Require more memory.
•Not suitable for the large polygon.
•Filling the region with 4 and 8 connectivity.
•Filling of polygon depends on types of connectivity employed.
The 4-connected approach does four recursive calls for each of
its four nearest neighbours.
•The 8-connected approach does eight calls. The 4-connected
approach requires less memory but sometimes fails to fill certain
parts of the polygon.

Computer Engineering 5
Company
Flood Fill Algorithm
LOGO
•Many realistic objects have different colored boundary.
Boundary fill algorithm cannot fill the polygon with multicoloured
boundary.

•Flood Fill can fill the polygon with multiple boundary colour.

•The algorithm starts with the interior pixel, fill color and old
color.If the color of the current pixel is the same as old color then
it fills the pixel with fill color and examine its neighbours.

Computer Engineering 6
Company
Flood Fill Algorithm
LOGO

Computer Engineering 7
Company
Advantages of Flood Fill Algorithm
LOGO

•Simple.

•Easy to implement.

•Boundary fill algorithm cannot handle the object with multi


color boundary, whereas flood fill can.

Computer Engineering 8
Company
Disadvantages of Flood Fill Algorithm
LOGO

•Require extensive stacking.

•Slow in nature.

•Not suitable for large polygon

Computer Engineering 9

You might also like