Answer to Question #268588 in 3D CAD Modeling for King

Question #268588

Explain the Scan line coherence algorithm with an example

1
Expert's answer
2021-11-22T02:44:02-0500

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

  1. Create a polygon table having color, edge pointers, coefficients
  2. Establish edge table contains information regarding, the endpoint of edges, pointer to polygon, inverse slope.
  3. Create an Active edge list. This will be sorted in increasing order of x.
  4. Create a flag F. It will have two values either on or off.

Step3: Perform the following steps for all scan lines

  1. Enter values in Active edge list (AEL) in sorted order using y as value
  2. Scan until the flag, i.e. F is on using a background-color
  3. When one polygon flag is on, and this is for surface S1enter color intensity as I1into refresh buffer
  4. 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
  5. Use the concept of coherence for remaining planes.

Step4: Stop Algorithm



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS