Ailyne Guzman: Figura

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.
Ailyne Guzman: Figura


TítuloAilyne Guzman: Figura
Tipo de ProyectoProyecto de Curso
Palabras Clavetarea 3
Período2013-
AsignaturaImagen Escrita,
Del CursoImagen Escrita 2013 - ARQ,
CarrerasArquitectura
Alumno(s)Ailyne Guzman
ProfesorHerbert Spencer
int num = 19;
float i = TWO_PI / num; 
float r = 80;         
float x, y;            

void setup() {
  size(500, 500);
}

void draw() {
  background(255);
  stroke(0);
  fill(#EEF700); 

  num = mouseX / 10;   
  float i = TWO_PI / num; 

  beginShape();
  for (float t = 0; t < TWO_PI; t = t + i) {
    x = cos(t) * r + width/2;
    y = sin(t) * r + height/2;
    vertex(x, y);
    x = cos(t) * r + width-100;
    y = sin(t) * r + height-120;
    vertex(x, y);
  }
  endShape();
  if (key == 's') {
    saveFrame("Figura-####.png");
  }
}