/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://dflab.sketchpad.cc/sp/pad/view/ro.HA8MZsVYoTr/rev.2
*
* authors:
* Manuel Menezes
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
float px;
float py;
float jump = 7;
void setup() {
size(500, 500);
background(108,57,37);
fill (0);
strokeWeight (4);
ellipse (400,170,100,100);
line (400,200,400,350);
line (400,350,300,600);
line (400,350,500,600);
line (400,240,340,340);line (340,340,290,260);
line (400,240,450,320);line (450,320,400,340);
stroke(229,140,56);
strokeWeight(3);
line (290,260,280,260);
stroke (255);
line (280,260,254,260);
stroke (252,74,3);
line(254,260,250,260);
px = 250;
py = 250;
}
// as instruções que estiverem dentro desta função draw
// são executadas a cada novo frame
void draw() {
float npx = constrain (px + random (-jump, jump), 0, 250);
float npy = constrain (py + random (-jump, jump), 0, 250);
strokeWeight (random(20));
stroke (150,150,150, random (70));
line (px, py, npx, npy);
px = npx;
py = npy;
}