María Jesús Arestizábal Tarea (8) Paisaje
De Casiopea
Título | María Jesús Arestizábal Tarea (8) Paisaje |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Palabras Clave | tarea 8 |
Período | 2012- |
Asignatura | Imagen Escrita 2012, |
Del Curso | Imagen Escrita 2012, |
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., Diseño Industrial"Diseño Industrial" is not in the list (Arquitectura, Diseño, Magíster, Otra) of allowed values for the "Carreras Relacionadas" property. |
Alumno(s) | María Jesús Arestizábal |
Profesor | Herbert Spencer |
import processing.pdf.*;
PImage paisaje; PFont font; String[] code;
float I = 8; float AR = 8; float D = 8; float AB = 8; float escala;
void setup() {
paisaje = loadImage("paisaje.jpg"); size(609, 765, PDF, "paisaje.pdf");
float ancho = width - (I - AB); escala = ancho/(float)paisaje.width;
noStroke(); noLoop(); background(255);
font = createFont("Courier", 9); textFont(font, 8);
code = loadStrings("trazo.pde");
}
void draw() {
float spacer = 10;
for (int y = 0; y <paisaje.width; y += spacer) { for (int x = 0; x < paisaje.height; x += spacer) {
float plotX = map(x, 0, paisaje.width, D, width +I); float plotY = map(y, 0, paisaje.height, AR, D + (paisaje.height * escala)); color c = paisaje.get(x, y); trazo(plotX, plotY, c, spacer); } } printCode(); println("PDF listo"); exit();
}
void printCode() {
float interlinea = 0; interlinea += 15;
}
trazo
void trazo(float x, float y, color c, float amp) {
fill(c); rect(x, y, map(brightness(c), 0, 255, amp, 0), map(brightness(c), 0, 255, amp, 0));
}