Slides

Slides are posted in the order that we will visit them in class. All slides are in PDF format, with 1 slide per page.


Course Information

Pixels and Processing

Simple Programs

Sample code: Zoog (original static version)

Sample code: Color Show (demonstrates different red/green/blue combinations)

Sample code: Zoog, version 2 (follows the mouse pointer, uses setup() and draw() functions)

Sample code: Moving Rectangles (random numbers, frameRate(), variables)

Sample code: Zoog, version 3 (changes color in response to mouse clicks)  

Sample code: Moving Ball (one ball moving in two dimensions and changing color)

Sample code: Moving Ball 2 (two balls bouncing and changing color)

Sample code: Drawing Shapes (uses mousePressed() and keyPressed())

Sample code: Moving Boxes (uses a while loop to draw several rectangles simultaneously)

Sample code: Checkerboard (uses nested loops to draw a red-and-black checkerboard)

Variables and Expressions

Fundamental Concepts (Conditionals, Loops, Functions)

Sample code: Using For Loops to Draw Rectangles

Sample code: Function Examples

Sample code: Variable Scope

Sample code: Recursively-drawn Squares

Sample code: Classes (the Invader example)

Sample code: Array Examples

Sample code: Chutes and Ladders, version 1 (the BoardSquare and Player classes)

Sample code: Chutes and Ladders, version 2 (adds the Die class and the ability to move a player's game token a random number of squares forward)

Classes and Arrays

Advanced Graphics (chapters 14-15: rotation, translation, 3D, polygons, and images)

Sample code: Introduction to 3D

Sample code: Drawing Polygons

Sample images (instructions: create a new Processing sketch for your program, save it at least once, then place these files inside a "data" folder inside the sketch folder):

clownfish.jpg

jesterdog.jpg

Sample code: Image Test

Sample code: Blue Tint

Text Processing (chapter 17: fonts and Strings)

Note: To run the following sample code, you may need to change the calls to createFont() to refer to fonts that you have installed on your computer. Use "println(PFont.list())" to get a list of installed fonts.

Sample code: Font Examples

Sample code: LOLdog (this code requires the jesterdog.jpg image above)

(original inspiration for this sketch: http://www.lolcats.com/)

Sample code: Scrolling Text (inspired by the text crawl at the beginning of every "Star Wars" movie)

Sample code: 3D spheres

Sample code: The Sierpinski Carpet (the source code is technically incorrect, in that the Sierpinski Gasket uses triangles, while the Sierpinski Carpet uses squares)

More fractal links:

The Mandelbrot set

The Sierpinski Triangle

• The Sierpinski Carpet

This page was last modified on 11/22/09