Here are apps which allow you to define follower motion and derive the cam geometry. They also do nice animations.
Reciprocating Roller Cam (clockwise)
Reciprocating Flat Face Follower Cam
Reciprocating Flat Face Follower Cam (clockwise)
Oscillating Flat Face Cam (clockwise)
Oscillating Roller Cam (clockwise)