| Z-Buffer Algorithm - Writeup Phil Katz and Stephen St.Vincent | |
|
Lab description Lab summary: For this lab, we implemented a Z-Buffer algorithm for our graphics environment. We added a z-buffer data field to the Image structure, and appropriate flags and modifiers to other structures. The most intricate part of the algorithm was implementing the Z-Buffer for polygons. We had to create fields to help interpolate 1/Z values for each point along each scanline, and compare these values to the current value in the Z-Buffer. We also implemented 1/Z value interpolation for each point along a line for each case of Bresenham's Line-Drawing Algorithm.
|