Theory of "frozen waves": modeling the shape of stationary wave fields