Points
- Explained the difference between the Cartesian coordinate system and the Processing coordinate system.
point(x, y);
line(x1, y1, x2, y2);
Shapes
rect(x, y, w, h);
rectMode(CORNER); // default
rectMode(CENTER);
rectMode(CORNERS);
rect(x1, y1, x2, y2);
ellipseMode(CENTER); //default
ellipse(x, y, w, h);
- http://www.learningprocessing.com//learning/tutorials/basics
- http://www.learningprocessing.com/exercises/chapter-1/exercise-1-1/
- http://www.learningprocessing.com/exercises/chapter-1/exercise-1-2/
- http://www.learningprocessing.com/exercises/chapter-1/exercise-1-3/
Color
- Covered grayscale, RGB, HSB and alpha colors in Processing.
- Walked through some examples in order to explain how color funcations apply to shapes.
noStroke();
stroke();
noFill();
fill();
- http://www.learningprocessing.com/learning/tutorials/color/
- http://www.learningprocessing.com/exercises/chapter-1/exercise-1-4/
- http://www.learningprocessing.com/exercises/chapter-1/exercise-1-5/
- http://www.learningprocessing.com/exercises/chapter-1/exercise-1-6/
- http://www.learningprocessing.com/examples/chapter-1/example-1-1/
- http://www.learningprocessing.com/examples/chapter-1/example-1-2/
- http://www.learningprocessing.com/examples/chapter-1/example-1-3/
- http://www.learningprocessing.com/examples/chapter-1/example-1-4/
Zoog!
http://www.learningprocessing.com/examples/chapter-1/example-1-5/
The Processing Application
- Serves as the Processing IDE, Integrated Development Envronment.
- IDE is a fancy acronym that refers to the app you write code with.
- Talked about the idea of "sketches" & the sketchbook.
Syntax
- Reviewed the three general statement types of function calls, assignments, and control structures.
- Explained that in the beginning, almost every line will be a function call.
- Dissected a function call into its constituent parts of name & arguments.
println("omg sheuz!");
// single line comment
/*
multi
line
comment
*/
The Reference
http://processing.org/reference/
Interaction
- Discussed
setup()anddraw(). - Covered the
mouseX,mouseY,pmouseX,pmouseYconstants. - Showed that
draw()redraws on each frame by placingbackground()insetup(). - Defined some
mousePressed(),mouseReleased(), andmouseClicked()event handlers.
void draw() {
background(208);
// a rect that follows the mouse around
rectMode(CENTER);
rect(mouseX, mouseY, 20, 20);
}
void draw() {
// draw on the screen with a pen
line(mouseX, mouseY, pmouseX, pmouseY);
}
- http://www.learningprocessing.com/exercises/chapter-2/exercise-3-3/
- http://www.learningprocessing.com/exercises/chapter-2/exercise-3-4/
- http://www.learningprocessing.com/exercises/chapter-2/exercise-3-7/
- http://www.learningprocessing.com/examples/chapter-3/example-3-1/
- http://www.learningprocessing.com/examples/chapter-3/example-3-2/
- http://www.learningprocessing.com/examples/chapter-3/example-3-3/
- http://www.learningprocessing.com/examples/chapter-3/example-3-4/
- http://www.learningprocessing.com/examples/chapter-3/example-3-5/
- http://www.learningprocessing.com/examples/chapter-3/example-3-6/
