/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://dflab.sketchpad.cc/sp/pad/view/ro.iPmIERXSgU-/rev.336
*
* authors:
* daniela fortuna
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
/* @pjs preload="/static/uploaded_resources/p.10302/1389729_95489222.jpg"; */
float px;
float py;
float jump = 10;
void setup() {
size(640, 300);
textura = loadImage("/static/uploaded_resources/p.10302/1389729_95489222.jpg");
px = random (width);
py = random (height);
image (textura, 0, 0, 640, 300);
}
// 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, width);
float npy = constrain (py + random (-jump, jump), 0, height);
line (px, py, npx, npy);
line (px, py, npx, npy);
px = npx;
py = npy;
}