this project has made me very unhappy but it's done now; credit to @tsf70 and @KryptoScratcher for the triangle filler This is n-gonal 3D BSP, of course, but it also includes greedy pivot selection (which in structured maps will drastically increase performance due the the much lower polygon count) and the ability to store and render multiple trees at once, hence the 3 different sectors in the demo that all sort properly within themselves but overlap one another. Basically, it's my previous BSP project but better in every way, especially since my sorting, splitting, and recursion are much more efficient (in fact possibly faster than without GPS, ironically), as well as my traversal no longer using "item # of () in list" which are rather slow. I will probably not be making any more BSP projects, unless I find an actual practical application for leafy BSP (I'm unsure if it's actually been made on scratch anyways, so yk) If you seek to use this, recall that it only works with CONVEX, PLANAR polygons - that is, no interior angles greater than 180 degrees, and all points must lie on the same plane. If anything breaks, then you can DM me on a funny website name starting with disc) with much simpler communication than scratch's, my username is elsie178 :D I'm going to use this for a game sometime.