A binary space partitioning (BSP) tree is built from the map, simplifying complexity of searching for a given polygon to O(number of polygons). Each leaf creates some area of 3D space (imagine cutting a pie into arbitrary pieces). The leaves of this binary tree have polygons of the original map associated with them, which are then used for computing each area's visibility. For each area, the VSD algorithm finds the parts of the map for which a line of sight exists. This is called the potentially visible set (PVS).