Thanks to those who helped me with my previous question. I will help others too where I can. In the meantime I have a general question whether anyone has had success connecting Mathematica to the LeapMotionTM device on a Mac? If so, please could you show me how you did this? I have followed instructions on the following page but got Java errors, and I use OSX not Windows:
http://community.wolfram.com/groups/-/m/t/90931
The only modifications I made to the instruction code was to change the directory symbols from "\\" to "/", though I have tried both formats.
Needs["JLink`"];
ReinstallJava[CommandLine -> "java", JVMArguments ->
"-Djava.library.path=[/Users/myname/Desktop/LeapDeveloperKit/
LeapSDK]"]; (*etc...*)
I have programmed the LeapMotion in Processing but would prefer to prototype some ideas in Mathematica as I can understand the math better with that before rewriting in Processing. Thanks.