Answer the question
In order to leave comments, you need to log in
Where can I find a clear example of a binary space partitioning tree (bspt)?
I really want to find a clear example (or even better, an article on practical implementation) bspt. The implementation language is not critical - I'm a polyglot in this sense. In any case, the code is capable of reading and understanding.
The very essence of the algorithm is clear and understandable to me. But what is not at all clear is the choice of a plane for the section of space. In all the materials that I managed to find, the principle of choosing a plane is omitted, as if it were something obvious or not very important. At the same time, for me personally, the choice of the optimal plane for cutting space was a "dead end".
All implementations that I have been able to find work with an already selected plane/planes. Help, gentlemen experts. And thanks in advance.
Answer the question
In order to leave comments, you need to log in
> like it's something obvious
0.5 width, then 0.5 height, then 0.5 depth. And so for each partition. For example.
The split points depend on what you are splitting. It can be exactly in the middle of the partition, it can be attached to some geometry features, for example, to doorways... At least you can split it in any way.
If you want a live example, download the engine of some first quake, bsp trees are used there, but it will be very incomprehensible.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question