Ignacio Favilla: Pincel
De Casiopea
Título | Pincel |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Palabras Clave | tarea 4 |
Período | 2013- |
Asignatura | Imagen Escrita, |
Del Curso | Imagen Escrita 2013 - ARQ, |
Carreras | Arquitectura |
Alumno(s) | Ignacio Favilla |
float tam;
void setup() {
size(500, 500); background(255); strokeWeight(4); fill(#CCCCCC); }
void draw() {
tam = dist(mouseX, mouseY, pmouseX, pmouseY); if (mousePressed) { achurado(mouseX, mouseY, tam); } } void achurado(float x, float y, float mag) {
int num = round((float(mouseX)/float(width)) * 25); pushMatrix(); translate(x, y); for (int i = 0; i < 50; i ++) { float var = random(-50,150); stroke(60 + var, 30 + var, 20 + var);
ellipse(random(-mag), random(-mag), random(-mag), random(-mag)); } popMatrix(); } void keyPressed() {
String filename = "img/retrato-"+year()+"_"+month()+"_"+day()+"___"+hour()+"-"+minute()+"-"+second()+".png"; if (key == 'a' || key == 'A') {// Al apretar a se cambia a negro el fondo de las figuras fill(0,0,0); } if (key == 's' || key == 'S') {// Al apretar s se cambia al color inicial fill(#CCCCCC); } if (key == ' ') { background(255); } saveframe ("pincel1.png"); }