how does a rack and pinion gear do the job?

A rack and pinion gear method is a form of mechanical machine applied to transform rotational motion into linear motion. It is composed of a straight toothed rack (a flat bar with enamel alongside its length) and a pinion equipment (a little gear with tooth). This is...