Diego Wistuba: Polígono
De Casiopea
Título | Polígono |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Palabras Clave | tarea 3 |
Período | 2013-2013 |
Asignatura | Imagen Escrita, |
Del Curso | Imagen Escrita 2013 - ARQ, |
Carreras | Arquitectura |
Alumno(s) | Diego Wistuba |
Profesor | Herbert Spencer |
int num = 80;
float i = TWO_PI / num; float r = 200; float x, y;
void setup() {
size(500, 500); }
void draw() { background (400); num = mouseX / 30; float i = TWO_PI / num; beginShape (); fill (100); for (float t = 0; t < TWO_PI; t = t + i) {
x = cos(t) * r + width/4; y = sin(t) * r + height/4; vertex (x, y); } endShape (); beginShape ();
fill (10); 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); } endShape (); beginShape ();
fill (30); for (float t = 0; t < TWO_PI; t = t + i) {
x = cos(t) * r + width/8; y = sin(t) * r + height/8; vertex (x, y); } endShape ();
}