2011年1月18日 星期二

Pong (Man Kam Hung, Jasper Fung, Phim Tam)

float xspeed = 0;
float yspeed = 0;
float ballSize = 10;
float x = 250;
float y = 200;
float rpy=200; float rpyspeed;
int press_mouse_msg,right_score,left_score = 0;
void setup()
{
  size(500,400);
  smooth();
}
void draw() {
 background(0);
 fill(255);
 noStroke();
 text(left_score, 15,30);
 text(right_score, 475,30);
 if (press_mouse_msg == 0) text("Press the mouse to begin.", 180+ press_mouse_msg, 175);
 // draw the ball
 ellipse(x,y,ballSize,ballSize);
 x += xspeed ;
 y += yspeed ;

 if (x < ballSize/2){
  right_score +=1;
  x = 250;
  y = 200;
  press_mouse_msg = 0;
  xspeed = 0;
  yspeed = 0; 
}
if (x > width-ballSize/2){
  left_score +=1;
  x = 250;
  y = 200;
  press_mouse_msg = 0;
  xspeed = 0;
  yspeed = 0; 
}
 if (y > height-ballSize/2 || y < ballSize/2){
   yspeed = yspeed * -1;}
 // draw the left paddle
 rect(50,mouseY,10,50);
 if (x-5 < 50+5 && y < mouseY + 50 && y > mouseY && x-5 > 50-5)
   { float paddle_yspeed = mouseY-pmouseY;
     float xc = random (0.5,1.8);
     xspeed = -xspeed* xc;
     yspeed = (5* (paddle_yspeed - yspeed) + 5 * paddle_yspeed + yspeed) / 6;
   }
  // draw the right paddle
 rect(width-50,rpy-25,10,50);
 if (xspeed >0) {
      rpy += rpyspeed;
 if (rpy < y) rpyspeed = 1 + (x-50)/100;
 if (rpy > y) rpyspeed = - (1 + (x-50)/100);
 }
 if (x+5 > width-50-5 && y < rpy+25 && y > rpy-25 && x+5 < width-50+5)
   { float xb = random (0.5,1.8);
     xspeed = -xspeed* xb;
     yspeed = yspeed * -1;
   }
}
void mousePressed(){
  if (xspeed==0) {
  xspeed= random(-5.0,5.0);
  if (xspeed < 0 && xspeed >-1.0) {xspeed = -3;}
  if (xspeed > 0 && xspeed <1.0) {xspeed = 3;}
  yspeed= random(-5.0,5.0);
  if (yspeed < 0 && yspeed >-1.0) {yspeed = -3;}
  if (yspeed > 0 && yspeed <1.0) {yspeed = 3;}
  press_mouse_msg+=100;}
}

2010年12月3日 星期五

8 Hours

8 hours in the boutique in Causeway Bay.
Reflection of glass. Shops in street. Light changes in the boutique. Opposite building.
Activities reflected on display table.








2010年12月2日 星期四

Things with a Future Tense

In the philosophy of time, some people say that only the present exists while the future and the past are unreal. It is true that the sense of future comes from imagination and prediction which are unreal, from the present information and contain uncertainties. As imagination and prediction can be raised from almost everything, everything would have its future tense.

Every photos capture the moment of the present and become the moment of the past. To raise the sense of future, imagination and prediction have to be motivated.
I set a sentence in a place which warns and encourages people to take actions. Of course, the sentence saying it is a bomb is fictional. But the point is to trigger imagination and thinking.
The photo with the fictional sentence actively encourages the viewers to imagine or to predict the future events or to think about the physical, social or cultural possibility of the place based on the information from the following photo portraits of it. Many photo portraits of the street are captured with wider angles to include more information for the viewers.
(It is the street where I live in.)