1.000 rainbow lines
De Casiopea
Título | 1.000 rainbow lines and rect |
---|---|
Asignatura | Imagen Escrita |
Del Curso | Imagen Escrita 2017 |
Nº | 2 |
Alumno(s) | Felipe Fuentes |
<processingjs> void setup() {
size(500, 500);
}
void draw() {
background(255); strokeWeight(3); if (mouseY < 250) { for(int y = 15; y <= height-15; y*= 1.2){ for(int x = 15; x <= width-15; x+= 15){ stroke(x, y-200, x-y); line(x, y, x+10, y+10); } } }else{ for(int y = 0; y <= height-10; y+= 10){ for(int x = 0; x <= width-10; x+= 10){ stroke(x, y-300, x-y); rect(x, y, x+10, y+10); } } }
} </processingjs>