adjust photon beams to stay within canvas bounds