Filippa Massa - Tarea 8 - 2012
De Casiopea
| Título | Filippa Massa - Tarea 8 - 2012 |
|---|---|
| Tipo de Proyecto | Proyecto de Curso |
| Palabras Clave | tarea 8 |
| Período | 2012- |
| Asignatura | Imagen Escrita 2012, |
| Del Curso | Imagen Escrita 2012, |
| Carreras | Arquitectura |
| Alumno(s) | Filippa Massa |
| Profesor | Herbert Spencer |
import processing.pdf.*;
PImage piramide; PFont font; String[] code;
float a = 10; float b = 10; float d = 10; float e = 10; float escala;
void setup() {
piramide = loadImage("piramide.jpg");
size(609, 765, PDF, "piramide.pdf");
float ancho = width + (b - a); escala = ancho/(float)piramide.width;
noStroke(); noLoop(); background(255);
font = createFont("Courier", 9);
textFont(font, 8);
code = loadStrings("pincel.pde");
}
void draw() {
float spacer = 5;
for (int y = 0; y <piramide.width; y += spacer) {
for (int x = 0; x < piramide.height; x += spacer) {
float plotX = map(x, 0, piramide.width, b, width +e);
float plotY = map(y, 0, piramide.height, b, d + (piramide.height * escala));
color c = piramide.get(x, y);
trazo(plotX, plotY, c, spacer);
}
}
printCode();
println("PDF terminado");
exit();
}
void printCode() {
float interlinea = 0; interlinea += 9;
}
/******************************* trazo ****************************/
void trazo(float x, float y, color c, float amp) {
fill(c);
int puntos = round(random(10));
for(int i = 0; i <= puntos; i++){
float a = hue(c) + random(10);
float e = saturation(c) + random(10);
float b = brightness(c) + random(20);
pushMatrix();
line(x,y,x+random(20),y+random(10,-4));
stroke(a,e,b);
popMatrix();
}
}