As shown in the figure, the crank has a mass m1 (and length L1), while the connecting rod has a mass m2 (and length L2). Gravity in the -Y direction is included. The equations will be generated with the 3 joint coordinates [s, theta, beta]. Since the system has only 1 degree of freedom, 2 algebraic constraint equations will be generated for these 3 coordinates, in addition to the 3 dynamic equations.