This chapter shows how recursion can be used with graphics. The example program draws the snowflake figure from the first chapter on recursion.
Before reading this chapter, read the chapter on JavaFX graphics.
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.
What is name of the package that contains the classes for Java graphics?