Gabriela Correa: Squared

De Casiopea
Gabriela Correa: Squared


TítuloGabriela Correa: Squared
Tipo de ProyectoProyecto de Curso
Palabras Clavetarea 8
AsignaturaTaller Inicial 1ª y 2ª Etapa,
Del CursoImagen Escrita 2012,
CarrerasDiseñ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
ProfesorHerbert 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();
}