Handling Penetration in Physics Demo with Cubes

  • Context: Undergrad 
  • Thread starter Thread starter bkenwright
  • Start date Start date
  • Tags Tags
    Penetration
Click For Summary
SUMMARY

The discussion focuses on handling penetration in a physics simulation involving cubes, specifically when using Euler's integration method. The main challenge is detecting collisions accurately when large time steps cause the cube to penetrate the ground plane. The proposed solution involves backtracking the simulation to find the point of intersection by halving the time step (dt) until the cube is no longer penetrating the surface. However, this method encounters issues when the time step approaches zero, leading to ineffective updates due to the object's proximity to the surface.

PREREQUISITES
  • Understanding of collision detection algorithms
  • Familiarity with Euler's integration method in physics simulations
  • Knowledge of time step (dt) adjustments in numerical simulations
  • Basic principles of physics related to gravity and object motion
NEXT STEPS
  • Research advanced collision detection techniques, such as Continuous Collision Detection (CCD)
  • Explore alternative integration methods, like Verlet integration or Runge-Kutta methods
  • Learn about adaptive time-stepping strategies in physics simulations
  • Investigate the implementation of physics engines like Bullet or Unity's physics system
USEFUL FOR

Game developers, physics simulation engineers, and anyone involved in real-time physics modeling who seeks to improve collision detection and handling in simulations.

bkenwright
Messages
7
Reaction score
0
Hi all,
I'm currently trying to write a simple physics demo with cubes, and am looking for the best way to handle penetration.

One method I was looking at is to back-track the collision detection till we find the point of intersection within some limit.. i.e.

collision at dt, so we step back dt/2 again and again till we have a hit within some limit...the only problem I'm having is...what if you have an object hitting the ground at dt of 0...doen's this mean our time step value is 0?...so the object increment is 0...hmmm.

Any ideas would be great.

Thanx

Ben

=)
 
Physics news on Phys.org
A comprehensible description would be just as nice.

What kind of cubes? Polynomial?

What is penetrating what?

Is dt a differential or measurement?

Etc.

What is the problem as presented by the instructor?
 
Well the case I'm trying to deal with is penetration on a general scale. For example, let's say you have a cube bouncing on a plane, and you have large time steps...and you use eulers integration...and just do each vertex point being below the plane to detect a collision.

Now, because the timesteps are large enough, for each time step when a collision is detected, there will be a small error where the cube penetrates the plane.

To solve this, I could back track the simulation to where the collision detection is just on the surface...ie.

store values
update dt (integrate)
while (penetrating)
{
restore values
dt = dt/2
update dt (use half dt)
}

But using this method, if the object is really close to the surface...then for any timestep greater than 0 its going to penetrate the surface due to gravity...so this will result in the above method reduce dt to almost 0...and hence its updates will fail :-/

Thanx for any help on this.

Ben

:)
 

Similar threads

  • · Replies 35 ·
2
Replies
35
Views
5K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 31 ·
2
Replies
31
Views
4K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 25 ·
Replies
25
Views
3K
  • · Replies 17 ·
Replies
17
Views
2K
  • · Replies 127 ·
5
Replies
127
Views
9K
  • · Replies 7 ·
Replies
7
Views
7K