Fading stars

In an attempt I have tried to create something that I thought might be useful at a later date. I have created a a simple version of a night time sky with stars fading in and out.

You can see the code below

void setup(){
//this means the ellipses have no outline

void draw(){
// the first number is the colour the second is the opacity
rect(0,0,width, height);
//this rectangle covers the whole screen
ellipse( random (width), random (height), 3, 3);

then I used

if (mousePressed){

to save several images.

I then combined them in terminal using this code  convert -delay 20 -loop 0 *.jpg result.gif.

and here is the end result.result


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s