float x;
float y;
float velocidad = 2.5;
void setup(){
size(240,220);
}
void draw(){
y += random(-velocidad, velocidad);
x += random(-velocidad, velocidad);
ellipse(x+50,y+50,30,30);
}
______________________________________________________________________________
void setup(){
size(240,320);
}
void draw(){
//for= variable, comparacion y sumatoria
for (int x=20; x < width; x +=20){
line(x,20,x,100);
}
_______________________________________________________________________________
void setup(){
size(240,320);
}
void draw(){
background(125);
//for= variable, comparacion y sumatoria
for (int x=20; x < width; x +=20){
float mx = mouseX / 10;
println(mx);
float aleatorio = random(-mx,mx);
line(x+aleatorio,20,x,100);
}
}