Gabriela Correa: Squared
De Casiopea
Título | Gabriela Correa: Squared |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Palabras Clave | tarea 8 |
Asignatura | Taller Inicial 1ª y 2ª Etapa, |
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) | Gabriela Correa |
Profesor | Herbert Spencer |
import processing.pdf.*; PImage picture; String[] code; float LeftM = 40; float TopM = 60; float RightM = 40; float BottomM = 60; float proportion; void setup() { picture = loadImage("picture.jpg"); size(609, 765, PDF, "squared.pdf"); // Se construye un archivo PDF tamaño carta llamado "squared.pdf". float wi = width - (LeftM + RightM); proportion = wi/(float)picture.width; noStroke(); noLoop(); rectMode(CENTER); background(255); } void draw() { float spacer = 40; for (int y = 0; y < picture.height; y += spacer) { for (int x = 0; x < picture.width; x += spacer) { float plotX = map(x, 0, picture.width, LeftM, width-RightM); float plotY = map(y, 0, picture.height, TopM, TopM + (picture.width * proportion)); color c = picture.get(x, y); brush(plotX, plotY, c, spacer); } } println("Ready"); *exit(); }