created: 01/03/03
CHAPTER 74 — Recursion with Graphics
This chapter builds an applet that
shows how complicated-appearing graphics
may be created with recursive Java methods.
The applet draws the snowflake figure from
the first chapter on recursion.
Chapter Topics:
- Review of applets.
- Review of applet graphics.
- The SnowFlake applet.
Most of the programs used to illustrate recursion in the previous
chapters could easily be written using iteration in place of recursion.
Of course, it is always possible to use one instead of the other.
Sometimes iteration is the obvious choice; sometimes recursion.
This chapter discusses an applet that is much easier to write
with recursion.
You may wish to review the first chapter on applets (chapter 36)
if your recollection of applets is hazy.
