nick /224 /squiggles 5

String[] temp_array;
float[] lpst = new float [4];
float[] lpst_tween = new float[4];

int counter;

squiggle[] s = new squiggle[100];
void setup(){
  size(800,600);
  smooth();
  for(int i = 0; i < s.length; i++){
    s[i] = new squiggle();
  }
  fill(0,20);
  stroke(255,70);
  counter = 500;
  getData();
  background(0);
}


void draw(){
  //background(0);
  translate(width/2,height/2);
  for(int i = 0; i < s.length; i++){
    s[i].draw();
  }
  counter--;
  if(counter <= 0){
    counter = 500;
    getData();
  }
}

class squiggle{
  float rad;
  float x,y;
  float rand_turn;
  boolean turn = false;
  float speed;
  //float width;
  squiggle(){
    x = 0;
    y = 0;
    rad = random(0,2*PI);
    //speed = lpst[3];//random(.02, lpst[3]);
    //lpst_tween[0] = lpst[0];
    //lpst_tween[0] = lpst
  }
  void draw(){
    if(lpst_tween[3] < lpst[3]/10){
      lpst_tween[3] +=.0001;
    }
    if(lpst_tween[3] > lpst[3]/10){
      lpst_tween[3] -=.0001;
    }
    speed = lpst_tween[3];
    line(x,y,cos(rad) * 30 + x, sin(rad) * 30 + y);
    //strokeWeight(lpst[0]/50);
    stroke(lpst_tween[0], lpst_tween[0]);
    //println(lpst_tween[0]);
    //stroke(map(lpst[0],0,420,0,255),map(lpst[0],0,420,0,255));
    ellipse(x,y,(-lpst_tween[0]/4),(-lpst_tween[0]/4));
    if(lpst_tween[0] < lpst[0]){
      lpst_tween[0]+=.01;
    }
    if(lpst_tween[0] > lpst[0]){
      lpst_tween[0]-=.01;
    }
    x = cos(rad) * speed + x;
    y = sin(rad) * speed + y;
    if(sqrt(sq(x - (0)) + sq(y - (0))) < 500){
      rad += random(-.25,.25);
      turn = false;
    }
    else {
      if(turn == false){
        rand_turn = random(.1,.3);
        turn = true;
      }
      rad += rand_turn;
    }
  }
}



void getData(){
        String query = "http://transmogrify.me/loungeout.php";

        println(query);
        String[] results = loadStrings(query);
        for ( int i=0; i

Page Details
Contact DANM  |  Digital Arts and New Media  |  Arts Division  |  Grad Division
login