Bond module was done; physics module almost done. Only a small handful of roadblocks need a solution before I will be completely done with the modules. The two major ones of these being how to determine whether the physics part is done (in other words when the collision ends) as well as how to put humpty together again in the cleanup module. The solution I am working on for the first problem is also applicable to the second: using the velocity, position, and possibly bonds of the nodes, I will attempt to catagorize them into chunks. These chunks will have relatively the same velocities (+ or - 1% of initial velocity difference of the 2 objects),
be geographically similar (by using node density in expanding radii I think I can work out a way to determine roughly where one object ends and where another begins) and use bonds to determine where one ends and one begins. [note: sorting by position turned out to be a pain to implement, and would likely result in all sorts of problems; I ended up using bonds instead: this means there will be more and smaller chunks, but also that it should be relatively exception-free. It also involved less math, which is always good when trying to avoid bugs.]
This allows for trajectory calculations of each chunk, giving a decent picture of whether a collision is still in progress by finding whether they are set to collide.
This will help in the cleanup module since it too will divide objects into chunks. These will then be further analyzed to determine various properties (chunks consisting of 1 or 2 nodes may be culled to save processing, medium sized may be sent to a low drain system to turn back into objects, large to more a draining system which optimizes them for rendering better and culls interior nodes).
Another thing which has come to my attention is that I will probably need two different sub-modules in the cleanup module. One will be what I call a "hard cleanup" which will be more intensive and serves to prepare an object for normal, non-collision rendering.
The other is the "soft cleanup" which will just have to make the object renderable. The soft cleanup will be used during the physics collision to avoid the appearance of the program freezing when the collision takes place (due to not rendering for what could potentially be more than a few seconds, although I won't know until I test it). This will allow me to render about every x period of time while the main physics loop is being done.
All in all, what I am doing now is the most critical part of the program. The difference between something which looks like crap and looks amazing is really held in the cleanup module alone. Here's hoping I don't screw it up too badly.