Nature 3

This was my fall-back idea when I couldn’t think of anything to do for the last piece. I wanted to simply do a piece with clouds going by in the sky. However, I ran into the same problems we ran into with the moving gnats in that when the clouds hit an edge/corner in certain ways they would get stuck on it, and since they would reset to x and y values of zero they would get stuck after one loop.
I wanted to add different shapes of clouds, but I wanted to figure out the edge issue first as it seemed more important to figure out.
Sprite mySprite;
Sprite[] sprites = new Sprite[30];
PImage myPicture;
PImage myPicture2;
void setup() {
size(350, 350);
background(200);
myPicture = loadImage(“cloud.png”);
myPicture2 = loadImage(“sky.png”);
imageMode(CENTER);

for (int i=0;i=(width-imageSize/2)-1) {
x=30;
}
else if (x<=imageSize/2-1) { x=30; } else if (y>=(height-imageSize/2)-1) {
y=30;
}
else if (y<=imageSize/2-1) { y=30; } } } I’m unable to get my projects to load properly on the blog currently, so I’m just going to post the code for the time being, and will probably upload a screen shot later or something to show what it should look like when working.

Leave a Reply