Page 1 of 1
Algodoo Physics Educational Software by Algoryx Simulation
Posted: Sat Jan 17, 2009 3:59 pm
by KenB
Yo folks!
Some of you might know about the Phun 2D Physics Sandbox. We have developed a branch called Algodoo, specialized for Physics education and optimized it for the Intel-powered classmate PC. The combination of the touch screen with pen input and the accelerometer is totally awesome. We feared that things would be slow on this little notebook, but the Atom processor is actually doing a fantastic job in the number crunching. All of our employees now ask to get one of these little computers. Hmm....
Find out more here:
http://www.algoryx.se/algodoo.html and in the YouTube video:
http://se.youtube.com/watch?v=qa9xn-xYQQk.
The video was made in a hurry for the BETT Show in London this week, where we displayed Algodoo in the Intel booth. We will put together something better soon and add some music to it too.
Re: Algodoo Physics Educational Software by Algoryx Simulation
Posted: Thu Mar 26, 2009 6:44 pm
by KenB
A new version is out under the name "Algodoo - Phun Edition". It is free for
personal and non-commercial use.
See
http://www.phunland.com/
The full product will be released in April. It contains some very nifty features including a really cool fluid simulation method.
Re: Algodoo Physics Educational Software by Algoryx Simulation
Posted: Sun Mar 29, 2009 1:39 am
by raigan2
Is there any chance of a simple explanation of "variational methods"? So far I've read the thesis twice and have yet to understand it well enough to implement..
Re: Algodoo Physics Educational Software by Algoryx Simulation
Posted: Mon Aug 31, 2009 11:39 pm
by KenB
raigan2 wrote:Is there any chance of a simple explanation of "variational methods"? So far I've read the thesis twice and have yet to understand it well enough to implement..
What it means is that you start from a Lagrangian formulation and you discretize this Lagrangian and then apply a discrete variational (least action) principle. For simple unconstrained systems you can for example derive leapfrog/verlet integration methods this way, but funny enough it is impossible to derive explicit Euler this way, which yet again proves how broken it is.
You can also add constraints to this framework, and then apply various methods to stabilize these constraints. The variational framework ensures that the constraint stabilization is efficient and respects the (discrete) conservation laws. The SPOOK method ensures that constraints are fulfilled "on the average", i.e. rather than enforcing strict constraint stabilization, the constraints are allowed to fluctuate somewhat near the constraint surface. A combination of stabilization and damping gives a very efficient method also for large timesteps.
The advantage of all this is that you don't have to first go to a differential equation and then apply all kinds of ad hoc discretization and stabilization principles. Instead you derive a stepping equation directly from the discrete variational principle. It can be shown that this is indeed a irreversible principle, that is, it is possible to to do the continuum limit and reproduce differential equations, but there's no obvious way to discretize the differential equations resulting in the variational stepping equations.
The method also allows for dissipation to be modeled using Rayleigh dissipation functions. This gives a powerful and systematic framework for modeling friction.
One result of this approach is a Schur complement equation that is very similar to the system of equations in e.g. Bullet and Box2D, but with some subtle but very important differences i signs and parameters, and also with a systematic way of dealing with physical regularization, which in turn can be used for modeling (constraint relaxation) and also makes the equations much easier to solve since the conditions numbers are improved dramatically.
Hmm, not sure this was a simple explanation, but I did my best

Re: Algodoo Physics Educational Software by Algoryx Simulation
Posted: Mon Aug 31, 2009 11:40 pm
by KenB
Speaking of Algodoo, we have actually released it now!
Check it out at:
http://www.algodoo.com/
We think it is totally cool

Re: Algodoo Physics Educational Software by Algoryx Simulation
Posted: Tue Sep 01, 2009 7:05 pm
by raigan2
KenB wrote:Hmm, not sure this was a simple explanation, but I did my best

Thanks for trying!
Part of my problem is that I have no training in dynamics, so that when considering simulations I have to resort to simpler geometric interpretations -- i.e the state of the system is a point in a high-dimensional space, and the constraint manifold describing all possible valid states (where all constraints are satisfied) is a surface embedded in this space. To solve constraints, we iteratively move the system state towards the surface.
Do you know of any introductory/undergrad materials which might help me develop a foundation? Currently the math is really over my head

Re: Algodoo Physics Educational Software by Algoryx Simulation
Posted: Thu Sep 03, 2009 12:42 pm
by Dirk Gregorius
Hi Kenneth,
thanks for trying to explain the approach. Maybe you can give a simple example like maybe a pendulum. I would also be interested in what you found out about constraint stabilization and regularization (aka ERP and CFM in the ODE).
Erin basically solves the following equation using SI:
J*M^-1*JT * lambda = -0.1 * C / dt - J * ( v + M^-1 * f_ext )
How does you equation varies from this? Also I am quite surprised about you sign statement. I doubt that in your system the constraint force of e.g. a pendulum will point outwards. For my understanding the Jacobian defines the sign of the constraint force and you compute the appropriate Lagrange multiplier
Cheers,
-Dirk
Re: Algodoo Physics Educational Software by Algoryx Simulation
Posted: Thu Oct 01, 2009 11:24 pm
by zzzzrrr
Dirk Gregorius wrote:
Erin basically solves the following equation using SI:
J*M^-1*JT * lambda = -0.1 * C / dt - J * ( v + M^-1 * f_ext )
How does you equation varies from this?
Take a look at equation (8):
http://www.cs.umu.se/kurser/5DV058/VT09 ... knotes.pdf
Re: Algodoo Physics Educational Software by Algoryx Simulation
Posted: Fri Oct 02, 2009 3:04 pm
by Dirk Gregorius
Thanks! Very interesting.
In equation (8) the position is pre-multiplied by the Jacobian. Is this a typo or correct? Usually you use the position constraint g(q) to feed it back into the solver. This method suggest to project the current position (generalized coordinates q) onto the Jacobian. Is this superior to Baumgarte?
KenB maybe on this?
Cheersm
-Dirk
Re: Algodoo Physics Educational Software by Algoryx Simulation
Posted: Sat Oct 17, 2009 4:09 pm
by KenB
I rarely login here, so sorry for not responding quickly.
The Jacobian projects the generalized coordinate, so Gq is simply the constraint error. This is valid only for linear homogeneous constraints. For the general form, for other types of constraints, refer to Claude's thesis. Baumgarte comes from an acceleration formulation of constraints and it completely broken in its original form. Sometimes (always?) in physics engines, it is linearized to the form Erin is using. Note however that this formulation comes from a previous paper of Claude LacoursiƩre that Erin used to cite on his web page (not anymore??).
However, notice the difference in how the stabilzation parameter is used (the "0.1" in the equation you cited). In SPOOK it gives a much better balance since it gives correct weight to the constraint error, constraint force and constraint velocity, respectively. This is dead easy to improve in most physics engines...
To get things right with velocity constraints and motors, you need to take one step back and use the saddle point matrix formulation instead of the Schur complement form. This is also the formulation to use when introducing dry friction.
By the way. We have released a new video! Enjoy! (someone should implement an inline youtube tag in this forum - there's a simple fix for phpBB3 that gives this):
http://www.youtube.com/watch?v=GMrkF47eBlg