assignment 4(1)

void setup(){
  size(300,300);
 frameRate(30) ;
}

float x,y;

void draw(){
  //background(255);
  x = x + random(-3,3);
  y = y + random(-3,3);
  constrain(x,100,200);
  constrain(y,100,200);
  ellipse(x,y,20,20);
}

void mousePressed(){
  x = mouseX;
  y = mouseY;
}

Advertisements

assignment 2

int num = 20;
int[] dx = new int[num];
int[] dy = new int[num];
void setup() {
size(300, 240);
for (int i = 0; i < num; i++) {
dx[i] = i * 5;
dy[i] = 12 + (i * 6);
}
}

void draw() {
background(0);
smooth();
for (int i = 0; i < num; i++) {
dx[i] = dx[i] + 1;
height=dx[i]-5;
width =dy[i]-10;
if (dx[i] > 100) {
dx[i] = -100;
}
rect(dx[i], dy[i],height,width);
}
}

 

assignment 3

void setup(){
   background(255);
   size(300,300);
 }
 
 void draw(){
 //
 
  pushMatrix();
  translate(120,120);
  scale(1,1);
  rotate(radians( mouseX)*3.6);
  rect(15,15,20,10);
  popMatrix();
 
  pushMatrix();
  translate(150,150);
  scale(1,1);
  rotate(radians(mouseX)*3.6);
  rect(20,20,20,10);
  popMatrix();
  }

assignment 4

Ball[] ballCollection = new Ball[20];

void setup(){
  size(500,500);
  smooth();
 for( int i=0; i< ballCollection.length;i++){ 
 ballCollection[i] = new Ball(random(0,width),random(0,200));
 }
}

void draw(){
  background(0);
 
 for( int i=0; i< ballCollection.length;i++){
 ballCollection[i].run();
 }
}

class Ball{
  float x=0;
  float y=0;
  float xSpeed=4;
  float ySpeed=0.5;
 
 
  Ball(float _x, float _y){
    x = _x;
    y = _y;
  }
 
  void run(){
    display();
    move();
    bounce();
    gravity(); 
  }
 
  void gravity(){
    ySpeed += 0.2 ;
  }
 
 
  void bounce(){
    if( x> width){
      xSpeed = xSpeed *(-1);
    }
    if( x<0){
      xSpeed = xSpeed *(-1);
    }
    if( y>height){
      ySpeed = ySpeed *(-1);
    }
    if( y<0){
      ySpeed = ySpeed *(-1);
    }
  }
 
   void move(){
     x += xSpeed;
     y += ySpeed;
   }
 
  void display(){
    ellipse(x,y,20,20);
  }
}

MuchoWall, an 80″ multimodal sensitive wall

scale ipad into a huge wall, then the artist can creat their work on that, liking daning.Photo of MuchoWall, an 80″ multimodal sensitive wall from Tangible Displays (Jimmy Hertz, Founder)Jimmy Hertz is a member of the NUI-Group and has been involved in various activities .

http://interactivemultimediatechnology.blogspot.com/2009/11/interactive-video-art-in-action.html