View Full Version : Re: Calculation of 2D Angles ('CAST' problem)

Dr. Chris Kirtley
12-19-2002, 09:36 AM
More replies. still astonishes me that we don't have a standard method
after all these years... (begging the flames)

Richard Baker

About 90% of problems can be resolved by using ASIN rather than ATAN.
returns a positive or negative value depending on whether the angle is
side or the other of vertical as opposed to the ATAN function which
both as positive. It doesn't work beyond 90 degrees either way of
but few joints have a functional range of movement of more than 180
and thus by sensible choice of the reference line about which ASIN is
calculated for each joint/segment this problem can generally be avoided.



Dear Chris,

For atan(y/x), you can tell the quadrant where the angle lies by
examining the
signs of y and x. For instance, if both y and x are negative, y/x will
be in
the third quadrant. If one does not examine the signs of y and x, since
will be positive, atan(y/x) will be mistaken to be in the first
Of course, if you do atan(value), i.e. with no knowledge of x and y,
there is
no way that you can tell the quadrant. Fortunately, in gait analysis,
you derive x and y from the marker positions, eg (Yknee - Yankle)/(Xknee
Xankle), you should have no problem.
In Matlab, there is actually a function atan2 which does the above
automatically. I prefer atan2 to atan so that we don't have to do manual
testing of the signs of x and y.
Does Ray Smith use the same method?

Happy Christmas to you too.


Dr. Chris Kirtley MD PhD
Associate Professor
Dept. of Biomedical Engineering
Catholic University of America
620 Michigan Ave NE, Washington, DC 20064
Tel. 202-319-6247, fax 202-319-4287
Email: kirtley@cua.edu

To unsubscribe send SIGNOFF BIOMCH-L to LISTSERV@nic.surfnet.nl
For information and archives: http://isb.ri.ccf.org/biomch-l