Text this: Analytical mechanics of gears.