How do collision algorithms work (like Angry birds)?

AI Thread Summary
Collision algorithms, such as those used in games like Angry Birds, often rely on the principles of physics, including concepts like ballistic motion and energy. The Chipmunk physics engine utilizes a "contact persistence algorithm," which helps manage collisions between multiple objects. Basic collision detection can involve checking when objects occupy the same space, using their previous velocities and positions to determine the collision response. However, this approach can become complex when multiple objects collide simultaneously. Overall, while simple physics can form the foundation of a collision algorithm, achieving realism requires more advanced techniques to account for factors like air resistance.
xael821
Messages
1
Reaction score
0
Hi,
Does anyone know how to write an algorithm for collisions between many objects? An example like this would be the game Angry Birds which uses the Chipmunk physics engine? Chipmunk is based of "contact persistence algorithm" but I can't find out really what that is... any ideas on how to program it?
 
Physics news on Phys.org
Well, I can't say too much about it, but I can give some ideas. It probably involves the laws of physics and the equations that result from them. Things like ballistic projectiles typically covered in a high school physics class and work/energy. You could probably make a very basic physics engine based only on physics learned in high school, but it would not be optimal and particularly realistic, being based on assumptions that there is no air resistance, averages, and other reasonable assumptions that work in theory but produce small errors in real life.
 
I've seen several approaches for collision detection. The simplest ones seem to wait until portions of two (or more) objects occupy the same space. Then the previous velocities and positions of the objects (each integration step saves one set of values for this purpose), are used to calculate the reaction to the collision. This can get complicated if more than two objects can collide at the same time.
 
Hi there, im studying nanoscience at the university in Basel. Today I looked at the topic of intertial and non-inertial reference frames and the existence of fictitious forces. I understand that you call forces real in physics if they appear in interplay. Meaning that a force is real when there is the "actio" partner to the "reactio" partner. If this condition is not satisfied the force is not real. I also understand that if you specifically look at non-inertial reference frames you can...
I have recently been really interested in the derivation of Hamiltons Principle. On my research I found that with the term ##m \cdot \frac{d}{dt} (\frac{dr}{dt} \cdot \delta r) = 0## (1) one may derivate ##\delta \int (T - V) dt = 0## (2). The derivation itself I understood quiet good, but what I don't understand is where the equation (1) came from, because in my research it was just given and not derived from anywhere. Does anybody know where (1) comes from or why from it the...
Back
Top