matrix and ray, printing coordinates to logs