Graphics

Area Fill Algorithms

Flood Fill vs Boundary Algorithms

Objective – Color the entire area with the color already present in the area.

Flood fill algorithm

This method is useful when area to be filled has multiple colors in it.

Find any point in this area and replace it with fill color.

Start filling the surrounding points using the 4-connected or 8- connected approach with the color of the seed point identified in the previous step.

Keep on filling the surrounding area till the time you see a point which does not have same color as interior area.

Objective – Color the entire area with the color already present in the area.

Boundary fill algorithm

This method is used when area to be colored is defined with single color boundary.

In Boundary filled algorithm the interior points of the area are replaced with a new color.

The interior points are not filled with new color in fact they are replaced by new points.

This algorithm works only if the to be filled color and the color of the boundary of the region are not same.

sr_2018

Recent Posts

Entrepreneurship UNIT-2 ENTREPRENEURIAL PLANNING ClassXII

NOTES UNIT-2 ENTREPRENEURIAL PLANNING CLASS-XII SUBJECT- ENTREPRENEURSHIP

3 years ago

Color Generating Techniques- Computer Graphics

There are two ways by which you can see some objects colorful, let's say RED…

4 years ago

MCQs on Moving Charges and Magnetism – Ch-4 Class 12

What is the formula of Lorentz force  q = charge B = Magnetic Fields E…

4 years ago

MCQs on Electrostatic Potential & Capacitance -ch 2 Class 12

MCQs on Electrostatic Potential & Capacitance - Chapter 2 - Class 12 CBSELove to Learn…

4 years ago

MCQs – Electric Charges – Chapter 1

A. Which out of the following are conductors Metal Human Body Animal Bodies Earth All…

4 years ago

MCQs on Solutions – Chapter -2

MCQs with answer explanation on - Solutions Chapter -2 Class 12 Prepared by Experts MCQ…

4 years ago