Last active
April 17, 2017 18:27
-
-
Save andyinabox/cdcff8bc7da4a29769429cfb11f1d875 to your computer and use it in GitHub Desktop.
leap motion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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