Warning: Undefined array key "type" in /www/wwwroot/adcpu.com.cn/wp-content/themes/advertise/template/work-student.php on line 21
作品详情

GoneWithWind

以陈奕迅照片为基础,通过processing软件实现的随着鼠标的移动,展现出图片的不同动态效果。

PImage eason;
int step=3;
float startX=0;

void setup() {
  size(800, 800);
  frameRate(30);
  strokeWeight(step*1.5);

  eason=loadImage("eason.jpg");
  eason.resize(width, height);
  eason.loadPixels();
}

void draw() {
  noStroke();
  fill(255, 5);
  rect(0, 0, width, height);

  startX=mouseX;

  for (int i=0; i<width; i+=step) {
    for (int j=0; j<height; j+=step) {
      int index=i+j*width;
      color col=eason.pixels[index];
      //color col=eason.get(i, j);

      float xoff=0;
      float yoff=0;
      if (i>startX) {
        float scl=map(i, startX, startX+width, 0, 100);
        xoff=abs(randomGaussian())*scl; 
        yoff=random(-scl*0.5, scl*0.5);
      }

      stroke(col);
      point(i+xoff, j+yoff);
    }
  }
}
main=Eason.pde

 

刘瀚择

“开心最重要啦”
我也不太了解自己的性格,目前正在探索自己的喜好和真正的热爱,兴趣爱好的话,对音乐,各种体育运动,各种活动,参与过的没参与过的都抱有极大的兴趣,这么来看,可能是没有真正的爱好,也可能是爱好广泛

0
4