This page demonstrates some applets related to Java applications discussed in Chapter 7 of Computer Graphics for Java Programmers, 2nd Edition.


Exercise 7.3. Two rotating colored cubes, one partly hiding the other




Exercise 7.4. Changing position of light source




Exercise 7.5. Stairs with a variable number of steps
n = number of steps
w = width (relative to step height)
d = step depth (relative to step height)
The height of each step is 1.
Check or change the values of n, w and d below and click on the OK button.




Exercise 6.9. Two tori, hidden-face model
(See the applets of Chapter 6 for a hidden-line model of the same object.)

n = number of small circles on each torus
r = radius of center circle of each torus (at least 2)
Each small circle has radius 1.
Check or change the values of n and r below and click on the OK button.