Question: Hidden Surface Removal Assume that you are given a sequence of N convex polygons with (x,y,z) coordinates defined for each polygon vertex. Your goal is

Hidden Surface Removal

Assume that you are given a sequence of N convex polygons with (x,y,z) coordinates defined for each polygon vertex. Your goal is to create an image where only the visible portions of each polygon appear on the screen, and hidden surfaces are removed.

a) Describe how the z-buffer algorithm for hidden surface removal works.

Basic idea is to store the depth of the polygon at each (x, y) location in a z-buffer array. Then when we display each polygon, we compare the polygon depth at (x, y) to z-buffer depth at (x, y).

If polygon depth is less than the z-buffer depth:

* Save polygon color

* Update z-buffer to polygon depth

No sorting of polygons is needed!

Hidden Surface Removal Assume that you are given a sequence of N

b) Describe how the painters algorithm for hidden surface removal works.

Basic idea is to draw polygons that are far away first, and then draw closer polygons on top of far polygons

c) Give one advantage of the z-buffer versus the painters algorithm.

d) Give one advantage of the painters versus the z-buffer algorithm.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!