Chapter Questions
Write a program to map a given texture pattern onto each face of a specified cube.
Modify the program in the preceding exercise so that the pattern is mapped to each face of a tetrahedron.
Modify the program in the preceding exercise so that the pattern is mapped to a specified section of a spherical surface.
Write a program to map a given one-dimensional texture pattern onto a specified face of a cube as a diagonal stripe.
Modify the program in the preceding example so that the one-dimensional texture is mapped to the surface of a sphere, given two points on the spherical surface.
Given a spherical surface, write a bump-mapping procedure to simulate the bumpy surface of an orange.
Write a bump-mapping routine to produce surfacenormal variations for any specified bump function.
Write a complete OpenGL program to display a set of diagonal lines using various one-dimensional texture patterns.
Write a program using a two-dimensional OpenGL texture pattern to display a red-and-black checkerboard on a gray background.
Modify the program in the preceding exercise so that the checkerboard has blue and yellow squares and the background is black.
Write a program using a two-dimensional OpenGL texture pattern to display a red rectangle with a set of evenly spaced horizontal blue stripes. Set the background color to white.
Modify the program in the preceding exercise to map the texture pattern onto the surface of a sphere.
Modify the program in the preceding exercise to map the texture pattern onto the surface of the GLUT teapot.