how do i make sure something is drawn in a specific area? for example i would like to draw something that does not take up the whole page. this is my code so far.
int x=0;
int y=0;
void setup() {
background(124,122,122);
size(600,600);
noStroke();
smooth();
}
void draw() {
if (mouseX <100)
if (mouseY <100)
fill (216,175,63);
ellipse(mouseX,mouseY, mouseX,mouseY);
}
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.
i'm very new to processing and i am trying to make a pattern with the same shape repeating in rows and columns. i used a for loop for() but ive only been able to stretch out the shape instead of repeating it in different positions. here is what i have so far. please please help me!
int y1=0;
int x1=85;
int x2=0;
int y2= 80;
void setup() {
size (600,600);
background(255);
smooth();
}
void draw (){
background(255);