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.
 
Hello everyone, Consider the problem in which a car is told to travel at 30 km/h for L kilometers and then at 60 km/h for another L kilometers. Next, you are asked to determine the average speed. My question is: although we know that the average speed in this case is the harmonic mean of the two speeds, is it also possible to state that the average speed over this 2L-kilometer stretch can be obtained as a weighted average of the two speeds? Best regards, DaTario
The rope is tied into the person (the load of 200 pounds) and the rope goes up from the person to a fixed pulley and back down to his hands. He hauls the rope to suspend himself in the air. What is the mechanical advantage of the system? The person will indeed only have to lift half of his body weight (roughly 100 pounds) because he now lessened the load by that same amount. This APPEARS to be a 2:1 because he can hold himself with half the force, but my question is: is that mechanical...
Thread 'Beam on an inclined plane'
Hello! I have a question regarding a beam on an inclined plane. I was considering a beam resting on two supports attached to an inclined plane. I was almost sure that the lower support must be more loaded. My imagination about this problem is shown in the picture below. Here is how I wrote the condition of equilibrium forces: $$ \begin{cases} F_{g\parallel}=F_{t1}+F_{t2}, \\ F_{g\perp}=F_{r1}+F_{r2} \end{cases}. $$ On the other hand...
Back
Top