setup()StructureWeb & Application
void setup() {
size(200, 200);
background(0);
noStroke();
fill(102);
}
int a = 0;
void draw() {
rect(a++%width, 10, 2, 80);
}
Function called once when the program begins running. Used to define initial enviroment properties such as screen size, background color, loading images, etc. before the draw() begins executing. Variables declared within setup() are not accessible within draw().
void setup() {
statements
}
any valid statementsNone
loop()
size()
1.0Processing FunctionPDE