José Ignacio Vásquez : intento grafico

De Casiopea
Revisión del 21:54 29 may 2012 de Nachho13 (discusión | contribs.)
(difs.) ← Revisión anterior | Revisión actual (difs.) | Revisión siguiente → (difs.)
grafico intento 1


Títulografico intento 1
Tipo de ProyectoProyecto de Taller
Palabras Clavetarea 3
AsignaturaImagen Escrita 2012,
Del CursoTaller Inicial 1ª y 2ª Etapa,
CarrerasArquitectura
Alumno(s)José Ignacio Vásquez
ProfesorHerbert Spencer

//intente hacer la curva pero solo aparece el centro en doble x y la grilla

float z, h; 
float j; 
void setup() {

 size(700, 700);

}

void grilla(int divsX, int divsY) {

 stroke(#A7A9FF);  

 float J= width/(float)divsX;  
 float P= height/(float)divsY; 
 for (float y = P; y < height; y += J) {
   line(0, y, width, y);
 }
 for (float x = J; x < width; x += P) {
   line(x, 0, x, height);
 }

} void cruz(float n, float uhh, float oh) {

 float u = uhh+2;
 float o = oh/2;
 stroke(245, 25, 30, 52) ;
 line (o-n, u-n, o+n, u+n);
 line (o-n, u+n, o+n, u-n);

} void draw() {

 background(255);
 grilla(70, 50);
 for (int n = 0; n <width; n = n+2) {

   h = norm(n, 0, width); 
   j = map(mouseX, 0, mouseY, 0, 70); 
   z = pow(h, j) + mouseY;  

   cruz(width+n, z, 8);
   cruz(n, height-z, 6);
 }
 println (j);

} 
void keyPressed() {

  if (key == 's') { // graba
    saveFrame("grafi-##.jpg");
  }}