/*Song in Grayscale
"The Bliss Machine" by William Christensen
song is tecnically considered tehno, but is very peacful 
and intemingled with fantastic classical piano.
Every time I listen to it I feel very relaxed so in this
excercise i decided to interpret the song as a nebulous 
cloud of stars. you can listen to this song and many 
others at this url 
http://www.acidplanet.com/artist.asp?songs=256742&T=7200*/

//Initial varibles
int fillAlpha;
float distTest;
int point1x;
int point1y;
float starSize;

//creation of star nebulas
void setup() {
  //sets up black sky
  size (400, 400);
  background(0);
  //defines points of star origins and star sizes
  for(int points = 0; points < 5; points++){
    point1x = (int)random(400);
    point1y = (int)random(400);
    starSize = 1.5 + random(3);
    stroke(255);
    //Draws nebula for each individual star
    for(int x = 0; x < 400; x++){
      for(int y = 0; y < 400; y++){
        distTest = 255-(dist(point1x, point1y, x, y)*starSize);
        if(distTest > -1){
          fillAlpha = int(distTest);
          stroke(255, fillAlpha);
          point(x,y);
          //adds star lense flares
          if(x == point1x || y == point1y){
            point(x,y);
          }
        }
      }
    }
  }
}
Exercise 03: Using only grayscale values, develop an abstract pattern reflecting the structure of one of your favorite songs