Barrel Cam Mechanism

Linear reciprocating motion is converted into continuous rotation. Key factor is the inconstant depth of the slots.