Pin Rack Drive

The red pinion is input. Its shaft has an end sliding in the running track shape slot of the cyan pin rack. Because of gear forces the cyan pin rack and the yellow slider carrying the red pinion reciprocate.
The rotation from a stationary source is transmitted to the red pinion by suitable mechanisms: double Hook’s joint, Oldham coupling, …