
Hi,
I'm building a physics simulator for simple models like: drop a ball (free fall), motion with constant speed or constant force, maybe a spring with a mass at one end. It's intended for kids and high school students (not complicated stuff).
I read most of the discussions here and played around with Farsser 3.1 (in WPF).
I saw that this new version works with MKS units, and i used convertion between meters and pixels.
My question is – does the engine do its calculations based on the known physics equations? For example: speed * time = distance (this is a simple example, I'm also asking about equations with forces,
mass etc…). Can I relay on its calculations to be true as if I solved the theoretical equations?
I really like the way Farseer works, and I want to use it in my simulator – so it can handle the physics aspect and I can concentrate on building a simple and intuitive user interface.
Thanks a lot,
Alon


Developer
Dec 29, 2010 at 9:35 AM

Hey,
alonkad wrote:
My question is – does the engine do its calculations based on the known physics equations? For example: speed * time = distance (this is a simple example, I'm also asking about equations with forces,
mass etc…). Can I relay on its calculations to be true as if I solved the theoretical equations?
In general you can of course assume, that Farseer uses "known physics equations". Remember though, that Farseer only simulates rigid bodies and especially things like restitution and friction are just aproximations and not necessarily realistic.
As Farseer is (mainly) a physics engine for games, it is optimized to produce fast results that look and feel somewhat realistic but rarely are ;)
So if you are aiming for physically "correct" solutions for some simple cases it can certainly be done, but you might want to have a look at the internal calculations here and there and carefully tune restitution, friction, linear damping and the
likes.


Coordinator
Dec 29, 2010 at 11:35 AM

What Elsch said is correct. There is also another very important difference between the physics engine and the real world.
Farseer Phsyics Engine is an iterative physics engine, i.e, it does do not calculate the optimal solution on each update; it gets approximated using a fixed number of iterations. The results it calculate might also not converge as good as physics engines
designed especially for science. We focus on fast solvers that approximate a good (and close to optimal) solution in a short amount of time. Science applications that needs a very small margins of error uses other solvers that calculates the optimal solution
(sometimes it takes seconds for an update  most of them are not exactly realtime).
That being said, I would think that Farseer Physics Engine can be used in your application.



Thank you for the quick response.
I saw the iterations counters in the settings class...
Assuming I'm not going to run complex models with many object (i believe no more than 3 moving objects and one static floor) – which iterations counters should I raise in order to get optimal results (accuracy wise)? I can run some tests on my
"most complex" model and see how the accuracy and performance change.
Thanks,
Alon

