Tuesday, 12 July 2011

Ripping it to Shreds

As can probably be gauged, I'm very bad with estimating how longs things take. The weekend plan went to hell when unexpected circumstances left me without a laptop/computer (and there's only so much you can write on paper before thinking "can I even do that?").

I have been dropped to ripping my work to shreds to find this cause, and low and behold, I have a very good idea what's causing it. The problem lies in the repulsive force calculations, it seems as though the algorithm is taking nodes of a tree which would otherwise be null, or taking its own branch, and adding the additional force.

As my coding forbid this, it's my theory that I have hacked something up elsewhere, which caused the siblings of a child to be included in the force calculation, even if they're empty quadrants of the quad tree. My code-cleaning made this a little easier to read as the hacked code is hidden from plain sight.

Whether or not this is the issue is subject to some testing (once I finish re-engineering the code), but one thing is now for sure, the problems are with the forces, specifically repulsive force (thanks to some digging, ripping and shredding). 

I will update again soon, in the mean time, enjoy the wonderful cloud cover outside.

No comments:

Post a Comment