Skip to content

Instantly share code, notes, and snippets.

@andyinabox
Last active April 17, 2017 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andyinabox/cdcff8bc7da4a29769429cfb11f1d875 to your computer and use it in GitHub Desktop.
Save andyinabox/cdcff8bc7da4a29769429cfb11f1d875 to your computer and use it in GitHub Desktop.
leap motion
import de.voidplus.leapmotion.*;
LeapMotion leap;
void setup() {
size(500, 500);
leap = new LeapMotion(this);
}
void draw() {
background(255);
for (Hand hand : leap.getHands ()) {
PVector handPosition = hand.getPosition();
println("X "+handPosition.x);
println("Y "+handPosition.y);
println("Z "+handPosition.z);
fill(255, 0, 0);
ellipse(handPosition.x, handPosition.y, handPosition.z, handPosition.z);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment