A small if crude example of data from Leap Motion, when the controller is initialized like in this thread:
getFrameData =
Module[{getFrame, getFingerList, getVector, makeRule, fun},
getFrame[controller_] := controller@frame[];
getFingerList[frame_] :=
With[{f = frame@fingers[]},
Table[f@get[finger], {finger, 0, f@count[] - 1}]];
getVector[v_] := {v@getX[], v@getY[], v@getZ[]};
makeRule[finger_, map_, method_] := method -> map[finger@method[]];
fun[controller_] :=
With[{fr = getFrame[controller]},
{makeRule[fr, #/1000000. &, timestamp],
fingers ->
({makeRule[#, Identity, length],
makeRule[#, getVector, direction],
makeRule[#, getVector, tipPosition],
makeRule[#, getVector, tipVelocity],
makeRule[#, getVector, stabilizedTipPosition]} & /@
getFingerList[fr])}];
fun];
This function returns some of data available in the API (
https://developer.leapmotion.com/documentation/Languages/Java/API/annotated.html ) in Mathematica-style manner:
getFrameData[controller]
(*
{timestamp -> 15370.,
fingers -> {{length -> 65.1096,
direction -> {0.0140035, -0.33028, -0.943779},
tipPosition -> {-24.4047, 179.213, -115.658},
tipVelocity -> {-0.199876, 0.767241, 4.08685},
stabilizedTipPosition -> {-26.4247, 178.62, -116.503}},
...,
{length -> 41.934,
direction -> {0.71685, -0.00299873, -0.697221},
tipPosition -> {58.0986, 148.038, -0.762505},
tipVelocity -> {2.57099, -0.732685, 3.28637},
stabilizedTipPosition -> {57.0482, 145.986, -4.76263}}}}
*)
Starting point for visualization of this data might be this, showing fingertips (correcting coordinate directions makes it a bit messy oneliner):
Graphics3D[
Dynamic[Sphere[{1, -1, 1} #[[{1, 3, 2}]], 15] & /@
((tipPosition /. #) & /@ (fingers /. getFrameData[controller])), UpdateInterval -> 0.05],
PlotRange -> {{-150, 150}, {-150, 150}, {0, 300}}]