topical media & game development

talk show tell print

graphic-processing-algorithm-Appendix-p318-3-p318-3.pde / pde



  PImage MyImage;
  noStroke();
  MyImage = loadImage("tree_canopy.jpg");
  size(MyImage.width,MyImage.height);
  image(MyImage,0,0);
  for(int x=0; x<width; x+=5)
    for(int y=0; y<height; y+=5){
      float b = brightness(get(x,y))/50;
      fill(255);
      rect(x,y,5,5);
      fill(0);
      ellipse(x,y,5-b,5-b);
    }
  


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.