If one was to take a circumference of a round gear, unfold it, then lay it flat it would be a rack. A rack and pinion produces a linear movement in any plane. If the rack is fixed and the pinion rotates whatever is attached to the pinion will drive along the rack.