% MotionGenesis file: MGIceSkaterWithTurntableKaneLagrange.txt % Copyright (c) 2015 Motion Genesis LLC. All rights reserved. %------------------------------------------------------------ NewtonianFrame N RigidBody A % Head, torsion, legs. RigidFrame B % Arms. Particle Q % Heavy dumbbell. %------------------------------------------------------------ Specified qB'' % Arm angle. Variable wA' % Ay> measure of A's angular velocity in N. Constant g = 9.8 m/s^2 % Earth's gravitational acceleration. Constant hA % Distance between Acm and Bo. Constant L = 0.7 m % Distance between Bo and Q. Q.SetMass( m = 12 kg ) A.SetInertia( Acm, Ixx = 18.6 kg*m^2, Iyy = 0.6 kg*m^2, Izz = 18 kg*m^2 ) %------------------------------------------------------------ % Rotational kinematics. A.SetAngularVelocity( N, wA*Ay> ) B.RotateZ( A, qB ) %------------------------------------------------------------ % Translational kinematics. Acm.SetVelocity( N, 0> ) Bo.Translate( Acm, hA*Ay> ) Q.Translate( Bo, -L*By> ) %------------------------------------------------------------ % Add relevant forces. Q.AddForceGravity( -g*Ay> ) %------------------------------------------------------------ % Form and solve rotational equation of motion. SetGeneralizedSpeed( wA ) Zero = System.GetDynamicsKane() Solve( Zero, wA' ) %------------------------------------------------------------ Save MGIceSkaterWithTurntableKaneLagrange.html Quit