Involute gears, developed by Euler, have the nice property of being able to mesh with any gear with the same tooth parameters, including racks (linear gears).
This nice animation shows this by using racks at several directions to simulate the turning profile of the other gear.