Sechs Kursabende à vier Stunden an der EB Zürich
Kurskonzeption und Leitung Hanna Züllig
/* Autor: Reto Trachsel Kurs: Einblick in die generative Gestaltung mit processing ip971241 Kursleitung: Hanna Zuellig Veroeffentlicht unter der creative common license Attribution-NonCommercial-ShareAlike CC BY-NC-SA http://creativecommons.org/licenses/ */ void setup() { size (500, 500); background(255); smooth(); noStroke(); ellipseMode(CORNER); } void draw() { background (255); for (int y = 0; y <= height; y +=50) { for (int x = 0; x <= width; x +=50) { fill (155); smooth(); noStroke(); ellipse(x, y, 50, 50); stroke(103,7,52); strokeWeight(3); float angle = atan2(mouseY-y, mouseX-x); //Variable bestimmt den Winkel zw. Mauszeiger und Ursprung //float angle = random(mouseY-y, mouseX-x); pushMatrix(); translate(x+25,y+25); rotate (angle); line(0,0, 22, 0); popMatrix(); fill(245, 238, 42); stroke(0); strokeWeight(4); ellipse(x+20, y+20, 10, 10); } } if (mousePressed) { for (float y = 0; y <= height; y +=50) { for (float x = 0; x <= width; x +=50) { fill (80, 80, 80); noStroke(); arc(x, y, 50, 50, radians(135), radians(405)); stroke(200); strokeWeight(2); line(x+25, y+25, x+40, y+10); fill(255); stroke(0); strokeWeight(4); smooth(); ellipse(x+20, y+20, 10, 10); } } } if(keyPressed && key=='s'){ //saveFrame("reto.png"); } }