I am new to processing and i am trying to make another image come out of a previous image i have already made. my first thought was to use mouse clicks but nothing but the first mouseclick remains on screen. I am specifically making a gingerbread man and am trying to cut it out of a picture of dough that I made. i want the viewer to be able to "shape" the dough into a gingerbread man by clicking the mouse but i cant get my dough to go away and only the gingerbread man to be visible. this is what i have so far.
void setup() {
size (600,600);
background(124,122,122);
smooth();
noStroke();
}
void draw(){
noStroke();
fill(216,175,63);
ellipse (300,100, 150,150);
ellipse (300, 300, 150, 300);
ellipse (260, 450, 60, 300);
ellipse (340, 450, 60, 300);
//eyes
fill(0);
ellipse (270,75, 25,25);
ellipse (330,75,25,25);
fill(255);
ellipse (265,70,5,5);
ellipse (325, 70,5,5);
//smile
noFill();
strokeWeight (4);
stroke(255);
curve(100, 0, 250, 130,350, 130, 400, 0);
//buttons
fill (249,9,26);
ellipse (300, 300, 30,30);
ellipse (300, 230, 30,30);
ellipse (300, 370, 30,30);
//arms
pushMatrix();
translate(200,250);
rotate(PI/4.0);
noStroke();
fill(216,175,63);
ellipse (0, 0, 60, 200);
popMatrix();
pushMatrix();
translate(400,250);
rotate(PI/-4.0);
noStroke();
fill(216,175,63);
ellipse (0,0,60,200);
popMatrix();
//icing
pushMatrix();
translate(100,300);
rotate(PI/4.0);
noFill();
strokeWeight(4);
stroke(255);
curve (0,0, 30,15,60,15,90,0);
popMatrix();
}
dough:
void setup() {
size (600,600);
background(124,122,122);
smooth();
noStroke();
}
void draw(){
noStroke();
fill(216,175,63);
ellipse(300,300,300,300);
ellipse(200,200,100,100);
ellipse(250,150,150,150);
ellipse(325,180,100,100);
ellipse(400,300,150,150);
ellipse(200,400,100,100);
fill(216,175,63);
ellipse(165,325,100,150);
}
void setup() {
size (600,600);
background(124,122,122);
smooth();
noStroke();
}
void draw(){
noStroke();
fill(216,175,63);
ellipse (300,100, 150,150);
ellipse (300, 300, 150, 300);
ellipse (260, 450, 60, 300);
ellipse (340, 450, 60, 300);
//eyes
fill(0);
ellipse (270,75, 25,25);
ellipse (330,75,25,25);
fill(255);
ellipse (265,70,5,5);
ellipse (325, 70,5,5);
//smile
noFill();
strokeWeight (4);
stroke(255);
curve(100, 0, 250, 130,350, 130, 400, 0);
//buttons
fill (249,9,26);
ellipse (300, 300, 30,30);
ellipse (300, 230, 30,30);
ellipse (300, 370, 30,30);
//arms
pushMatrix();
translate(200,250);
rotate(PI/4.0);
noStroke();
fill(216,175,63);
ellipse (0, 0, 60, 200);
popMatrix();
pushMatrix();
translate(400,250);
rotate(PI/-4.0);
noStroke();
fill(216,175,63);
ellipse (0,0,60,200);
popMatrix();
//icing
pushMatrix();
translate(100,300);
rotate(PI/4.0);
noFill();
strokeWeight(4);
stroke(255);
curve (0,0, 30,15,60,15,90,0);
popMatrix();
}
dough:
void setup() {
size (600,600);
background(124,122,122);
smooth();
noStroke();
}
void draw(){
noStroke();
fill(216,175,63);
ellipse(300,300,300,300);
ellipse(200,200,100,100);
ellipse(250,150,150,150);
ellipse(325,180,100,100);
ellipse(400,300,150,150);
ellipse(200,400,100,100);
fill(216,175,63);
ellipse(165,325,100,150);
}
1