An input pink gear, rotating around fixed axis, engages with blue gear of oval shape. The latter has two pins that slide in grooves of the base. In one cycle of motion the blue gear performs four times of straight motion and four times of rotation alternately.
Green arms that always turn anticlockwise due to springs (not shown) in coordination with the front pin of the blue gear direct the front pin follow the straight grooves and the rear pin follow the circular groove.