Hi, Mystery:
My 3-step plan:
1) recenter the model about the average of all point positions (this is the centroid since all point masses are 1.0: happens only once)2) every point gets a lateral accel (my spreading force), as well as gravity: - AccelX = PositionX * 0.1 - AccelY = -10.0 (gravity) - AccelZ = PositionZ * 0.13) do Gauss Seidel iteration(note: in my case Y is up, I had to tweak my data points)
my number of sticks is high because it contains redundant ones. I "generated" (via cut-n-paste in a spreadsheet) my stick list from the vertices of the triangles a-b-c. So each tri gave me 3 sticks, a-b, a-c, b-c. My loader takes care of duplicate sticks.
The Gauss Seidel method is simply a numerical method that solves for only one (or in this case 2) values at a time. But it keeps on looping. So in this case:
for i = 1 to NumSticks with stick (i): find delta vector for each end of this stick move each end of this sticknext i
It is a really easy way of solving multiple equations. It is iterative because since I only look at one equation at a time, I tend to invalidate the other equations by fixing each one. Fortunately it continues to get closer to an actual solution each time, so you repeat this (hence it is an iterative solution method).
This is why JesusDesoles suggested the "conjugate gradient method", a much cleverer solution, but I am too much of a wimp to code one for a simple proof of concept. I do recommend further reading on the "Numerical Recipies" website (www.nr.com).
I believe the "bouncy" part is because the constraints (original stick lengths) are not actually solvable for a flat final configuration. This is why I recommended continuing with springs once you reach a certain point.
I would like your texture file, but I'm moving, so I'm not sure when I'll get a chance to work with it...when is your project due?