Kim López: Pincel
De Casiopea
Título | Kim López: Pincel |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Palabras Clave | tarea 4 |
Período | 2013- |
Asignatura | Imagen Escrita, |
Del Curso | Imagen Escrita 2013 - DIS, |
Carreras | Diseño Gráfico"Diseño Gráfico" is not in the list (Arquitectura, Diseño, Magíster, Otra) of allowed values for the "Carreras Relacionadas" property., Diseño Industrial"Diseño Industrial" is not in the list (Arquitectura, Diseño, Magíster, Otra) of allowed values for the "Carreras Relacionadas" property. |
Alumno(s) | Kim López |
Profesor | Herbert Spencer |
int num = 19; float i = TWO_PI / num; float r = 80; float x, y; int fondo = #FFFFFF; int tam = 10; void setup() { size(500, 500); background(fondo); frameRate(75); } /* Construccion del pincel - timbre */ void draw() { if (mousePressed == true) { fill(0,random(100)); noStroke(); ellipse(mouseX, mouseY, random(10,30), random(10,30)); //defino la construcción de la figura del pincel. } } void keyPressed() { if (key == ' ') { //Al apretar espacio aparece el fondo de nuevo. background(fondo); } if (key == 'g' || key == 'G') { //Al apretar G se guarda la imagen. saveFrame ("pincel####.png"); } if (key == 'e' || key == 'E') { //Al mantener apretada la E se puede borrar. fill(fondo); } if (key == '+') { //Al apretar + se aumenta el tamaño del pincel en 1 tam = tam + 1; } if (key == '-') { //Al apretar - se disminuye el tamaño del pincel en 1 tam = tam - 1; } if (key == 'r' || key == 'R') { //Al apretar R el trazo cambia de color a rojo stroke(255, 0, 0, random(50, 100)); } } void keyReleased() { if (key == 'e' || key == 'E') { // Al soltar E se vuelve al pincel normal. stroke(0, random(100)); } }