Monthly Archives: August 2015

Blank

Trying to get the image to appear with circles rather than triangles – the base of the image is circular. I can’t get the image to appear in the window. Its just blank – and pretty, pretty, pretty…frustrating.

**I took the code from the triangle image post as a start**

PImage img;

void setup(){
size(1000,1000);
img = loadImage(“protrait.jpg”);
img.filter(POSTERIZE,10);
smooth();
}

void draw(){
background(255);
loadPixels();

for(int y = 0; y< img.height;y=+10){
for(int x=0;x<img.width+5;x+=5){
int loc=x+y*img.width;

stroke(img.pixels[loc]);
fill(img.pixels[loc]);

if(x%10==0)  elipse (y+ 10,16);
else  elipse (z+16,16);

}
}
}
void mousePressed(){
save(int(random(10))+”.jpg”);
}

Putting it all together