Transmission of Linear Displacement

Input: pink slider reciprocating. Its yellow pin moves in a groove of blue barrel cam.
Output: green slider. Its violet pin moves in the second groove the blue cam. The second groove shape controls the output motion.
The second groove is deeper and narrower than the first one.
The violet pin is longer and thinner than the pink one.