0% found this document useful (0 votes)
44 views

Computerg 2

This document discusses and compares three rendering methods: constant intensity shading, depth sorting, and BSP trees. Constant intensity shading assigns a single intensity value to each polygon surface. Depth sorting orders surfaces from back to front and renders them sequentially. BSP trees recursively partition 3D space to determine visible surfaces from the viewpoint.

Uploaded by

Abhishek Dangol
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

Computerg 2

This document discusses and compares three rendering methods: constant intensity shading, depth sorting, and BSP trees. Constant intensity shading assigns a single intensity value to each polygon surface. Depth sorting orders surfaces from back to front and renders them sequentially. BSP trees recursively partition 3D space to determine visible surfaces from the viewpoint.

Uploaded by

Abhishek Dangol
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Constant Intensity Shading (Flat Shading)Method Depth-Sorting Method BSP Tree Method

- A fast and simple method for rendering an object with - Also known as Painter’s Algorithm. Binary Space Partitioning (BSP) tree is an efficient method
polygon surfaces is constant intensity shading. - A visible surface detection method that uses both image- for determining visibility when view reference point
- In this method, a single intensity is calculated for each space and object-space operations. changes but the scene are at fixed position.
polygon and the intensity is applied to all the points of - It performs the following two functions: - It involves identifying surfaces that are inside/front and
surface of polygon. Hence, all the points over the surface a) Surfaces are stored in order of decreasing depth. outside/back w.r.t. the partitioning plane at each step of
of the polygon are displayed with same intensity value. b) Surfaces are scan-converted in order, staring with the the space division, relative to the viewing direction.
- Constant shading is useful for quickly displaying the surface of greatest depth. - Start with any plane and find one set of objects behind
general appearance of a curved surfaces. This approach is - It follows following steps: and the rest in the front.
valid if: i. All surfaces in the scene are ordered according to the - In the tree, the objects are represented as terminal
a. Light source is at infinity (𝑁⃗ . 𝐿⃗ is constant on polygon). smallest ‘z’ value on each surface. nodes with front objects as left branches and back objects
b. Viewer is at infinity (𝑉⃗ . 𝑅⃗ is constant on polygon). ii. The surface ‘S’ at the end of the list is then compared as right branches. This algorithm partitions the space into
c. Object is polyhedron and is not an approximation of an against all other surface to see if there are any depth sub divisions until all object list contain no more than
object with a curved surface. overlap. iii. If no overlap occurs then the surface is scan one object
converted and the process is repeated with the next
surface. When there is depth overlap with ‘S’ we make the - Disadvantages:
following tests: - More polygon splitting may occur than in painter’s
a) The bounding rectangle for the two surfaces do not algorithm.
overlap. b) Surface ‘S’ is completely behind the overlapping - Appropriate partitioning hyperplane selection is quite
surface relative to viewing position. complicated and difficult
c) The overlapping surface is completely in front of ‘S’
related to viewing position. d) The boundary edge
projection of the two surfaces do not overlap
Drawback:
- If two or more surfaces alternately obscure each other it
get into an infinite loop

Polygon Clipping Windows to Viewport Transformation


It is the mechanism for displaying view of a picture on an
output device. The world coordinate selected for display is
called window. The area on the display device to which
window is mapped is called viewport. So, window defines
what is to be viewed and viewport
Sutherland-Hodgman Polygon Clipping Algorithm: defines where it is to be displayed. The mapping of part of
The Sutherland Hodgman algorithm is used for clipping world co-ordinate scene to device
polygons. In this algorithm, all the vertices of the polygon co-ordinate is called viewing transformation or window-to-
are clipped against each edge of the clipping window. viewport transformation
First the polygon is clipped against the left edge of the
clipping window to get new vertices of the polygon. These
new vertices are used to clip the polygon against right
edge, top edge, bottom edge, of the clipping window.

Line Clipping
In line clipping, a line or part of line is clipped if it is outside
the window port. There are three possibilities for the line:
a. Line can be completely inside the window (This line
should be accepted).
b. Line can be completely outside of the window (This line
will be completely removed
from the region).
c. Line can be partially inside the window (We will find
intersection point and draw only
that portion of line that is inside region).

You might also like