Cover

2 - Processing Processing

Goals

Processing

How to Get Processing

http://processing.org/

The Processing App

The Processing IDE is a simplified environment for developing "sketches "

IDE

Test Processing

The Sketchbook

Coding: Syntax

Coding: Style

MyFirstProgram

MyFirstProgramRunning MyFirstProgram

MyFirstProgram Notes

Errors

Make a syntax error: change ellipse to elipse and click "Run"

Error

Error Notes

Exercise

Fix the errors in the following code:

size(200,200;
background();
stroke 255;
fill(150)
rectMode(center);
rect(100,100,50);

The Processing Reference

"Run" - What Really Happens

Processing programs start out as text, they are translated into byte code, and then executed to run.

  1. Translate to Java
  2. Compile into Java byte code
    • produces a JAR (Java ARchive) file containing compiled Java code (class files), images, fonts, and other data files
  3. Execute JAR file using JVM (Java Virtual Machine)

Publishing

Exercise

Exercise: Using what you designed in Chapter one, implement your own sketch, using only 2D primitive shapes - arc(), curve(), ellipse(), line(), point(), quad(), rect(), triangle() - and basic color functions - background(), colorMode(), fill(), noFill(), noStroke(), stroke(). Remember to use size() to specify the dimensions of your window.