Homework 10
Homework 9 implemented a KD Tree to make a boid simulator - simulating birds flocking.
The birds flock so that they don't crowd each other, they steer torwards a common point of heading, and they steer torwards an average center. I made mine so that all these factors are weighted into the angle of their heading, and then their position is updated.
I couldn't get the triangles representing the birds to face the direction they move though. I'm very new to open gl I haven't gotten the hang of it yet.
The KD Tree representing the flock is built in a balanced way. This was useful to create an algorithm for finding nearby birds because I could search less of the tree by knowing if a given subtree is covered by the area being searched; if it isn't crossing the plane that subtree is dividing, search the oppropriate child subtree, recursively.
This was really a more complex biTree which was very difficult because the biTree was already overloading me on complexity.
The only thing I didn't get done was finding how to re-balance the tree while the birds move, and this website doesn't allow jar encoding...
There were no performance issues.
I made my root bird blue so it can be tracked.