int fete; float ecu; int vee; float x; float y; float r; float t; int b; void setup(){
x= 100; y=100; r= 230; fete=100; ecu=120; vee=90; b=250;
size(500,500);
}
void draw(){
t=t+0.5;
if(mouseX<250){
background(148,175,28);
}
else{
background(51,129,26);
}
if(mouseY<250){
background(108,75,13);
//el cuarto color en el eje y no funciona….??????????????????????????????????????????????????????????????????????????????????????????????
}
// if (mouseY>250) {
// background(118,32,70);
// }
//cirdulo rojo a la izquierda
// esto hace que el circulo rojo gire al rededor de toda la pantalla
x=r*cos(t)+b;
y=r*sin(t)+b;
fill(152,32,26);
ellipse(x,y,50,50);
if(mousePressed==true){
fill(10,123,162);
ellipse(200,250,200,200);
}
else{
ecu=random(100);
fill(60,85,103);
ellipse(400,180,ecu,ecu);
}
for(int pett=20; pett<500; pett=pett+20){
for(int yup= 20; yup<500; yup=yup+20){
fill(224,151,14);
ellipse(pett,yup,7,7);
}
}
}
LAB /Movimiento