• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

BMS Processing Class

A Course23.com Production

"Stop, Pause, and Think..." -- Ms. Elwell
"Take your time, it isn't a race" -- Mr. Helmke

  • Home
  • Graphing and Color
    • Graphing Shapes
      • Activity 1
      • Activity 2
    • Color (R,G,B) and Grey Scale
      • Activity 3
      • Activity 4
  • Code and Sketches
    • Parts of Code
      • Activity 5
    • Your Code & OpenProcessing Sketches
      • Activity 6
      • Activity 7
  • Variables, etc
    • Variables
      • Activity pre8 and 8
      • Activity 8.1
      • Activity 9
      • Activity 10
      • Activity 11
      • Activity 11.1
    • Operator Precedence
      • Activity 12
      • Activity 13
    • Random
      • Activity 14
      • Activity 15
  • Conditionals – If, Else, Else If
  • Resources

Activity 3

Use your Notebook/Notability.

Using the fill() and rect() functions, code the four rectangles below.

Assume this square is like our graph paper and is a 400×400 grid with (0,0) in the upper left corner.
Every line of code gets it’s own line on the paper.

Comment each line of code // and tell me either the color or which rectangle you are coding.

Because the computer remembers what you tell it, you are allowed to code for white ONE time and then put the two white RECT codes below your fill white.  Write neatly and submit your code when you are done.  You may write it out on paper and take a photo and submit the photo.

fill(   ,    ,    );//name the color

rect(     ,     ,     ,     );//identify which rect you’re coding… top left, bottom right, etc.

 

Go back to:  Color

Primary Sidebar

Required Reading:

Course Coding Standards

Copyright © 2016–2021 Chris Elwell/Michael Helmke · This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License · Log in