Download presentation
Presentation is loading. Please wait.
1
Solutions to homework #6 Wu Xiaomao May 27, 2004
2
15.5 Explain for the z-buffer, depth-sort, Warnock, and BSP-tree algorithms, how piercing Polygons would be handled. Are they a special case that must be treated explicitly, or are they accommodated by the basic algorithm?
3
Z-buffer: In z-buffer algorithm, polygons get scan converted one after another, the z-buffer and fame buffer are updated when scan- converting each polygon with respected to its z value and color of each pixel. Piercing polygons can be handled by the usual algorithm.
4
Depth-sort The depth-sort algorithm is a list-priority algorithm and does handle neither piercing nor overlapping polygons. It sorts the polygons by their farthest z value and draws the nearest polygon. When handling piercing polygons, we can just split the polygons into several polygons which do not pierce each other, which can be handled by the ordinary depth-sort algorithm.
5
Warnock Warnock’s algorithm will divide the area around the piecing polygons until the resolution of the display device is reached. Then it will use the depth-sort algorithm or z-buffer algorithm to determine which polygon is the nearest at the center of the pixel. So piercing polygons will be treated correctly in standard warnock algorithm, there are no special cases need to be handled.
6
BSP-tree The binary spare partitioning tree algorithm belongs to list-priority algorithms. It handles piercing polygons in a straight way. The polygons just divide the space into two different spaces so that piercing polygons be cut into two new polygons that are handled accordingly.
7
15.19 When ray tracing is performed, it is typically necessary to compute only whether or not a ray intersects an extent, not what the actual points of intersection are. Complete the ray-sphere intersection equation using the quadratic formula, and show how it can be simplified to determine only whether or not the ray and sphere intersect.
8
Solution: The original equation can be written as: if b 2 -4ac=0 one intersection point else if b 2 -4ac>0 two intersection point else if b 2 -4ac<0 don’t intersect
9
15.24 Implement a simple ray tracer for sphere and polygons, including adaptive supersampling(Choose one of the illumination models from Section 16.1) Improve your program’s performance through the use of spatial partitioning or hierarchies of bounding volumes.
10
Marco Kunze Martin Mehlitz
11
Sebastian Nowozin Timo Glaser
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.