0% found this document useful (0 votes)
2 views16 pages

Area Filling Algorithms Presentation

The document discusses area filling algorithms used in computer graphics, including Seed Fill, Boundary Fill, and Flood Fill, which are employed to color regions in graphics. It outlines the differences between 4-connected and 8-connected methods for each algorithm, as well as techniques for determining point locations relative to polygons using the Odd-Even Rule and Nonzero Winding Number Rule. The summary table provides a concise overview of each algorithm's basis, usage, and types.

Uploaded by

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

Area Filling Algorithms Presentation

The document discusses area filling algorithms used in computer graphics, including Seed Fill, Boundary Fill, and Flood Fill, which are employed to color regions in graphics. It outlines the differences between 4-connected and 8-connected methods for each algorithm, as well as techniques for determining point locations relative to polygons using the Odd-Even Rule and Nonzero Winding Number Rule. The summary table provides a concise overview of each algorithm's basis, usage, and types.

Uploaded by

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

Area Filling Algorithms

Seed Fill | Boundary Fill | Flood Fill


Prepared by: Roll No. 5, 6, 7
BCA 5th Semester
Subject: Computer Graphics
What is Area Filling?
• - Area filling is used to color or paint regions in
graphics.
• - Two strategies: boundary-based and interior-
based filling.
• - Used in drawing tools, games, and image
processing.
Seed Filling Algorithm (Overview)
• - Starts from a seed point inside the region.
• - Replaces specific color pixels outward until
condition fails.
• - Two types: 4-connected and 8-connected.
Seed Fill – 4-Connected Algorithm
• - Uses 4 neighbors (left, right, top, bottom).
• - Recursively replaces default color with fill
color.
• - Stops at boundary or mismatch.
Seed Fill – 8-Connected Algorithm
• - Includes diagonal neighbors.
• - Handles curved/complex regions better.
• - More complete than 4-connected.
Boundary Fill Algorithm (Overview)
• - Starts from an interior point and fills until it
reaches boundary color.
• - Requires interior point, fill color, and
boundary color.
Boundary Fill – 4-Connected
• - Uses left, right, top, bottom neighbors.
• - Recursive fill stops at boundary color.
• - Suitable for closed shapes.
Boundary Fill – 8-Connected
• - Adds diagonal neighbors for full coverage.
• - Used for irregular or rounded shapes.
Flood Fill Algorithm (Overview)
• - Used when boundary is not uniform.
• - Replaces interior color instead of searching
boundary.
• - Suitable for loose or open regions.
Flood Fill – 4-Connected
• - Checks and fills up, down, left, right.
• - Recursively replaces matching interior color.
Flood Fill – 8-Connected
• - Includes diagonal neighbors.
• - Fills complex regions completely.
Inside-Outside Test (Polygon Filling)
• - Determines whether point is inside or
outside polygon.
• - Used in scanline algorithms.
Odd-Even Rule
• - Draw line from point to edge of canvas.
• - Count edge intersections:
• Odd = Inside, Even = Outside.
Nonzero Winding Number Rule
• - Assign +1 for upward, -1 for downward
edges.
• - Sum the values:
• Non-zero = Inside.
Summary
• Algorithm | Based On | Used For | Types
• Seed Fill | Pixel Color | Interior Fill | 4 & 8-
connected
• Boundary Fill | Boundary Color | Enclosed Fill
| 4 & 8-connected
• Flood Fill | Interior Color | Loose Fill | 4 & 8-
connected
Thank You
• Presented by:
• Roll No: 5, 6, 7
• Subject: Computer Graphics
• Topic: Area Filling Algorithms

You might also like