Juan Hernández experimento pizarra processing 2
De Casiopea
Título | Juan Hernández pizarra mejorada |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Palabras Clave | Experimento, Experimentos, experimento, experimentos, tarea 5 |
Del Curso | Imagen Escrita 2012, |
Carreras | Arquitectura |
Alumno(s) | Juan Alejandro Hernández |
Profesor | Herbert Spencer |
// juan hernandez int width=10; int height=10; int color_v=11; void setup() { size(screen.width, screen.height); background(0); smooth(); } void draw(){ } void mouseDragged() {if(keyPressed) { if (key == 'q' || key == 'Q') { background(0); } } noStroke(); fill(8+color_v*0.5, 32+color_v, 65+color_v); ellipse(mouseX, mouseY, width, height); fill (random (225), random(255), random (255)); rect (mouseX+14,mouseY+24,10,10); fill (random (225), random(255), random (255)); ellipse (mouseX,mouseY,random(20),random(40)); } void keyPressed() { if (key == 'q') { color_v=244; } // con tecla "q" cambia tonalidad de azul if (key == 'w') { color_v= 86; } // con tecla "w" cambia otra tonalidad de azul if (key == 'e') { color_v=90; } //cambia otra tonalidad de azul con "e" if (key == 'm') { background(0, 0, 0); } // la tecla "m" borra el dibujo volviendo al fondo negro inicial if (key == 't') { width=30; height=30 ; } // tecla "t" aumenta el grosor de linea if (key == 'y') { width=5; height=5 ; } // disminuye la linea if (key == 'u') { width=10; height=10 ; } } //disminuye el grosor de linea