Sechs Kursabende à vier Stunden an der EB Zürich
Kurskonzeption und Leitung Hanna Züllig
/* Autorin: Marie Louise Illier Kurs: Einblick in die generative Gestaltung mit processing ip971231 Kursleitung: Hanna Zuellig Veroeffentlicht unter der creative common license Attribution-NonCommercial-ShareAlike CC BY-NC-SA http://creativecommons.org/licenses/ */ /* @pjs preload="sketches/kurstag04/Marie_Louise/data/zrm_rand.jpg"; */ PImage myimg;//neuer Variablen Datentyp PImage. Dieser Typ kann ein Bild speichern //Deklaration Variablen PImage myimg; float scalar = 0.0; color c; int lenght = 56; int lenght_max = 70; //Setup void setup() { size(845 ,625); myimg = loadImage("sketches/kurstag04/Marie_Louise/data/zrm_rand.jpg"); // Rand weiss rundherum 50 pxl smooth(); ellipseMode(RADIUS); background(255); noLoop(); } //Draw void draw() { noStroke(); fill(255,200); rect(0,0,width,height); for(int i_y = (lenght_max/2+50);i_y < height - (lenght_max/2)-50;i_y = i_y + lenght){ for(int i_x = (lenght_max/2+50);i_x < width - (lenght_max/2)-50;i_x = i_x + lenght){ c = myimg.get(i_x,i_y); float grau=brightness(c);//Helligkeit 0-255 float scalar =map(grau, 0, 255,0.13,1.23); f_stern(i_x,i_y,scalar,c); } } } //Ende draw void f_stern(int x, int y, float scalar, color c){ pushMatrix(); translate(x,y); scale(scalar); fill(c,175); ellipse(0,0,lenght,lenght); popMatrix(); } //Ende f_stern