import de.voidplus.leapmotion.*;
LeapMotion leap;
int PT_NO=100;
PVector[][] pt=new PVector[5][PT_NO];
void setup() {
size(640, 480, P3D);
colorMode(HSB, 100);
background(0);
for (int f=0; f<5; f++)
for (int i=0; i0; i--) {
pt[f][i].x=pt[f][i-1].x;
pt[f][i].y=pt[f][i-1].y;
//pt[f][i].z=pt[f][i-1].z;
}
for (Hand hand : leap.getHands ()) {
for (Finger finger : hand.getFingers ()) {
int f=finger.getType();
PVector now =finger.getPosition();
pt[f][0].x=now.x;
pt[f][0].y=now.y;
//pt[f][0].y=now.z*2-90;
}
}
translate(width/2, height/2, 0);
rotateY(radians(frameCount/4.0));
translate(-width/2, -height/2, 0);
drawStroke(pt);
stroke(60, 100, 100);
for (int i=0; i<640; i+=20)
for (int j=0; j<480; j+=20) {
noFill();
rect(i, j, 20, 20);
}
}
2016年3月10日 星期四
Week 03
標籤:
02160676_林後昇,
期中作品,
Week03,
Week08
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言