No edit summary |
|||
Line 2: | Line 2: | ||
== Homework 1 == | == Homework 1 == | ||
Our first Homework was to create a slideshow of previously taken pictures. | |||
My topic was branches and this is my code: | |||
<source lang = "java"> | |||
PImage[] images = new PImage[9]; | |||
void setup() { | |||
size(300, 300); | |||
frameRate(5); | |||
for (int i = 0 ; i < images.length; i++) | |||
{ | |||
images [i] = loadImage("b" + nf(i+1, 2) + ".JPG"); | |||
} | |||
} | |||
void draw() | |||
{ | |||
int counter = frameCount % 9; | |||
image(images[counter], 0, 0, 300, 300); | |||
} | |||
</source lang = "java"> | |||
which resulted in this: | |||
http://cdn.makeagif.com/media/1-12-2016/pAZ-YO.gif | |||
== Homework 2 == | == Homework 2 == | ||
== Homework 3 == | == Homework 3 == |
Revision as of 15:34, 12 January 2016
The is the "Processing im Park" page of Jason Langheim.
Homework 1
Our first Homework was to create a slideshow of previously taken pictures. My topic was branches and this is my code:
<source lang = "java"> PImage[] images = new PImage[9];
void setup() {
size(300, 300); frameRate(5); for (int i = 0 ; i < images.length; i++) { images [i] = loadImage("b" + nf(i+1, 2) + ".JPG"); }
} void draw() {
int counter = frameCount % 9; image(images[counter], 0, 0, 300, 300);
}
</source lang = "java">
which resulted in this: