Lab 02: Graphics + Recursion = Fractals


  1. Announcements
  2. Lab 02 Suggestions
  3. Small group work


  1. Accountability group survey
  2. First quiz this week
    • topic will be recursion
    • conceptual question
    • related to Wednesday lecture material

Lab 02 Suggestions

Lab 02 Overview

Instructions here

A Closer Look

How Was This Generated?

Notes on Overlap

  • Drawing commands executed in order
  • New drawings on top of old:

Code above will show square B in foreground (if squares A and B overlap)

Difference Between Images

Recursion Depth

Draw picture to depth 0, 1, 2

Look at the Code

  • Keep track of current depth
  • Compiling with command line
  • What happens with infinite loop?