Yep, the last review
The exam will be on Tuesday, March 2!
There is a Moodle upload for today
Stuff to master
Remember the text… The SparkFun Guide to Processing
We've gone to Chapter 7, but we'll stop at Chapter 5 for this test
Chapter 0
make sure you can use the IDE
Check out the tools
It will be helpful in checking your answers
setup() and draw() and size()
the coordinate system — each dot has an "address"
Chapter 1
The various things
Color —
colorMode(): RGB and HSB, oddly you can set your range
Might be best to use the default
RGB — 0-255 (or HTML color codes)
HSB — 0-360, 0-100, 0-100
color() to choose… Lots of variations!
fill(), stroke(), nostroke(), background()
Chapter 2
Generally, the order of drawing matters…
making a doughnut — draw the dough then the hole
How to do stuff
colors — fill(), stroke() or noStroke()
modes — rectMode(), ellipseMode(), imageMode()
CENTER, CORNER, CORNERS
ellipse(), line(), quad(), circle(), rect(), triangle()
strokeWeight(), strokeCap() … probably not
printing — println(), Very useful for debugging
Chapter 3
variables!
types — int, float, char, boolean, String (a class)
there is little need for long and double
global vs local variables — the global can be shared by functions
Usual arithmetic operators: +, -, *, /, %
Usual relational operators: ==, !=, >, >=, < , <=
if (text) { body } ; ALWAYS use the { } and INDENT
boolean operatiots:
&&, ||, !
Chapter 4
interactive art
the mouse — mouseX, mouseY, key
time — millis(), year() maybe second()
transformations
scale(), rotate(), translate()
Chapter 5 — This is useful
The Matrix
pushMatrix() & popMatrix()
translate(), rotate(), scale()
If you are ambitious you can read Adam Whitley’s huge list
of the problems he has used in CSCI 182.
Actitivity for today
Write a program to produce a Mickey Mouse face
(ellipse Ears, ellipse nose, round eyes, closed mouth, …)
and upload to Moodle