I have a polygonal triangle soup for which I would like to build a BSP tree. My current program simply creates a BSP tree, inserting a random triangle from the model one at a time, until all the triangles are consumed, and then checks the depth and width of the tree and remembers the best result it achieved (lowest depth, lowest width).
By definition, the best depth will be log2 (n) (or less if the grouped triangles are grouped?), Where n is the number of triangles in my model, and the best width will be n (this means that no splitting has occurred). But there are certain configurations of triangles for which this peak will never be reached.
Is there an effective test to check the quality of my BSP tree? In particular, I am trying to find a way for my program to know that this should stop looking for a more optimal design.
source
share