Determine the algorithm for z-buffer method, Data Structure & Algorithms

Assignment Help:

Algorithm for Z-Buffer Method

(a)  Initialize every pixel in the viewport to the smallest value of z, namely z0 the z-value of the rear clipping plane or "back-ground". Store all values in the z-buffer. 

 (b)  Start polygon loop i = 1 to n, n being the number of polygons.

(i)  Scan convert each pixel, that is, find the value of z for each (x, y) for the polygon.

(ii) Compare it with the z′ value stored for that (x, y). If z < z′, then the new point is closer to the viewer than the previous point, and hence is visible in front of the previous point; reset z′ to the new value.

(c)  End loop on i.

(d)  Plot only the final z′ values in the z-buffer for all (x, y) in the viewport, with the appropriate colour or gray scale and other attributes.

 


Related Discussions:- Determine the algorithm for z-buffer method

Graph search using iterative deepening, Prove that uniform cost search and ...

Prove that uniform cost search and breadth- first search with constant steps are optimal when used with the Graph-Search algorithm (see Figure). Show a state space with varying ste

Entity relationship diagram, This question is based on the requirements of ...

This question is based on the requirements of a system to record band bookings at gigs. (A 'gig' is an event at which one or more bands are booked to play). You do not need to know

Frequency count, what is frequency count with examble

what is frequency count with examble

An algorithm to insert a node in beginning of linked list, Q. Write down an...

Q. Write down an algorithm to insert a node in the beginning of the linked list.                         Ans: /* structure containing a link part and link part

Explain complexity of an algorithm, Complexity of an Algorithm An algo...

Complexity of an Algorithm An algorithm is a sequence of steps to solve a problem; there may be more than one algorithm to solve a problem. The choice of a particular algorith

Deletion of an element from the linked list, A LGORITHM (Deletion of an ele...

A LGORITHM (Deletion of an element from the linked list) Step 1  Begin Step 2  if the list is empty, then element cannot be deleted Step 3  else, if the element to be del

User-specified memory location, You need to implement a function which will...

You need to implement a function which will write out a given user-specified memory location to disk in base 10. That means that you have to convert the large number data structure

Algo for quicksort, Easy algorithm for beginner for quicksort with explanat...

Easy algorithm for beginner for quicksort with explanation

How can the third dimension be displayed on the screen, How can the third d...

How can the third dimension be displayed on the screen The main problem in visualization is the display of three-dimensional objects and scenes on two-dimensional screens. How

Randomized algorithm, need an expert to help me with the assignment

need an expert to help me with the assignment

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