topical media & game development

talk show tell print

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



  import processing.dxf.*;
  PImage MyImage;
  noStroke();
  MyImage = loadImage("face.jpg");
  size(MyImage.width,MyImage.height,P3D);
  image(MyImage,0,0);
  beginRaw( DXF, "out.dxf");
  for(int x=0; x<width; x+=5)
    for(int y=0; y<height; y+=5){
      float b = brightness(get(x,y))/50;
      fill(0);
      ellipse(x,y,5-b,5-b);
    }
  endRaw();
  


(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.