Monserrat Torres, Maquina de Dibujo

| Título | Maquina de Dibujo |
|---|---|
| Tipo de Proyecto | Proyecto de Taller |
| Palabras Clave | tarea 4 |
| Período | 2013-2013 |
| Asignatura | Imagen Escrita 2013 - DIS, |
| 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. |
| Alumno(s) | Monserrat Torres |
| Profesor | Herbert Spencer |
void setup() {
size(500, 500);
background(255);
noFill();
stroke(0, 100);
}
void draw() {
float s = dist(mouseX, mouseY, pmouseX, pmouseY);
if (mousePressed) {
dibujo(mouseX, mouseY);
}
}
void dibujo(float x, float y) {
pushMatrix();
translate(x, y);
beginShape();
for (float a= 5;a < 10; a+=6) {
rect(3, 2, 22, 22, 1, 3, 6, 9);
}
endShape();
popMatrix();
}
void dibujo(float x, float y, float tam) {
pushMatrix();
translate(x, y);
beginShape();
for (float a= 2;a < tam; a+=3) {
rect(6, 4, 44, 44, 2, 6, 12, 18);
}
endShape();
popMatrix();
}
void keyPressed() {
String filename = "img/retrato-"+year()+"."+month()+"."+day()+"-"+hour()+"-"+minute()+"."+second()+".png";
if (key == 's' || key == 'S') {
saveFrame(filename);
println("Guardado"+filename);
}
if (key == ' ') {
setup();
}
}