1. A computer-implemented method, the method comprising: generating, by a computer, a beam including a group of rays; evaluating, by the computer, the group of rays as a whole against a spatially ordered geometrical database until the beam can no longer be evaluated as a whole against the spatially ordered geometrical database in order to discard a portion of the spatially ordered geometrical database from further evaluating; noting, by the computer, the location in the spatially ordered geometrical database where the group of rays as a whole can no longer be evaluated as a whole; traversing, starting at the noted location in the spatially ordered geometrical database by the computer, the spatially ordered geometrical database for each of the rays in the group of rays in the beam by executing a query against the spatially ordered geometrical database not discarded by the evaluating; and providing an output of the traversing.