I have digitized a video of a flying fly in a 3-dimensional space.
At all instants I know the x, y, and z co-oridinates of the following points on the fly's body ---
The points are my choice, and the points can be placed anywhere else, any number of times.
Now using these points I wish to know the body angles (yaw, pitch and roll) of the fly with respect to a fixed axis.
I have tried the following (which I think is wrong).
- Using the head and the tail as a head-vector --- I calculated the angle of this vector with the Z axis. And I called it pitch. But this would work only in certain circumstances..... dont want to go into details.
- I did the same thing as above for roll except that I used the two wing bases as a vector and then calculated the angle of that vector with the Z axis.
I am using matlab to code the above thing. I know it has to be done with Euler angles like in the figure shown here :
http://mathworld.wolfram.com/EulerAngles.html
But I dont know how to proceed with all the 3D co-ordinates that I have. A little direction would help.....
No comments:
Post a Comment