Z- buffer algorithm, Computer Graphics

Assignment Help:

Q. Describe the z- Buffer algorithm for hidden surface removal.

Ans. Z- buffer method: This method compares surface depths at each pixel position on the projection plane. The surface depth is measured from the view plane along the z- axis of a viewing system. When object description is converted to projection coordinates (x, y, z) each pixel position on the view plane is specified by x & y coordinate, and z value gives the depth information. Thus object depth can by comparing the z- values. The z- buffer algorithm is usually implemented in the normalized coordinates, so that z- values range from 0 at the back clipping plane to 1 at the front clipping plane. Z- Buffer Algorithm  1. Initialize the depth buffer and refresh buffer so that for all buffer position (x, y), depth (x, y) =0 refresh (x, y) = 1 background. 2. For each position on each polygon surface, compare depth values to previously started values in the depth buffer to determine visibility. (a) Calculate the depth z for each (x,y) position on the polygon. (b) If z> depth (x, y) then set depth (x, y) =z refresh (x, y) = Isuff (x, y) Where I background intensity and Isuff (x, y) is the projection intensity value for the surface at pixel position (x, y). After all surface have been processed, the depth buffer contains depth values for the visible surface and the refresh buffer contains the corresponding intensity values for those surface. In the figure, among three surface, surface S1 has the smallest depth at view position (x, y) and hence highest z value. So it is visible at that position. To calculate the z- value, the plane equation Ax + By + Cz + D = 0 is used where (x, y, z) is any point on the plane, and the coefficient A, B, C and D are contents describing the spatial properties of the plane.                                                     Only one subtraction is needed to calculate z (x + 1, y) given z (x, y), since the quotient A/C is constant and ^x = 1. A similar incremental calculation cam be performed to determine the first value of z on the next scan line, decrementing by B/C for each ^y. Drawback of z- buffer (i) It requires an additional buffer and hence the large memory. (ii) It is a time consuming process as it requires comparison for each pixel instead for the entire polygon. 

 

 


Related Discussions:- Z- buffer algorithm

Object oriented tools, Object Oriented Tools: In such authoring systems, m...

Object Oriented Tools: In such authoring systems, multimedia components and events turn into objects that live in hierarchical order of parent and child relations. Messages are pa

Design and label the pattern of the folding carton, Question : You have...

Question : You have been approached to design a ‘tuck top auto-lock bottom' carton package for a high-end cosmetic jar under the brand name ‘Beauty One'. Your client asked you

Types of graphic images, Types of Graphic Images: Graphic images have...

Types of Graphic Images: Graphic images have been processed through a computer can generally be divided in two distinct categories. That image is either bitmap files or vecto

Objectives-visible-surface detection, After going through this section, you...

After going through this section, you should be capable to: know the meaning of Visible-surface detection; distinguish among image-space and object-space approach for vi

Write a code to continuously rotate square about pivot point, Write a code ...

Write a code to continuously rotate a square about a pivot point.    #include   static GLfloat rotat=0.0;   void init(void); void display(void); void reshape(int w

Remark for the bresenham line generation algorithm, Remark for the Bresenha...

Remark for the Bresenham Line Generation Algorithm Remark: The algorithm will be properly the same if we suppose | m | Algorithm | m | (a) Input two line endi

Determine the term- virtual reality, Determine the term- Virtual Reality ...

Determine the term- Virtual Reality Virtual Reality (VR) This is an artificial 3D environment which is created by a computer system. Very often user wears data helmet, d

Homogeneous coordinates, What are the uses of homogeneous coordinates? Conv...

What are the uses of homogeneous coordinates? Convert translation rotation and scaling in homogeneous coordinates. In mathematics homogeneous coordinates introduced by August

What is persistence, Persistence: How long they continue to emit light (...

Persistence: How long they continue to emit light (that is, have excited electrons returning to the ground state) after the CRT beam is removed. Persistence is defined as the ti

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd