2-dimensional ray working