Added discretizeBeams