Francisca Torres: Figura

| Título | Francisca Torres: Figura |
|---|---|
| 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) | Francisca Torres |
| Profesor | Herbert Spencer |
int num = 10;
float i = TWO_PI / num;
float r = 70;
float x, y;
void setup() {
size(500, 500);
}
void draw() {
background (random(100, 255), random(100, 255), random(100, 255));
num = mouseX / 40;
float i = TWO_PI / num;
beginShape ();
fill (0);
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 + 100;
y = sin(t) * r + 100;
vertex (x, y);
}
endShape ();
String filename = "poligono polar javier garin-"+year()+"_"+month()+"_"+day()+"___"+hour()+"-"+minute()+"-"+second()+".png";
if (key == 's' || key == 'S') {
saveFrame(filename);
println("se ha grabado exitosamente el archivo "+filename);
}
if (key == ' ') {
}
}