I have a square and a exclipse, the square is shrinking to a certain size and the eclipse is growing to a certain size. I got the shapes to stop at the certain sizes but after they stop I need them to grow to their regular shape and then shrink in a loop.
I also need help trying to make a function where this process can be stopped by touching a key and then resumes by clicking the mouse.
This is the code I have so far..
int circleSize=0;
int radius=0;
int radius2=300;
void setup()
{
size (400,400);
}
when the program starts there is a square and a circle on a 500,500 screen in the middle.
At the start of this program the square shrinks from the size 300 to 225 but the circle starts to become bigger at the start of the program and grows from the size 150 to 225 and the square shrinks to 225 and stops.
Once these two objects reach their shrinking and growing point they shrink/grow to their original size at the start of the program. I need this to run in a continous loop. If someone could please help me with the code for this, I would appreciate it.
I also need the shrinking/growing process to be able to be stopped by pressing any key on the keyboard and resumed by a click of the mouse.