Bola que se para si se choca con otra
float x1, y1;
float vx1, vy1;
float r1 = 30;
float x2, y2;
float vx2, vy2;
float r2 = 40;
color c1, c2;
void setup() {
size(600, 400);
x1 = random(r1, width - r1);
y1 = random(r1, height - r1);
vx1 = random(2, 5);
vy1 = random(2, 5);
x2 = random(r2, width - r2);
y2 = random(r2, height - r2);
vx2 = random(2, 5);
vy2 = random(2, 5);
c2 = color(100, 100, 255);
}
Comentarios
Publicar un comentario