reciprocating rotary gear

I went to the Boston Museum of Science today, and outside of the bathroom on the lower level there is this cool gear:

animation of a reciprocating rotary gear. The gear assembly consists of two pieces, an inner gear and an outer rectangular housing. The inner gear is smooth, with 4 teeth on just one quarter of the gear; the inner gear rotates in place. The rectangular housing that 4 teeth recessed in the top and bottom inside edges and the inside ends are smooth and round to accommodate the inner gear. As the inner gear turns, its teeth catch the teeth in the housing and move it from side to side.

(a poorly coordinated reciprocating rotary gear, but it illustrates the point. indulge me here, it is a pretty sweet animation and I made it.)

see also: CAD model of the same gear