Scan lines can deal with multiple surfaces. As each scan line is processed, this line will intersect many surfaces. The intersecting line will determine which surface is visible. Depth calculation for each surface is done. The surface rear-to-view plane is defined. When the visibility of a surface is determined, the intensity value is entered into the refresh buffer.
Â
Step1:Â Start algorithm
Step2:Â Initialize the desired data structure
- Create a polygon table having color, edge pointers, coefficients
- Establish edge table contains information regarding, the endpoint of edges, pointer to polygon, inverse slope.
- Create an Active edge list. This will be sorted in increasing order of x.
- Create a flag F. It will have two values either on or off.
Step3:Â Perform the following steps for all scan lines
- Enter values in Active edge list (AEL) in sorted order using y as value
- Scan until the flag, i.e. F is on using a background-color
- When one polygon flag is on, and this is for surface S1enter color intensity as I1into refresh buffer
- When two or image surface flags are on, sort the surfaces according to depth and use intensity value Sn for the nth surface. This surface will have the least z depth value
- Use the concept of coherence for remaining planes.
Step4:Â Stop Algorithm
Comments
Leave a comment