Tarea 9
Título | Tarea 9 |
---|---|
Tipo de Proyecto | Proyecto de Taller, Proyecto de Curso |
Palabras Clave | Tarea 9 |
Período | 2012- |
Asignatura | Imagen Escrita 2012, |
Del Curso | Taller Inicial 1ª y 2ª Etapa, |
Carreras | Arquitectura |
Alumno(s) | Paula Ramírez Guevara |
Profesor | Herbert Spencer |
PImage puente; PFont font; String[] code;
float margenIzquierda = 30; float margenArriba = 20; float margenDerecha = 20; float margenAbajo = 20; float escala; void setup() { puente = loadImage("puente.jpg"); size(609, 765, PDF, "puente.pdf"); float ancho = width - (margenIzquierda + margenDerecha); escala = ancho/(float)puente.width; noStroke(); noLoop(); background(255); font = createFont("Courier", 8); textFont(font, 8); code = loadStrings("Trazo.pde"); } void draw() { float spacer = 10;
for (int y = 0; y <puente.height; y += spacer) { for (int x = 0; x < puente.width; x += spacer) {
float plotX = map(x, 0, puente.width, margenIzquierda, width-margenDerecha); float plotY = map(y, 0, puente.height, margenArriba, margenArriba + (puente.height * escala)); color c = puente.get(x, y); trazo(plotX, plotY, c, spacer); } } printCode(); println("----->PDF done!"); exit();
} void printCode() { float interlinea = 0; for (int i = 0; i < code.length; i++) { text(code[i], width/4, 2 * margenArriba + puente.height * escala + interlinea); interlinea += 15; } }
- TRAZO**************
void trazo(float x, float y, color c, float amp) { fill(c);
ellipse(x, y, map(brightness(c), 70, 54, amp, 63), map(brightness(c), 57, 26, amp, 6)); }