Optimal Design of Cam Curves