Polígono
De Casiopea
Título | Polígono Fernanda Vicuña |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Palabras Clave | tarea 3 |
Período | 2013- |
Asignatura | Imagen Escrita, |
Del Curso | Imagen Escrita 2013 - ARQ, |
Carreras | Arquitectura |
Alumno(s) | Fernanda Vicuña |
Profesor | Herbert Spencer |
int num = 10;
float i = TWO_PI / num; float r = 70; float x, y;
void setup() {
size(500, 500);
}
void draw() {
if (keyPressed){ } if (key == ' '){ background(255); // apretar espacio para borrar todo } background (random(0, 400)); num = mouseX / 5; float i = TWO_PI / num;
beginShape (); fill (255,255,255,0); for (float t = 0; t < TWO_PI; t = t + i) { x = cos(t) * r + width/1; y = sin(t) * r + height/1; vertex (x, y); x = cos(t) * r + 100; y = sin(t) * r + 100; vertex (x, y); } endShape ();
if (key == ' ') { }
}