Diferencia entre revisiones de «Matías Vega: Pincel»
De Casiopea
(Página creada con «{{Proyecto |Título=Pincel |Tipo de Proyecto=Proyecto de Curso |Palabras Clave=tarea 4 |Año de Inicio=2013 |Año de Término=2013 |Carreras Relacionadas=Arquitectura |Asig...») |
Sin resumen de edición |
||
(No se muestra una edición intermedia de otro usuario) | |||
Línea 6: | Línea 6: | ||
|Año de Término=2013 | |Año de Término=2013 | ||
|Carreras Relacionadas=Arquitectura | |Carreras Relacionadas=Arquitectura | ||
|Asignaturas Relacionadas=Imagen Escrita, | |Asignaturas Relacionadas=Imagen Escrita, | ||
|Cursos Relacionados=Imagen Escrita 2013 - ARQ, | |Cursos Relacionados=Imagen Escrita 2013 - ARQ, | ||
|Profesor=Herbert Spencer, | |Profesor=Herbert Spencer, | ||
|Alumnos= | |Alumnos=Matías Vega, | ||
|Imagen=Pincel1533.png | |Imagen=Pincel1533.png | ||
}} | }} | ||
<pre> | |||
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(random(255),random(255),random(255),30); | |||
noStroke(); | |||
rect(mouseX,mouseY,50,50); | |||
} | |||
} | |||
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)); | |||
} | |||
} |
Revisión actual - 11:55 21 jun 2013
Título | Pincel |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Palabras Clave | tarea 4 |
Período | 2013-2013 |
Asignatura | Imagen Escrita, |
Del Curso | Imagen Escrita 2013 - ARQ, |
Carreras | Arquitectura |
Alumno(s) | Matías Vega |
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(random(255),random(255),random(255),30); noStroke(); rect(mouseX,mouseY,50,50); } } 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)); } }