Kinematics and Dynamics of Planar Machinery