Hello out there,
I'm a newbie from Germany. The past weeks I've spend a lot of time with working in Processing, but now I don't know how to go on.
My code looks like this:
float x = 800;
float y = 0;
float r = 200;
float speed = 0;
float gravity = 0.1;
void setup() {
size(1600 ,900);
}
void draw() {
background(255);
fill(255,40,26);
noStroke () ;
ellipseMode(CENTER);
ellipse(x,y,r,r);
r++ ;
if (r > 340)
r = 320;
y = y + speed;
speed = speed + gravity;
if (y > height) {
speed = speed * -0.95;
}
}
Now I would like to add some random circles, which all follow the movement of the big red circle - some stay closer to the circle, others have a bigger distance. How can I do this? Is there an easy solution for a Processing beginner? You would be my hero! :)
Thanks,
Werbefrau