Proyecto final francisco moya

De Casiopea

Archivo:Tabla.pdf


Títuloteselación
Tipo de ProyectoProyecto de Taller
Palabras Claveproyecto final
Período2012-2012
AsignaturaImagen Escrita 2012,
Del CursoImagen Escrita 2012,
CarrerasArquitectura
Alumno(s)Francisco Moya
ProfesorHerbert Spencer

import processing.pdf.*; void setup() {

 size(1000,1000,PDF, "tabla.pdf");
 stroke(0);
 background(255);

}

void draw(){
  for (int i=0; i<9; i++) {
   pushMatrix();
   translate(10,5);
   for (int j=0; j<9; j++) {
     fullsquare();
     translate(0,110);
   }
   popMatrix();
   translate(110,0);
 } 
}

void tessellate() {

 beginShape();
 vertex(25,20);
 vertex(35,20);
 vertex(50,30);
 vertex(35,40);
 vertex(25,40);
vertex(20,35);
vertex(20,25);
vertex(25,20);
 endShape();

}

void fullsquare() { //this function puts four of the tessellate function together

 pushMatrix();
 fill(255); //different fills for different shapes
 tessellate();
 translate(0,110); //slides to bottom left
 rotate(3*PI/2);
 fill(255);
 tessellate();
 rotate(PI/2); //undoes the last rotate so I can translate it more easily
 translate(110,0); //slides to bottom right
 rotate(PI);
 fill(255);
 tessellate();
 rotate(PI);
 translate(0,-110); //slides to top right
 rotate(PI/2);
 fill(255);
 tessellate();
 popMatrix(); //back to the top left
println("---> PDF OK");
exit();

}