40 likes | 171 Views
Programming Assignment #3. Inverse Kinematics for Human Body Requirements Compute Jacobian matrix and its pseudo-inverse Make the flexibility of each joint adjustable Specify both goal position and orientation of a limb Implement Euler integration You may leave the skeletal root fixed.
E N D
Programming Assignment #3 • Inverse Kinematics for Human Body • Requirements • Compute Jacobian matrix and its pseudo-inverse • Make the flexibility of each joint adjustable • Specify both goal position and orientation of a limb • Implement Euler integration • You may leave the skeletal root fixed
Programming Assignment #3 • Optional Requirements • Allow multiple constraints to be specified • Make the skeletal root floating • Formulate objective function and implement line minimization • Implement a user-interface to drag an arbitrary body part
Sample Code Nonlinear Programming gradient_descent( d, num_dof, tolerance, iter, f, energyFunc, leastSquareDirection); Objective function to minimize static float energyFunc( vectorNconst&d ); Least Square of Jacobian Matrix static float leastSquareDirection( vectorNconst&d, vectorN& dp )
Sample Code static float gradientFuncLS( vectorN const&d, vectorN& dp ) { tPosture = oPosture; tPosture.addDisplacement( d ); J = computeJacobian(); static matrixN Jt; Jt.transpose( J ); static matrixN Jp; Jp.mult( Jt, J ); static vectorN bp; bp.mult( Jt, b ); dp.solve( Jp, bp ); }