The eccentric does enable a pivoting movement to rotate out of the center and is able to convert it into a reciprocating motion. It is especially known for the rods on wheels of steam locomotives. The treadle of a spinning wheel or sewing machine works the same way.

The camshaft can be seen as a shaft with disks that rotate each above a piston. Replace the disk by an oval: the rotating bulge will do the piston moving back and forth. This movement can be used for cutting, crushing, hammering, of presses, punching, pumping.

krukasThe wrought iron or steel crankshaft (usually) has three (sometimes 2 or 4) rods at an angle of 120° with respect to each other.
Al - Jazari (Mesopotamia, present-day Syria and Iraq) wrote in 1206 his “Book of knowledge of ingenious mechanical devices”. He made ​​the first crankshaft and camshaft that can convert a rotary motion into a back-and -forth, and vice versa!