/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://dflab.sketchpad.cc/sp/pad/view/ro.5KxtXGgRAF6/rev.306
*
* authors:
*
* Joana Louro
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
// This sketch builds on a prior work, "02 - Onion Skin", created by Pedro Ângelo
// http://dflab.sketchpad.cc/sp/pad/view/ro.9qthMmoXe$xMdk/rev.189
//sketch dinâmico a partir do exemplo dado na aula-Onion Skin
void setup() {
size(400, 400);
background(107,184,222);
frameRate(10);
}
// as instruções que estiverem dentro desta função draw
// são executadas a cada novo frame
void draw() {
// Se não limparmos a tela no inicio de cada frame,
// desenhamos em cima do resultado da fram anterior
// background(255);
stroke(255);
fill(185,245,104,20);
strokeWeight(2);
rectMode(RIGHT);
sz = (frameCount % 100) / 100.0;
translate (width/2, height/2);
rotate (TWO_PI * sz);
rect (0, 0, 400 * sz, 300 * sz);
stroke(97,8,193);
fill(144,21,211,10);
strokeWeight(2);
rectMode(RIGHT);
sz = (frameCount % 100) / 100.0;
translate (width/2, height/2);
rotate (TWO_PI * sz);
rect (10, 10, 400 * sz, 300 * sz);
stroke(234,148,33);
strokeWeight(2);
rectMode(RIGHT);
sz = (frameCount % 100) / 100.0;
translate (width/2, height/2);
rotate (TWO_PI * sz);
rect (-100, -100, -30 * sz, -30 * sz);
}