float posX;
float posY;
float desplazamientoY;
float desplazamientoX;
float a = 0;
float r = 0;
void setup(){
size(400,400,P3D);
stroke(random(255));
strokeWeight(5);
posX= width/4;
posY= height/4;
desplazamientoY = 5;
desplazamientoX = 5;
}
void draw(){
background(80);
translate(mouseX,mouseY,map(noise(a),0,1, -400,300));
rotateY(r);
box(50);
a = a + 100.01;
r = r + 100.00;
ellipse(posX,posY,100,100);
rect(50,100,40,100);
fill(random(0,255), random(255), random(255));
if (posY < 0){
posY =0;
desplazamientoY=5;
}
}
http://www.iesrdelgado.org/web2017/web2018/Vélez/F/index.html
EJERCICIO 4
background(0,0,0);
size(150,150);
stroke(255,255,255);
line(50,0,50,50);
stroke(255,255,255);
line(0,50,50,50);
stroke(100,100,100);
line(0,0,0,50);
stroke(50,50,50);
line(0,0,50,0);
EJERCICIO 5