created 01/22/00


Chapter 38 Programming Exercises

Exercise 1

Experiment with the red and blue concentric circle applet to enhance the stereo effect. You will need some red/blue 3D vision glasses. If you don't have them, try the next method.

Click here to go back to the main menu.


Exercise 2

Draw the two sets of concentric circles side by side, separated by about six centimeters. Don't draw identical images; draw one set of circles with increasing offset the closer to your eye they are supposed to be. When displayed, look at the left set with your left eye, the right set with your right eye, and try to merge the two images together.

Click here to go back to the main menu.


Exercise 3

Draw 10 complete big circles randomly positioned in the applet. To draw complete circles, test that each randomly generated center is further from the edge than the radius of a circle.

Click here to go back to the main menu.


Exercise 4

Draw 10 complete circles randomly positioned in the applet, with random radii in the range 5 to 25 pixels. Randomly pick each circle's color (use a random int and nested if statements.)

Click here to go back to the main menu.


End of the Exercises