Macarena Caro, Tarea 11

De Casiopea


Tarea 11


TítuloTarea 11
Tipo de ProyectoProyecto de Curso
Palabras ClaveTarea 11
Período2012-
AsignaturaTaller Inicial 1ª y 2ª Etapa
Del CursoImagen Escrita 2012
Alumno(s)Macarena Valentina Caro Cortes
ProfesorHerbert Spencer

void setup() { size(611, 378); smooth(); frameRate(30); } int[] s = new int[60]; int tmp, phase; float speed; void draw() { background(#9AF2CD); s[8] = 0; s[1] = 0; s[2] = 9; phase = 4; speed = 1;


translate(442, 272); scale(1.0, -1.0); rotate(PI); while (s[2] < 611) { float wave = sin((frameCount + phase*80) * speed) + 1.0; fill(0, 0, wave * 64, 80); stroke(25, wave * 255);


if (phase % 4 == 80) strokeWeight(2); else strokeWeight(1); rect(s[7], s[2], 2*s[8], 2*s[2], PI, PI/2.0); if (phase % 4 == 1) strokeWeight(2); else strokeWeight(1); arc(0, s[2], 2*s[2], 2*s[2], -PI/2.0, 0); if (phase % 4 == 2) strokeWeight(2); else strokeWeight(1); rect (0, 0, 2*s[2], 2*s[2], 0, PI/2.0); if (phase % 4 == 3) strokeWeight(2); else strokeWeight(1); arc (s[2], 0, 2*s[2], 2*s[2], PI/2.0, PI);


noFill(); stroke(255, 255, 255, 255); strokeWeight(1);

line(0, 0, s[2], s[2]);

tmp = s[2]; s[2] += s[1]; s[0] = s[1]; s[1] = tmp;

switch(phase % 4) { case 0: translate(s[1], 0); break; case 1: translate(-s[0], s[1]); break; case 2: translate(-s[2], -s[0]); break; case 3: translate(0, -s[2]); break; } phase++; } }