A framework for defining trajectories as generators.