Carla manriquez - Sky-Trazo
De Casiopea
Título | Trazo |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Palabras Clave | tarea 8 |
Período | 2012-2012 |
Asignatura | Imagen Escrita 2012, |
Del Curso | Imagen Escrita 2012, |
Carreras | Arquitectura |
Alumno(s) | Carla Manriquez |
Profesor | Herbert Spencer |
// Mi tarea intenta generar un estilo impresionista de una fotografía por medio de lineas al azar, las cuales toman de forma aleatoria un color de relleno //
import processing.pdf.*;
PImage sky; PFont font; String[] code;
float a = 55;
float b = 40;
float d = 70;
float e = 20;
float escala;
void setup() {
sky = loadImage("sky.jpg"); size(609, 765, PDF, "sky.pdf");
float ancho = width + (b - a); escala = ancho/(float)sky.width;
noStroke(); noLoop(); background(255); smooth();
font = createFont("Courier", 3); textFont(font, 6);
code = loadStrings("pincel.pde");
}
void draw() {
float spacer = 5;
for (int y = 0; y <sky.width; y += spacer) { for (int x = 0; x < sky.height; x += spacer) {
float plotX = map(x, 0, sky.width, b, width +e); float plotY = map(y, 0, sky.height, b, d + (sky.height * escala)); color c = sky.get(x,y);
trazo(x, y, c, spacer); } } printCode(); println("PDF terminado"); exit();
}
void printCode() {
float interlinea = 0; interlinea += 15;
} /////////////////////////////////////////////////////////////// /* Trazo Pictórico de Ejemplo, este texto es Imagen Escrita */
void trazo(float x, float y, color c, float amp) {
fill(c); int puntos = round(random(10)); for(int i = 0; i <= puntos; i++){ float h = hue(c) + random(10); //variacion de relleno float s = saturation(c) + random(30); float b = brightness(c) + random(30); pushMatrix(); line(x,y,x+random(30),y+random(-5,20)); //trazo por medio de lineas stroke(h,s,b); popMatrix(); }
}