This project is a try at binary space partitioning with dynamic insertions. Please use turbowarp for better performance: https://turbowarp.org/1034526736 w,a,s,d and arrows to move about, r and f to move up and down ----------------------Why? just why?---------------------------- so for over a year I have been trying to make binary space partitioning. I decided to leave scratch a few months ago and hadn't worked on it since. Last week I just randomly happened to find the solution to my problem while being lazy and voila...I decided to complete it as a farewell. -------------------------what?------------------------------------- this is binary space partitioning which is a process of recursively dividing space to achieve a tree data structure for the tris. This tree can be used to accurately perform intersections and sort 3d polygons. you may notice the speed varies based on the amount of intersections (yeah sorry about that, I forgot to check for the plane with the least splits). --------------things to add------------------------------------- lighting actual z clipping (I sorta botched the z clipping) backface culling (didn't want to do that right now just because I want all the tris to be rendered)
only part of the transformations and alot of the rendering is by @mathmathmath The tri fill is by @-Rex- (I think) EVERYTHING ELSE IS BY ME! Idea behind dynamic reinsertion is in this project: https://scratch.mit.edu/projects/951712989/ I ended up only using the bottom right diagram, I couldn't decipher the rest. But basically I add all the static nodes and wipe all their data, then I only add the dynamic tris to the bsp tri, this also means I dont have to rebuild the whole tree or perform intersections for the static nodes as I did that initially. I want to thank everyone who has helped on my 3d journey :) ----------------------tags-------------------------------------- # triangle # lastproject !