final project: Artificial Linings

IMG_5310

Working in combination with Maya Kaisth I created “Artificial Linings” a modern installation representative of sky landscapes. The second rendition of artificial linings that will feature the technology shown here will be up for viewing in the Ellis gallery from December 10-11th. PLEASE COME! :)

here is an example of the kinect in action!

here is a photo of the first rendition of artificial linings
IMG_8305

here’s a video of the first rendition

here’s my code!

import tsps.*;
TSPS tspsReceiver;
TSPSPerson[] previousPeople={};
float blueX=400;
float cyanY=550;
float pinkX=1000;
float tinyPinkY=300;
float tinyCyanY=1000;
float purpleX=1200;
float purpleY=300;
float whiteXTWO=1200;
float whiteYTWO=500;
boolean tinyPinkGoesUp=true;
boolean tinyCyanGoesUp=false;
boolean pinkGoingRight=true;
boolean whiteTWOGoingNE=true;
boolean goingRight=true;
boolean goingUp=true;
boolean goingNE=true;
boolean blueGoesRight=true;
boolean purpleGoesSW=true;
int whiteX=300;
int whiteY=displayHeight;


void setup()
{
  size(displayWidth,displayHeight);
  smooth();
  background(255,255,255);
  
  tspsReceiver= new TSPS(this, 12000);
};

//coment in the boolean thing when you're ready for full screen.
boolean sketchFullScreen() {
return true;}

float previousAverage=0;



void draw(){
   background(157,3,255);
   float diameter= displayWidth/1.5;
   noStroke();
   
   
   boolean fastPerson=false;
   float peopleSum=0;
   TSPSPerson[] currentPeople =tspsReceiver.getPeopleArray();
   if ((currentPeople.length!=0) && (previousPeople.length!=0))
   { for (int i=0; i<currentPeople.length; i++){
    // get person
    TSPSPerson currentPerson = currentPeople[i];
      for (int j=0; j<previousPeople.length; j++){
        TSPSPerson previousPerson = previousPeople[j];
        if (currentPerson.id==previousPerson.id)
          {
          float speed=sqrt(pow(currentPerson.velocity.x,2)+pow(currentPerson.velocity.y,2));
          peopleSum=peopleSum+speed;
      
        }      
      }  
   }
   }
  float averageSpeed=peopleSum/currentPeople.length; 
   previousPeople=currentPeople; 
   
   //left most big pink one
   fill(255,8,252,50);
   ellipse(pinkX-800,700,diameter-300,diameter-300);
   fill(255,8,252,50);
   ellipse(pinkX-800,700,diameter-250,diameter-250);
   fill(255,8,252,40);
   ellipse(pinkX-800,700,diameter-200,diameter-200);
   fill(255,8,252,40);
   ellipse(pinkX-800,700,diameter-150,diameter-150);
   fill(255,8,252,40);
   ellipse(pinkX-800,700,diameter-100,diameter-100);
   fill(255,8,252,40);
   ellipse(pinkX-800,700,diameter-50,diameter-50);
   fill(255,8,252,30);
   ellipse(pinkX-800,700,diameter,diameter);
   fill(255,8,252,30);
   ellipse(pinkX-800,700,diameter+50,diameter+50);
   fill(255,8,252,20);
   ellipse(pinkX-800,700,diameter+100,diameter+100);
   fill(255,8,252,10);
   ellipse(pinkX-800,700,diameter+150,diameter+150);
   fill(255,8,252,10);
   ellipse(pinkX-800,700,diameter+200,diameter+200);
   
   
   //dark blue one from darkest to lightest
   fill(69,3,255,30);
   ellipse(blueX,300,diameter-300,diameter-300);
   fill(69,3,255,30);
   ellipse(blueX,300,diameter-250,diameter-250);
   fill(69,3,255,20);
   ellipse(blueX,300,diameter-200,diameter-200);
   fill(69,3,255,20);
   ellipse(blueX,300,diameter-150,diameter-150);
   fill(69,3,255,10);
   ellipse(blueX,300,diameter-100,diameter-100);
   fill(69,3,255,10);
   ellipse(blueX,300,diameter-50,diameter-50);
   fill(69,3,255,10);
   ellipse(blueX,300,diameter,diameter);
   
   
  
   //cyan one
   fill(0,249,255,30);
   ellipse(100,cyanY,diameter-300,diameter-300);
   fill(0,249,255,20);
   ellipse(100,cyanY,diameter-250,diameter-250);
   fill(0,249,255,20);
   ellipse(100,cyanY,diameter-200,diameter-200);
   fill(0,249,255,20);
   ellipse(100,cyanY,diameter-150,diameter-150);
   fill(0,249,255,10);
   ellipse(100,cyanY,diameter-100,diameter-100);
   fill(0,249,255,10);
   ellipse(100,cyanY,diameter-50,diameter-50);
   fill(0,249,255,10);
   ellipse(100,cyanY,diameter,diameter);
   
  
 
     
     
  //another tiny white one it goes NE
   fill(255,255,255,40);
   ellipse(whiteXTWO,whiteYTWO,diameter-450,diameter-450);
   fill(255,255,255,40);
   ellipse(whiteXTWO,whiteYTWO,diameter-500,diameter-500);
      
   
    
   
  
  //pink one
   fill(255,8,252,50);
   ellipse(pinkX,700,diameter-300,diameter-300);
   fill(255,8,252,45);
   ellipse(pinkX,700,diameter-250,diameter-250);
   fill(255,8,252,40);
   ellipse(pinkX,700,diameter-200,diameter-200);
   fill(255,8,252,40);
   ellipse(pinkX,700,diameter-150,diameter-150);
   fill(255,8,252,40);
   ellipse(pinkX,700,diameter-100,diameter-100);
   fill(255,8,252,30);
   ellipse(pinkX,700,diameter-50,diameter-50);
   fill(255,8,252,30);
   ellipse(pinkX,700,diameter,diameter);
   fill(255,8,252,30);
   ellipse(pinkX,700,diameter+50,diameter+50);
   fill(255,8,252,20);
   ellipse(pinkX,700,diameter+100,diameter+100);
   fill(255,8,252,20);
   ellipse(pinkX,700,diameter+150,diameter+150);
   fill(255,8,252,20);
   ellipse(pinkX,700,diameter+200,diameter+200);
   
   
   //tiny black one
   fill(0,0,0,100);
   ellipse(whiteX,whiteY,diameter-450,diameter-450);
   fill(0,0,0,70);
   ellipse(whiteX,whiteY,diameter-500,diameter-500);
  
   //tiny blue one turned cyan
   fill(0,249,255,30);
   ellipse(blueX+300,300,diameter-700,diameter-700);
   fill(0,249,255,20);
   ellipse(blueX+300,300,diameter-650,diameter-650);
   fill(0,249,255,20);
   ellipse(blueX+300,300,diameter-600,diameter-600);
   fill(0,249,255,10);
   ellipse(blueX+300,300,diameter-550,diameter-550);
   fill(0,249,255,10);
   ellipse(blueX+300,300,diameter-500,diameter-500);
   fill(0,249,255,10);
   ellipse(blueX+300,300,diameter-450,diameter-450);
   
   
  
   //purple one
   fill(107,3,255,40);
   ellipse(purpleX-1600,purpleY+800,diameter-300,diameter-300);
   fill(107,3,255,40);
   ellipse(purpleX-1600,purpleY+800,diameter-250,diameter-250);
   fill(107,3,255,40);
   ellipse(purpleX-1600,purpleY+800,diameter-200,diameter-200);
   fill(107,3,255,30);
   ellipse(purpleX-1600,purpleY+800,diameter-150,diameter-150);
   fill(107,3,255,30);
   ellipse(purpleX-1600,purpleY+800,diameter-100,diameter-100);
   fill(107,3,255,20);
   ellipse(purpleX-1600,purpleY+800,diameter-50,diameter-50);
   fill(107,3,255,20);
   ellipse(purpleX-1600,purpleY+800,diameter,diameter);
   fill(107,3,255,20);
   ellipse(purpleX-1600,purpleY+800,diameter+50,diameter+50);
   fill(107,3,255,20);
   ellipse(purpleX-1600,purpleY+800,diameter+100,diameter+100);
   fill(107,3,255,20);
   ellipse(purpleX-1600,purpleY+800,diameter+150,diameter+150);
   fill(107,3,255,10);
   ellipse(purpleX-1600,purpleY+800,diameter+200,diameter+200);
   
   
   //left dark blue one from darkest to lightest
   fill(170,3,255,30);
   ellipse(blueX-1100,300,diameter-300,diameter-300);
   fill(170,3,255,30);
   ellipse(blueX-1100,300,diameter-250,diameter-250);
   fill(170,3,255,30);
   ellipse(blueX-1100,300,diameter-200,diameter-200);
   fill(170,3,255,20);
   ellipse(blueX-1100,300,diameter-150,diameter-150);
   fill(170,3,255,20);
   ellipse(blueX-1100,300,diameter-100,diameter-100);
   fill(170,3,255,20);
   ellipse(blueX-1100,300,diameter-50,diameter-50);
   fill(170,3,255,10);
   ellipse(blueX-100,300,diameter,diameter);
   
   
   //tiny pink one
   fill(255,8,252,50);
   ellipse(400,tinyPinkY,diameter-700,diameter-700);
   fill(255,8,252,50);
   ellipse(400,tinyPinkY,diameter-650,diameter-650);
   fill(255,8,252,40);
   ellipse(400,tinyPinkY,diameter-600,diameter-600);
   fill(255,8,252,40);
   ellipse(400,tinyPinkY,diameter-550,diameter-550);
   fill(255,8,252,40);
   ellipse(400,tinyPinkY,diameter-500,diameter-500);
   fill(255,8,252,20);
   ellipse(400,tinyPinkY,diameter-450,diameter-450);
   
   
   //purple one
   fill(107,3,255,50);
   ellipse(purpleX,purpleY,diameter-300,diameter-300);
   fill(107,3,255,40);
   ellipse(purpleX,purpleY,diameter-250,diameter-250);
   fill(107,3,255,30);
   ellipse(purpleX,purpleY,diameter-200,diameter-200);
   fill(107,3,255,30);
   ellipse(purpleX,purpleY,diameter-150,diameter-150);
   fill(107,3,255,20);
   ellipse(purpleX,purpleY,diameter-100,diameter-100);
   fill(107,3,255,20);
   ellipse(purpleX,purpleY,diameter-50,diameter-50);
   fill(107,3,255,20);
   ellipse(purpleX,purpleY,diameter,diameter);
   fill(107,3,255,20);
   ellipse(purpleX,purpleY,diameter+50,diameter+50);
   fill(107,3,255,20);
   ellipse(purpleX,purpleY,diameter+100,diameter+100);
   fill(107,3,255,20);
   ellipse(purpleX,purpleY,diameter+150,diameter+150);
   fill(107,3,255,10);
   ellipse(purpleX,purpleY,diameter+200,diameter+200);
     
   //tiny cyan one
   fill(0,249,255,5);
   ellipse(800,tinyCyanY,diameter-600,diameter-600);
   fill(0,249,255,5);
   ellipse(800,tinyCyanY,diameter-550,diameter-550);
   fill(0,249,255,5);
   ellipse(800,tinyCyanY,diameter-500,diameter-500);
   fill(0,249,255,5);
   ellipse(800,tinyCyanY,diameter-450,diameter-450);
   fill(0,249,255,5);
   ellipse(800,tinyCyanY,diameter-400,diameter-400);
   fill(0,249,255,5);
   ellipse(800,tinyCyanY,diameter-350,diameter-350);
   fill(0,249,255,5);
   ellipse(800,tinyCyanY,diameter-300,diameter-300);
 
 float A=0.90;
 float B=1.0-A;
  
 previousAverage=previousAverage*A+(15*averageSpeed)*B;
 fill(0,0,0,previousAverage);
 rect(0,0,displayWidth,displayHeight);
     
   
  if(whiteTWOGoingNE==true)
   {
      whiteXTWO=whiteXTWO+10;
      whiteYTWO=whiteYTWO-10;
      if (whiteYTWO<-100){
         whiteTWOGoingNE=false;}
   }
   else
   {
      whiteXTWO=whiteXTWO-10;
      whiteYTWO=whiteYTWO+10;
      if (whiteYTWO>displayHeight+250){
          whiteTWOGoingNE=true;
      }
   }
 
   //white one that goes SW even though its boolean is called goingNE 
   if(goingNE==true)
   {
      whiteX=whiteX+10;
      whiteY=whiteY+10;
      if (whiteX>=1600){
         goingNE=false;}
   }
   else
   {
      whiteX=whiteX-10;
      whiteY=whiteY-10;
      if (whiteX<-300){
          goingNE=true;
      }
   }
   
      
   //tinypinkgoesUP!!!!
  if(tinyPinkGoesUp==true)
   {
     tinyPinkY=tinyPinkY-1.4;
     if (tinyPinkY<-200)
     {
       tinyPinkGoesUp=false;}
       
   }
   else
   {
     tinyPinkY=tinyPinkY+1.4;
     if (tinyPinkY>displayWidth+200)
     {
       tinyPinkGoesUp=true;}
   }

   
   //cyan one
   if(goingUp==true)
   {
     cyanY=cyanY-2;
     if (cyanY<-100){
        goingUp=false;}
   }
   else
   {
     cyanY=cyanY+2;
     if (cyanY>displayHeight+200)
     { 
       goingUp=true;}
   }

//pink goes right
  if(pinkGoingRight==true)
  {
     pinkX=pinkX+2;
     if (pinkX>1000){
       pinkGoingRight=false;}
   }
   else
   {
     pinkX=pinkX-2;
     if (pinkX<50){
       pinkGoingRight=true;
     }
   }
  
//the tiny middle cyan one goes up weeeeeeee 
  if(tinyCyanGoesUp==true)
  {
      tinyCyanY=tinyCyanY+2;
      if (tinyCyanY<50){
        tinyCyanGoesUp=false;}
  }
  else
  {
      tinyCyanY=tinyCyanY-2;
      if (tinyCyanY>displayHeight+200){
        tinyCyanGoesUp=true;
     }
  }
  
  
  if(blueGoesRight==true)
  {
    blueX=blueX+1.5;
    if (blueX>displayWidth+350){
      blueGoesRight=false;}
  }
  else
  {
    blueX=blueX-1.5;
    if (blueX<-350){
    blueGoesRight=true;
    }
  }
  
  //purplegoes SW!!!!!
  if(purpleGoesSW==true)
  {
    purpleX=purpleX-14;
    purpleY=purpleY+7;
    if (purpleY>displayWidth+350){
      purpleGoesSW=false;}
  }
  else
  {
    purpleX=purpleX+14;
    purpleY=purpleY-7;
    if (purpleY<-500){
    purpleGoesSW=true;
    }
  }
     
   //tinypinkgoesUP!!!!
  if(tinyPinkGoesUp==true)
   {
     tinyPinkY=tinyPinkY+1.4;
     if (tinyPinkY<-200)
     {
       tinyPinkGoesUp=false;}
       
   }
   else
   {
     tinyPinkY=tinyPinkY-1.4;
     if (tinyPinkY<-200)
     {
       tinyPinkGoesUp=true;}
   }
}

Comments are closed.