Pencil beam scanning