En el 2007 había posteado sobre
Crayones y Física
donde mostraba un video de un software que simulaba interactivamente un ambiente con física (gravedad, cuerpos, inercia). Ahora me entero de este excelente trabajo:
Phun - 2d physics sandbox
It may look like a toy, but Phun is based on highly competitive technologies for interactive multiphysics simulation, ranging from novel physical models and variational integrators to high performance numerical methods. Phun is off-spring from research at Umeå university, and a MSc project of Emil Ernerfeldt, now further developed at Algoryx Simulation. Algoryx also develops a professional 3D multiphysics engine called AgX.
Pueden ejecutarlo (y jugarlo) en Windows, MacOS y Linux.
De nuevo, excelente implementación de la idea, muy bueno el trabajo de Emil Ernerfeldt:
Emil Ernerfeldt is a 23 year old Swedish programmer for Algoryx. Emil lives in Umeå, which is also where Algoryx is located. He made the '2D Physics Sandbox' Phun for his master thesis in about 6 months. Later on, Phun increased in popularity, and was transferred to Algoryx, a company founded by Emil's MSc supervisor Kenneth Bodin, and his colleagues from Umeå University
Es decisión del autor, pero no hay descarga de fuentes.
Encontraran información sobre los algoritmos de implementación en:
Where can I get hold of the details of how Phun works?
In Emil's thesis, when he has finished writing it! Phun is based on a 2D physics engine that solves for constraint forces. A constraint is a physical/mathematical condition that makes sure that a hinge holds together or that two contacting bodies do not penetrate. The solver in Phun solves a large linearized system of equations using an iterative method, computes the required constraint forces and updates the velocities with these forces, and finally also computes new positions and orientations. The method for computing the constraint forces is based on SPOOK, from the work of Claude Lacoursière in his PhD thesis, Ghosts and machines: regularized variational methods for interactive simulations of multibodies with dry frictional contacts, Dept. of Computing Science, Umeå university, 2007. The resulting time stepper is closely related to the Leapfrog integration scheme. The fluid simulations in Phun are based on a method called Smoothed Particle Hydrodynamics (SPH). SPH is a particle based method where the forces between the particles are designed so that the resulting dynamics approximates the Navier Stoke's equations for a fluid.
Angel "Java" Lopez