Writing Code

Introduction to Processing

Before we write any Processing programs, let’s take some time to read one. The following is a short example of a Processing sketch that draws a picture using Processing’s built-in drawing tools. Read it and try to determine roughly what it does before executing it.

As you complete the following tasks, note that each of the commands has a real-world action that it approximates.

  • Type the sketch into Processing as-is, and execute it. Does it look anything like you imagined by examining the code?
  • Tinker with the parameters for each of the following:
    • ellipse
    • fill
    • strokeWeight
    • line
    • curve
    • size

Make at least five alterations to the sketch by manipulating these parameters.

Assignment

Record

  1. an image of your results, and
  2. a description of the parameters you changed to make the alterations.

Share these with a neighbor, and provide critical feedback.