/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://uclaspring12.sketchpad.cc/sp/pad/view/ro.M0iQInj5691/rev.56
*
* authors:
* Casey Reas
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
// Clone and modify this program, then change the name to
// [YOUR NAME] - Workshop 5
// Press Control-R to render the sketch
/* @pjs preload="/static/uploaded_resources/p.4492/earth.png"; */
PImage earth;
float x, y;
float d = 100;
void setup() {
size(600, 300);
earth = loadImage("/static/uploaded_resources/p.4492/earth.png");
imageMode(CENTER);
x = width/2;
y = height/2;
}
void draw() {
background(0);
image(earth, x, y, d, d);
x += random(-2, 2);
y += random(-2, 2);
}