Cam and Gear Mechanism

Input is the yellow shaft having a gear and a disk. The cyan slider (a cam) reciprocates in a slot on the disk due to the red cam that fixed to the red gear. The red gear receives motion from the yellow gear through the blue and the green gears. The orange slider’s roller can contact with the yellow disk and the cyan slider. Motion of the orange output slider depends on the cam’s shape, its angle position on the red gear and the transmission ratio (= 4 for this case) of the 4-gear drive.