|
|
Line 14: |
Line 14: |
|
| |
|
|
| |
|
| ====--- Processing3.0 Code--- ====
| | [http://www.uni-weimar.de/medien/wiki/GMU:Processing_im_Park/Emilio_Aguas/Code_Fancy_Rocks |
| | | ] |
| <source lang="java">
| |
| PImage img01;
| |
| PImage img02;
| |
| PImage img03;
| |
| PImage img04;
| |
| PImage img05;
| |
| PImage img06;
| |
| PImage img07;
| |
| PImage img08;
| |
| PImage img09;
| |
| | |
| | |
| void setup() {
| |
| size(600, 400);
| |
| background(155);
| |
| img01 = loadImage("FancyRock01.JPG");
| |
| img02 = loadImage("FancyRock02.JPG");
| |
| img03 = loadImage("FancyRock03.JPG");
| |
| img04 = loadImage("FancyRock04.JPG");
| |
| img05 = loadImage("FancyRock05.JPG");
| |
| img06 = loadImage("FancyRock06.JPG");
| |
| img07 = loadImage("FancyRock07.JPG");
| |
| img08 = loadImage("FancyRock08.JPG");
| |
| img09 = loadImage("FancyRock09.JPG");
| |
| }
| |
| | |
| //changing images for a repeating cycle every 9 seconds | |
| void draw() {
| |
| if (second() % 9 == 0) {
| |
| image(img01, 0, 0, width, height);
| |
| }
| |
| if (second() % 9 == 1) {
| |
| image(img02, 0, 0, width, height);
| |
| }
| |
| if (second() % 9 == 2) {
| |
| image(img03, 0, 0, width, height);
| |
| }
| |
| if (second() % 9 == 3) {
| |
| image(img04, 0, 0, width, height);
| |
| }
| |
| if (second() % 9 == 4) {
| |
| image(img05, 0, 0, width, height);
| |
| }
| |
| if (second() % 9 == 5) {
| |
| image(img06, 0, 0, width, height);
| |
| }
| |
| if (second() % 9 == 6) {
| |
| image(img07, 0, 0, width, height);
| |
| }
| |
| if (second() % 9 == 7) {
| |
| image(img08, 0, 0, width, height);
| |
| }
| |
| if (second() % 9 == 8) {
| |
| image(img09, 0, 0, width, height);
| |
| }
| |
| }
| |
| | |
| </source>
| |
|
| |
|
| ==Second Assignment== | | ==Second Assignment== |