THOUGHTS FROM DEVELOPERS AND DESIGNERS.
We are the team working at Algoryx Simulation AB. This blog is a place for
us to share our inspirations in work, cool video clips and other interesting stuff.
We also hope this site can be a place for discussions about software development, graphic design and education.
We’ve so far been quite silent about the coming version of Algodoo – but rest assured, a beta is just around the corner!
One of the major new features will be the completely reworked chains and ropes. In previous version of Algodoo, chains would often be jittery and unstable. This was (mainly) due to the iterative solver used by Algodoo.
An iterative solver works by going through the list of constraints (contacts and hinges) one at the time make sure that the constraint bodies (e.g. two balls in a chain) will move in a way as to keep the constraint satisfied (contacts separated and hinges un-stretched) in the next time step. In Algodoo the whole list of constraints is gone through 30 times each time step to make sure that forces propagate properly. In most cases this will make sure all constraints are satisfied. For some systems, in particularly systems with large mass ratios (such as a heavy weight on a light rope) 30 iterations is not good enough. In fact, a thousand iterations may not be good enough! So what is the alternative?
The alternative is a direct solver. A direct solver takes the whole system of constraints and solves it in one go. The downside is that it can be very slow for when there are many constraints, like in a large pile of objects. For other things however – like chains – it can actually be faster than an iterative solver!
Another downside with direct solvers it is very hard to create one that is both fast, accurate and stable. Thankfully I didn’t have to code one from scratch. Over the past years, my colleges have developed an extraordinary sparse linear solver called “Sabre”. Sabre is already used in Algoryx’s professional 3D simulator AgX, and now it will also be part of Algodoo!
In the coming version of Algodoo, Sabre will be used to enable perfectly stiff chains and ropes in real-time. No more stretching and twitching! For performance reasons the iterative solver will still be used for water and contacts (except for rope contacts), but Sabre will be used for all hinges.
Sabre will also be used for springs, which will for the first time enable arbitrarily stiff springs in Algodoo (as long as they are super-critically damped, e.g. a damping of 2).
Another nice feature of the new solver is a much improved drag tool that will no longer stretch a hinge.
Anyway – look forward to a beta in May! I won’t be here for its release though, since I will spend the next two months travelling in Central America – yippee!