No edit summary |
|||
(14 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Homework one == | == Homework one == | ||
15 pieces in grid - Quellcode: | |||
[[Image:grid1.png]] | |||
[[Image:grid2.png]] | |||
slideshow of 9 images: | |||
[[Image:slide1.png]] | |||
[[Image:slide2.png]] | |||
cut tiles - Quellcode: | |||
[[Image:Collage_Brueckenschloss.png]] | |||
== Homework two == | == Homework two == | ||
sliced Duck - Quellcode: | |||
[[Image:sliced_duck_Quellcode.png]] | |||
Weimaraner brushed plaque - Quellcode: | |||
[[Image:Weimaraner_Quellcode.png]] | |||
Parkhöhle - Quellcode: | |||
[[Image:Code Parkhöhle a.png]] | |||
[[Image:Code Parkhöhle b.png]] | |||
== End of Semester == | |||
Snow Cannon - Quellcode | |||
<source lang = "java"> | |||
PImage img; | |||
int m = 200; | |||
int p = 30; | |||
color c; | |||
int value = 0; | |||
int q; | |||
int a; | |||
int j; | |||
import processing.sound.*; | |||
SoundFile file; | |||
void setup() { | |||
size(640, 465); | |||
img=loadImage("Schneekanone1.jpg"); | |||
image(img, 0, 0); | |||
file = new SoundFile(this, "Spruehschnee.mp3"); | |||
} | |||
void draw() { | |||
loadPixels(); | |||
for (int w=0; w<000; w++) { | |||
q = int(random(pixels.length)); | |||
a = int(random(a, pixels.length)); | |||
} | |||
} | |||
void mouseReleased() { | |||
file.play(); | |||
for (int w=0; w<2000; w++) { | |||
q = int(random(pixels.length)); | |||
a = int(random(q, pixels.length)); | |||
j = int(random(pixels.length)); | |||
if ( a<pixels.length && j<pixels.length || pixels[m] < pixels[p] ) { | |||
c = pixels[q]; | |||
pixels[q] = c; | |||
pixels[a] = c; | |||
pixels[j] = c; | |||
} | |||
} | |||
updatePixels(); | |||
} | |||
</source> | |||
White Imagination - Quellcode | |||
<source lang = "java"> | |||
PImage img; | |||
PImage sourceImage; | |||
void setup(){ | |||
size(640, 480); | |||
sourceImage = loadImage ("Alpenblick2.png"); | |||
image (sourceImage, 0, 0, 640, 480); | |||
} | |||
void draw(){ | |||
img = loadImage ("Alpenblick5.png"); | |||
int x = 10; | |||
int width = 550; | |||
int height = 8; | |||
img.resize(640, 460); | |||
for (int i = 20; i < 480; i = i +25) { | |||
copy(img, x, i, width, height, x, i, width, height); | |||
} | |||
} | |||
</source> |
Latest revision as of 22:23, 23 March 2016
Homework one
15 pieces in grid - Quellcode:
slideshow of 9 images:
cut tiles - Quellcode:
Homework two
sliced Duck - Quellcode:
Weimaraner brushed plaque - Quellcode:
Parkhöhle - Quellcode:
File:Code Parkhöhle a.png File:Code Parkhöhle b.png
End of Semester
Snow Cannon - Quellcode
PImage img;
int m = 200;
int p = 30;
color c;
int value = 0;
int q;
int a;
int j;
import processing.sound.*;
SoundFile file;
void setup() {
size(640, 465);
img=loadImage("Schneekanone1.jpg");
image(img, 0, 0);
file = new SoundFile(this, "Spruehschnee.mp3");
}
void draw() {
loadPixels();
for (int w=0; w<000; w++) {
q = int(random(pixels.length));
a = int(random(a, pixels.length));
}
}
void mouseReleased() {
file.play();
for (int w=0; w<2000; w++) {
q = int(random(pixels.length));
a = int(random(q, pixels.length));
j = int(random(pixels.length));
if ( a<pixels.length && j<pixels.length || pixels[m] < pixels[p] ) {
c = pixels[q];
pixels[q] = c;
pixels[a] = c;
pixels[j] = c;
}
}
updatePixels();
}
White Imagination - Quellcode
PImage img;
PImage sourceImage;
void setup(){
size(640, 480);
sourceImage = loadImage ("Alpenblick2.png");
image (sourceImage, 0, 0, 640, 480);
}
void draw(){
img = loadImage ("Alpenblick5.png");
int x = 10;
int width = 550;
int height = 8;
img.resize(640, 460);
for (int i = 20; i < 480; i = i +25) {
copy(img, x, i, width, height, x, i, width, height);
}
}