go to home page   go to next page

created: 01/03/03; revised: 07/22/06, 06/21/16

CHAPTER 74 — Recursion with Graphics

Chapter Topics:

This chapter shows how to create complicated-appearing graphics with recursion. The example program draws the snowflake figure from the first chapter on recursion.

Any program that uses recursion could be written with iteration, and vise versa. Sometimes iteration is the obvious choice; sometimes recursion. Most of the programs in the previous chapters could just as easily have used iteration rather than recursion. This chapter discusses a graphics program that is much easier to write with recursion.


(Hazy Review: ) What is name of the class that contains the graphics methods of a Java Component?