Poligono:Ignacio Oliva

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.


Poligono-Ignacio Oliva.jpg


TítuloPoligono
AsignaturaImagen Escrita
Del CursoImagen Escrita 2013 - ARQ
CarrerasArquitectura
Alumno(s)Ignacio Oliva
 



float i = TWO_PI / num; float r = 100; float x, y;

void setup() {

 size(500, 500);
}

 void draw() {

 background (#ff0000);
 fill (#000000);
 num = mouseX / 50;  
 float i = TWO_PI / num; 

 beginShape ();
 for (float t = 0; t < TWO_PI; t = t + i) {
   y= cos(t) * r + width/3.5;
   x = sin(t) * r + height/2;
   vertex (x,y);
  }
  endShape ();
  
   beginShape ();
  fill (255,255,255);
  for (float t = 0; t <TWO_PI; t = t + i) {

    x = cos(t) * r + width/3;
    y = sin(t) * r + height/2.5;
    vertex (x, y);
  }
  endShape ();
  
   beginShape ();
  fill (0,0,0);
  for (float t = 0; t <TWO_PI; t = t + i) {

    y = cos(t) * r + width/2.5;
    x = sin(t) * r + height/3;
    vertex (x, y);
  }
  endShape ();
  
  beginShape ();
  fill (255,255,255);
  for (float t = 0; t <TWO_PI; t = t + i) {

    x = cos(t) * r + width/2;
    y = sin(t) * r + height/3.5;
    vertex (x, y);
  }
  endShape ();
  
  saveFrame("Poligono-Ignacio Oliva.jpg");

  
}