Text this: A dynamical formulation of one-dimensional scattering theory and its applications in optics.