Harig badeendje
(:blog:2011:02:duck512.gif|)
Processing code
PImage img = loadImage("duck.jpg"); size(img.width,img.height); background(0); smooth(); noFill(); for (int y=0; y<img.height; y+=5) { for (int x=0; x<img.width; x+=5) { color c = img.get(x,y); float br = brightness(c)/255.0; float sa = saturation(c)/255.0; float hu = hue(c)/255.0; pushMatrix(); translate(x,y); rotate(br*TWO_PI); stroke(c); line(-5,-5,10,10); popMatrix(); } }
(tag>Programming Art)
DISCUSSION