Optimized five-bar linkages with non-circular gears for exact path generation