Jump to content
  • Advertisement
Sign in to follow this  
bargasteh

Question (Leap Frog Method, implicit Euler's Method, etc)

This topic is 4889 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Guest Anonymous Poster
Quote:
Original post by grhodes_at_work
Yes, but "simple pendulum with friction" != "implicit Euler"! The function solves a very specific problem, and isn't a generic solver as the function name implies. This was my point, :).


I agree. The OP did mention the code came from "Game Physics". The section of the book from which it came is specifically for the simple pendulum with friction.
From what I can tell, that book discusses how to set up the implicit Euler method for general forces.

I am curious how you avoid using Newton's method to solve the implicit equation. Any hints on other alternatives?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Anonymous Poster
Quote:
Original post by grhodes_at_work
Yes, but "simple pendulum with friction" != "implicit Euler"! The function solves a very specific problem, and isn't a generic solver as the function name implies. This was my point, :).


I agree. The OP did mention the code came from "Game Physics". The section of the book from which it came is specifically for the simple pendulum with friction.
From what I can tell, that book discusses how to set up the implicit Euler method for general forces.

I am curious how you avoid using Newton's method to solve the implicit equation. Any hints on other alternatives?


Your general understanding is correct. To solve an implicit system of equations numerically, you do need one or more derivatives, in order to compute the incremental correction that nudges you toward the answer at each iteration. Newton's method is one approach, but there are many variations that use one or multiple derivatives, different weighting and preconditioning strategies to accelerate and improve the chances of reaching convergence. In general the derivatives may have to be themselves approximated numerically, and this can introduce new equations into the system. (For the sample code, the derivative is computed analytically.)

The book does talk about implicit Euler in a more general fashion. It just happens that the example code (the quoted example code) is not a general-purpose implementation of the method. It is a problem-specific example. The sample code from "Game Physics" does solve the pendulum problem using the implicit Euler technique. It does illustrate exactly what the author intended to illustrate in his book, very nicely. To do so, it uses built-in knowledge of the specific geometry of the pendulum problem to produce the input at each step.

From the wording of the original post, I gathered that the OP thought a general force could be simply added in and the code would work fine for a more general problem, e.g., a non-pendulum problem. This isn't the case, of course. The method cannot be used, as-is, for general problems. This is in part because it is built specifically around the geometry of a pendulum, exactly as the author intended. The other reason the method isn't too flexible as is (and this is the reason I didn't immediately see what was going on before the OP mentioned where the code came from and I had a chance to see the context of the code in the book) is because it is written in a way that the entire motion time history is computed in one call, for n time steps. There are no provisions to allow the applied forces to change at each time step, and it isn't really intended to be called in sequence multiple times.

[Edited by - grhodes_at_work on November 25, 2005 11:06:42 PM]

Share this post


Link to post
Share on other sites
Quote:

From the wording of the original post, I gathered that the OP thought a general force could be simply added in and the code would work fine for a more general problem, e.g., a non-pendulum problem. This isn't the case, of course. The method cannot be used, as-is, for general problems. This is in part because it is built specifically around the geometry of a pendulum, exactly as the author intended. The other reason the method isn't too flexible as is (and this is the reason I didn't immediately see what was going on before the OP mentioned where the code came from and I had a chance to see the context of the code in the book) is because it is written in a way that the entire motion time history is computed in one call, for n time steps. There are no provisions to allow the applied forces to change at each time step, and it isn't really intended to be called in sequence multiple times.


Thank you Mod, you are correct I thought I can just apply the force and use the code, but as you said its not possible. Ok does any of you know that how I can implement this (is there any tutorial that show how I can do implicit from scratch)?
I have one more question. As we all know its extremly hard to have a very realistic cloth or deformable object in real time (specially stable cloth with good resolution), how does new PP (physics processors) or I would better say physicX AGEIA approach this problem ? I mean will they have a PPU (Physics processing Unit) that can solve implicit equation really fast ? Does any of you have any idea that how they want to simulate stable cloth ? Is it implicit or explicit ?

Thank you

Share this post


Link to post
Share on other sites
Quote:
Original post by bargasteh

Thank you Mod, you are correct I thought I can just apply the force and use the code, but as you said its not possible. Ok does any of you know that how I can implement this (is there any tutorial that show how I can do implicit from scratch)?
I have one more question. As we all know its extremly hard to have a very realistic cloth or deformable object in real time (specially stable cloth with good resolution), how does new PP (physics processors) or I would better say physicX AGEIA approach this problem ? I mean will they have a PPU (Physics processing Unit) that can solve implicit equation really fast ? Does any of you have any idea that how they want to simulate stable cloth ? Is it implicit or explicit ?

Thank you


I can point you to the following page that has some presentations by David Wu. He has implemented implicit solvers for games, quite successfully. I cannot promise the presentations will be complete or easy to follow. But it is something. I'm not aware of a truly straightfoward introduction of implicit solvers for rigid body dynamics. (Eberly's book might have something, but I haven't read it thoroughly enough to know.)

Pseudo Interactive Past Projects

Look at "The Physics That Brought Cell Damage to Life.." for example.

Now...for cloth simulation, which involves a discrete approximation to an medium that behaves somewhat like a continuum, it would be very straightforward to implement a spatially implicit system. The time implicit stuff is fuzzier, just as it is with rigid bodies.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!