2D optics simulator