hey !
I've put my hands on a kinect, and thanks to Matthias Kronlachner I've pluged it to PureData with pix_openni.
So I receive points with XYZ translations,
and I want to transform that in rotations for a rig.
I'm no expert with such things. but I tryed something out with trigonometry :
a being the hand and b being the shoulder
BC = (a.x-b.x);
AB = (a.y-b.y);
AC = sqrt((AB*AB)+(BC*BC));
BD = AC - AB;
YY = atan(AB/BC)+atan(BD/BC)
X = (YY*180/PI)*2;
this gives me in degree from 0 to 360 the angle of my arm, I then just give him XY, XZ and ZY translation and get RX RY RZ in return.
But when I apply it as a rotation to a cube, movements don't match ...
So I guess that's not the right technique. I'm reading something about matrices, but I don't understand it quite well ...
so maybe somebody can tell me if I'm on the right way, and maybne explain me a bit
thanks for reading,
cheers