Francisca Rojas, Foto pixelada

De Casiopea
La versión para imprimir ya no se admite y puede contener errores de representación. Actualiza los marcadores del navegador y utiliza en su lugar la función de impresión predeterminada del navegador.


TítuloFrancisca Rojas Foto pixelada
Tipo de ProyectoProyecto de Curso
Palabras Clavetarea 8
AsignaturaTaller Inicial Común 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)Francisca Rojas
ProfesorHerbert Spencer
import processing.pdf.*;

PImage imagen;
PFont font;
String[] code;

float mI = 30; // Margen Izquierda
float mAr  = 30; // Margen Arriba
float mD = 40; // Margen Derecha
float mAb   = 30; // Margen Abajo
float escala;

void setup() {

  imagen = loadImage("a (3).jpg");
  size(609, 765);  // tamaño carta

  float ancho = width - (mI + mD);
  escala = ancho/imagen.width;

  noLoop();
  background(255);
  smooth();

  font = createFont("Courier", 15, true);
  textFont(font, 15);
  code = loadStrings("trazo.pde"); // cargo el código "trazo" (el pincel)
}

void draw() {

  float spacer = 10;

  for (int y = 0; y < imagen.height; y += spacer) {
    for (int x = 0; x < imagen.width; x += spacer) {

      // obtengo el color
      float plotX = map(x, 0, imagen.width, mI, width-mD);
      float plotY = map(y, 0, imagen.height, mAr, mAr + (imagen.height * escala));
      color c = imagen.get(x, y);


      trazo(plotX, plotY, c, spacer);
    }
  }
  printCode();
  texto();
 
}

void printCode() {
  fill(#707171); // color de la letra
  float interlinea = 0;
  for (int i = 0; i < code.length; i++) {
    // escribo cada línea de código en la pantalla
    text(code[i], width/16, height/2 + 110 + interlinea);
    interlinea += 15;
  }
}

void texto() {

  fill(#000000);
  text("Francisca Rojas", width - mD*5, height - mAb - 20);
  text("1 Año Diseño", width - mD*5, height - mAb);
}
void trazo(float x, float y, color c, float amp) {

  int trazos = round(map(brightness(c), 0, 255, 20, 0));

  pushMatrix();
  {
    translate(x, y);
    stroke(c); // color de la imagen pasada al trazo
    rotate(random(0,2*PI)); // inclinación random
    strokeWeight(10); // grosor de la línea
    fill(c);
    ellipse(-amp, 0, amp, 0); // trazo línea
  }
  popMatrix();
}