Kinematics and dynamics of plane mechanisms