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 two revolutions around rotary axis of the pink gear and changes its direction twice.
Green arms that always turn clockwise due to springs (not shown) in coordination with the front pin of the blue gear allow the front pin follow the straight grooves and direct the rear pin follow the circular groove.