Imagen Digital:PDF
De Casiopea
Lista de Fuentes en una página tamaño carta
// Crear PDF import processing.pdf.*; // importa la biblioteca que maneja PDF /* Cuando construímos un PDF, la unidades pixeles se convierten a puntos. 1 punto = 0.37 milímetros */ PFont helv; String[] lista; void setup(){ hint(ENABLE_NATIVE_FONTS); size(612, 792, PDF, "file.pdf"); helv = createFont("Bodoni MT Condensed", 12); textFont(helv, 6); lista = PFont.list(); background(255); fill(0); } void draw(){ int x = 10; int y = 20; for (int i = 0; i < lista.length ; i++){ text(lista[i], x, y); y += 7; //interlínea if (y > (height - 20)) { y = 20; // reset y x += 90;// intercolumna } } println("listo"); exit(); }
Dibujo desde la función noise(x,y)
import processing.pdf.*; void setup(){ size(612, 792, PDF, "dibujo.pdf"); background(255); stroke(0); noFill(); strokeWeight(0.25); } void draw(){ for (float y = 0; y < height; y += 5){ beginShape(); for (float x = 0; x < width; x += 3){ float n = noise(x/100.0, y/100.0)*60; if ((y+n) > height){ break; } curveVertex(x,y+n); } endShape(); } println("listo"); exit(); }