Important Formulas in This Chapter

For the standard form of inverse kinematics, you use the law of cosines formula.

Law of cosines:

 a  2  = b  2  + c  2    2 * b * c * cos A b  2  = a  2  + c  2    2 * a * c * cos B c  2  = a  2  + b  2    2 * a * b * cos C 

Law of cosines in ActionScript:

 A = Math.acos((b * b + c * c - a * a) / (2 * b * c)); B = Math.acos((a * a + c * c - b * b) / (2 * a * c)); C = Math.acos((a * a + b * b - c * c) / (2 * a * b)); 


Foundation ActionScript. Animation. Making Things Move
Foundation Actionscript 3.0 Animation: Making Things Move!
ISBN: 1590597915
EAN: 2147483647
Year: 2005
Pages: 137
Authors: Keith Peters

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net