• Home
  • Textbooks
  • Computer Graphics with Open GL
  • Visible-Surface Detection Methods

Computer Graphics with Open GL

Donald Hearn. M. Pauline. Baker, Warren R.Carithers

Chapter 14

Visible-Surface Detection Methods - all with Video Answers

Educators


Chapter Questions

03:24

Problem 1

Set up a back-face detection procedure that will identify all the visible faces of any input convex polyhedron that has different-colored surfaces. The polyhedron is to be defined in a right-handed viewing system, and the viewing direction is specified as user input.

Jay Patel
Jay Patel
Numerade Educator
00:42

Problem 2

Implement the procedure in the preceding exercise using an orthographic parallel projection to view visible faces of the input convex polyhedron. Assume that all parts of the object are in front of the view plane.

Ashley High
Ashley High
Numerade Educator
01:18

Problem 3

Implement the procedure in Exercise 1 using a perspective projection to view visible faces of the input convex polyhedron. Assume that all parts of the object are in front of the view plane.

Ashley High
Ashley High
Numerade Educator
00:52

Problem 4

Write a program to produce an animation of a convex polyhedron. The object is to be rotated incrementally about an axis that passes through the object and is parallel to the view plane. Assume that the object lies completely in front of the view plane. Use an orthographic parallel projection to map the views successively onto the view plane.

AG
Ankit Gupta
Numerade Educator
00:55

Problem 5

Modify the program in the preceding exercise to allow the user to switch between an orthographic parallel projection and a perspective projection using keyboard input.

Kashif Qureshi
Kashif Qureshi
Numerade Educator
00:39

Problem 6

Write a routine to implement the depth-buffer method for the display of the visible surfaces of any input polyhedron. The array for the depthbuffer can be set to any convenient size on your system, such as $500 \times 500$. How can the storage requirements for the depth buffer be determined from the definition of the objects to be displayed?

Allison Knapp
Allison Knapp
Numerade Educator
01:06

Problem 7

Modify the procedure in the preceding exercise to display the visible surfaces in a scene containing any number of polyhedrons. Set up efficient methods for storing and processing the various objects in the scene.

Melissa Stefan
Melissa Stefan
Numerade Educator
02:53

Problem 8

Write a program using the procedure in the previous exercise that takes as input a set of polyhedrons contained within a (conceptual) sphere of a given radius centered at the origin. Each time a certain key is pressed, the program should generate a new random camera position outside of the sphere and a random look-at point somewhere inside the sphere. The view up vector should always be the positive y unit vector. The program should then display the visible surfaces of the objects in the scene from that viewpoint.

Morgan Cheatham
Morgan Cheatham
Numerade Educator
03:01

Problem 9

Modify the procedure of the preceding exercise to implement the A-buffer algorithm for the display of a scene containing both opaque and transparent surfaces.

Aja S
Aja S
Numerade Educator
01:43

Problem 10

Extend the procedure developed in the preceding exercise to include antialiasing.

Kaylee Mcclellan
Kaylee Mcclellan
Numerade Educator
02:53

Problem 11

Write a program using the procedure in the previous exercise that takes as input a set of polyhedrons contained within a (conceptual) sphere of a given radius centered at the origin, each of which have randomized transparency values. Each time a key is pressed, the program should generate a new random camera position outside of the sphere and a random look-at point somewhere inside the sphere. The view up vector should always be the positive $y$ unit vector. The program

Morgan Cheatham
Morgan Cheatham
Numerade Educator
02:07

Problem 12

Develop a program to implement the scan-line algorithm for displaying the visible surfaces of a given polyhedron. Use polygon tables to store the definition of the object, and use coherence techniques to evaluate points along and between scan lines.

Aatish Gupta
Aatish Gupta
Numerade Educator
03:50

Problem 13

Write a program to implement the scan-line algorithm for a scene containing several polyhedrons. Use polygon tables to store the definition of the object, and use coherence techniques to evaluate points along and between scan lines.

Morgan Cheatham
Morgan Cheatham
Numerade Educator
03:50

Problem 14

Set up a program to display the visible surfaces of a convex polyhedron using the painter's algorithm. That is, surfaces are to be sorted on depth and painted on the screen from back to front.

Morgan Cheatham
Morgan Cheatham
Numerade Educator
03:50

Problem 15

Write a program that uses the depth-sorting method to display the visible surfaces of any given object with plane faces.

Morgan Cheatham
Morgan Cheatham
Numerade Educator
02:27

Problem 16

Develop a depth-sorting program to display the visible surfaces in a scene containing several polyhedrons.

Abigail Martyr
Abigail Martyr
Numerade Educator
03:37

Problem 17

Write a program to display the visible surfaces of a convex polyhedron using the BSP-tree method.

Grant Castaneda
Grant Castaneda
Numerade Educator
00:53

Problem 18

Give examples of situations where the two methods discussed for condition 3 in the areasubdivision algorithm will fail to identify correctly a surrounding surface that obscures all other surfaces.

Norman Atentar
Norman Atentar
Numerade Educator
03:59

Problem 19

Develop an algorithm that would test a given plane surface against a rectangular area to decide whether it is a surrounding, overlapping, inside, or outside surface.

Morgan Cheatham
Morgan Cheatham
Numerade Educator
00:18

Problem 20

Develop an algorithm for generating a quadtree representation for the visible surfaces of an object by applying the area-subdivision tests to determine the values of the quadtree elements.

Ian Shi
Ian Shi
Numerade Educator
05:18

Problem 21

Set up an algorithm to store a quadtree representation of an object in a frame buffer.

Chris Trentman
Chris Trentman
Numerade Educator
01:18

Problem 22

Set up a procedure to display the visible surfaces of an object that is described with an octree representation.

Ashley High
Ashley High
Numerade Educator
01:30

Problem 23

Use the procedure developed in the previous exercise to write a program that displays the visible surfaces of a set of objects represented as octree structures. The viewing parameters should be taken in as input.

Carson Merrill
Carson Merrill
Numerade Educator
02:58

Problem 24

Devise an algorithm for viewing a single sphere using the ray-casting method.

Chris Trentman
Chris Trentman
Numerade Educator
01:25

Problem 25

Discuss how antialiasing methods can be incorporated into the various hidden-surface elimination algorithms.

Florencia Cuzmar
Florencia Cuzmar
Numerade Educator
01:40

Problem 26

Write a routine to produce a surface contour plot for a given surface function $f(x, y)$.

Abigail Martyr
Abigail Martyr
Numerade Educator
01:06

Problem 27

Develop an algorithm for detecting visible line sections in a scene by comparing each line in the scene to each polygon surface facet.

John Irizar
John Irizar
Numerade Educator
02:13

Problem 28

Discuss how wire-frame displays might be generated with the various visible-surface detection methods discussed in this chapter.

Hubert Agamasu
Hubert Agamasu
Numerade Educator
01:39

Problem 29

Set up a procedure for generating a wire-frame display of a polyhedron with the hidden edges of the object shown as dashed lines.

Matthew Biollo
Matthew Biollo
Numerade Educator
02:53

Problem 30

Write a program using the procedure developed in the previous exercise that takes a set of polyhedrons contained within a (conceptual) sphere of a given radius centered at the origin as input and displays them as wireframe objects with the hidden edges of each object shown as dashed lines. Each time a key is pressed, the program should generate a new random camera position outside of the sphere and a random lookat point somewhere inside the sphere. The view up vector should always be the positive $\mathrm{y}$ unit vector.

Morgan Cheatham
Morgan Cheatham
Numerade Educator
03:08

Problem 31

Write a program to display a polyhedron with selected faces removed, using the OpenGL polygon-culling functions. Each face of the polygon is to be given a different color, and a face is to be selected for removal with user input. Also, a viewing position and other viewing parameters are to be specified as input values.

Harriet O'Brien
Harriet O'Brien
Numerade Educator
01:53

Problem 32

Modify the program in the preceding exercise to view the polyhedron from any position, using the depth-buffer routines instead of the polygonculling routines.

Joanna Quigley
Joanna Quigley
Numerade Educator
00:52

Problem 33

Modify the program in the preceding exercise so that the depth range and the depth test condition can also be specified as user input.

Amy Jiang
Amy Jiang
Numerade Educator
00:42

Problem 34

Generate a wire-frame display of a polyhedron using the glPolygonMode andglPolygonoffset functions as discussed in Section 14 .

James Chok
James Chok
Numerade Educator
02:12

Problem 35

Modify the program of the preceding exercise to display the polyhedron using the depth-cueing function g 1Fogi.

Emily Min
Emily Min
Numerade Educator
02:16

Problem 36

Modify the program of the preceding exercise to display several polyhedrons that are distributed in depth. The depth-cueing range is to be set with user input.

Teresa Fuston
Teresa Fuston
Numerade Educator
12:49

Problem 37

Modify the program in the previous exercise to allow the change the camera position by moving it around the surface of a sphere whose radius is defined as the distance from the camera position to the look-at point, which is assumed to be a point within the coordinate extents of the set of objects in the scene. The distance from the camera to the look-at point is assumed to be large enough to make all objects lie in front of the view plane for any camera position on the the view plane for any camera position on the sphere.

Ryan Kutayiah
Ryan Kutayiah
Texas A&M University