Kinematics and dynamics of machinery