Final answer:
The correct answer is option (C) both p and q. Approach p is the scan-line fill algorithm, while approach q is the flood fill algorithm. These approaches are used to fill areas on raster systems.
Step-by-step explanation:
The correct answer is option (C) both p and q.
Approach p is known as scan-line fill algorithm, where we determine the overlapping intervals for scan lines that cross the area. This approach helps in determining the exact pixels to be filled in a raster system.
Approach q is known as flood fill algorithm, where we start from a given interior position and paint outward until we encounter the specified boundary conditions. It is used to fill a bounded area by selecting a seed point and recursively filling the neighboring pixels.
Approaches p and q are both correct methods for filling areas in raster systems; p uses scan-line filling and q uses flood-fill or seed-fill algorithms.
The question you've asked pertains to the methods used for filling areas in raster graphics systems. Statement p refers to a method where the system identifies overlap intervals for scan lines that cross a particular area. This is related to the scan-line filling algorithm, which is used to determine which pixels within a scan line need to be filled. Statement q describes the flood-fill or seed-fill algorithm, where you start from a given point inside the area and paint outward until a boundary condition is met. Both p and q are valid approaches used in graphics systems to fill areas. Therefore, the correct answer is C) both p and q.