Rigid body dynamics: Resting contact

In summary, the conversation discusses the challenges of implementing realistic gravity and resting contact forces in a 2D rigid body dynamics engine. The speaker mentions difficulties with the simulation and interpenetration of objects, and seeks advice on how to improve these issues. They also suggest looking into existing technical papers and considering non-rigid bodies or non-iterative solutions as potential solutions.
  • #1
epaik91
3
0
I'm currently programming a 2D rigid body dynamics engine.

While I have realistic collision detection and response between polygons, I have trouble in the simulation once I implement gravity.

When these rigid bodies are influenced by gravity, they never fall to complete rest (e.g. they always retain some kinetic energy and keep bouncing around). Additionally, when several bodies are on top of each other, my separating algorithm fails and the bodies interpenetrate a little.

I need to figure out a way to implement resting contact forces. Any advice would be appreciated.
 
Physics news on Phys.org
  • #2
That's a common problem, I suggest that you search out some of the existing technical papers on the subject. Let us know how it goes. (If I were fiddling with this again, I'd try either slightly non-rigid bodies or exact non-iterative solutions to the motion).
 
  • #3


It sounds like you are facing some challenges in accurately simulating rigid body dynamics in your 2D engine. First, it's important to understand that the behavior of rigid bodies in a simulation is influenced by various factors such as the accuracy of the simulation, the time step size, and the type of integration method used.

In order to accurately simulate resting contact, you will need to consider both the forces acting on the bodies and the constraints placed on them. For example, when two bodies are in contact, there are normal forces acting between them that keep them from interpenetrating. Additionally, friction forces may come into play depending on the materials and surfaces of the bodies.

To accurately simulate these forces, you may need to consider using more advanced algorithms such as impulse-based collision response or constraint-based methods. These methods take into account the forces and constraints acting on the bodies in order to accurately calculate their motion and behavior.

Another important aspect to consider is the accuracy of your collision detection. If your collision detection is not precise, it can lead to incorrect calculations and unstable behavior in the simulation. Make sure to thoroughly test and refine your collision detection algorithm to ensure accurate results.

In summary, accurately simulating resting contact in rigid body dynamics requires a combination of precise collision detection, advanced algorithms for handling forces and constraints, and careful consideration of factors such as time step size and integration methods. I would suggest researching and implementing these techniques in your engine to improve the accuracy and stability of your simulations.
 

FAQ: Rigid body dynamics: Resting contact

What is rigid body dynamics?

Rigid body dynamics is a branch of classical mechanics that deals with the motion of rigid bodies. It studies the movement of objects that do not deform or change shape, and are able to rotate and translate in space.

What is resting contact in rigid body dynamics?

Resting contact refers to the scenario where two or more rigid bodies are in contact with each other, but are not moving relative to one another. This means that there is no relative motion or sliding between the bodies at the point of contact.

What are the main principles of rigid body dynamics?

The main principles of rigid body dynamics are Newton's laws of motion, which state that an object at rest will remain at rest, and an object in motion will remain in motion at a constant velocity, unless acted upon by an external force.

What are the different types of forces in rigid body dynamics?

There are two main types of forces in rigid body dynamics: external forces and internal forces. External forces act on the body from outside, such as gravity, while internal forces act within the body, such as tension or compression.

What are the applications of rigid body dynamics?

Rigid body dynamics has many applications in various fields, such as engineering, robotics, and biomechanics. It is used to analyze the motion and stability of structures, design and control of robots, and study the movement of human and animal bodies.

Back
Top