Simple circle circle collision detection

Click For Summary

Discussion Overview

The discussion revolves around detecting collisions between two moving circles, specifically focusing on determining the extent of overlap and resolving it to prevent penetration during collision reactions. The context includes both mathematical and physics-related aspects of collision detection and response.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant describes a method for detecting collision based on the distance between circles and their radii.
  • Another participant seeks clarification on the specifics of the overlap detection and the nature of the question, questioning whether it is primarily mathematical or physics-related.
  • A participant expresses the need to determine how far the circles overlap and to adjust their positions to avoid penetration, indicating a requirement for collision resolution.
  • There is a suggestion to consider the tangential point between the circles and the impact parameter in the context of scattering problems.
  • A later reply proposes a method involving rotating one circle around the other to simplify calculations, suggesting a one-dimensional approach for clarity.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the specifics of the problem or the best approach to resolve the collision. There are multiple perspectives on how to handle the overlap and the mechanics of collision response.

Contextual Notes

Some participants express uncertainty about the initial conditions and parameters necessary for effective collision detection and resolution. The discussion highlights the complexity of handling fast-moving circles and the potential for missed collisions due to frame skipping.

kfour31
Messages
3
Reaction score
0
hi all,
I am testing the collision detection between two circle using classic the distance < sumRadius.

now i need help to detect the penetration of circles and to resolve the penetration before

collision reaction
 
Physics news on Phys.org
Can you be clearer about what you are asking? Seems that you are trying to detect whether two circles are overlapping and how far they overlap. Do you have a physics-related question? A math question?
 
ya i need to detect
1. how far they are overlapping
2. and need to pull back the circles to the correct position(ie just touching each other, need to avoid overlap)

thanx in advance
 
I'm still unclear as to what you need. (In your first post it sounded like you knew how to determine when two circles overlap.) When you say that you "need to detect" how far they overlap, what are you given? Is this a math question? I don't quite see the physics question yet.
 
Is this a matter of find the point where two circles of different radii (diameters) are tangent? If this is like a scattering problem, then one input would be the impact parameter which is the shortest distance between the parallel lines passing between the centers of the circles. Those lines would also be parallel to the velocity of the circle which is approaching the other.
 
Last edited:
thanks for showing interest,

Let me explain, i am detecting collision between two moving circles, i know their X,Y, and radius.
so in each frame i am checking this condition
distance_between_circles <= sum_of_their_radii then collision occurs,

when the circles are moving really fast enough, it skips frames and the collision is detected after one circles penetrates half the other,

so at the time of collision i don't know which direction the ball came from and collided.

1.i need to move the circles so that they can just touch each other (not penetrated)

thats it
 
I'm no physicist but the problem isn't that hard to figure out. What you want to do is rotate one of the circles around the other circle by the angle between their two center points. Once you do that, they are then lying on the x axis. From there you can perform any calculations you want on them then when you're done, just rotate them back. If your using velocities, you'll have to rotate them too. It's easier to think of this problem in one dimension.

Hope this helps, and hope it's not too late.
 

Similar threads

Replies
1
Views
5K
  • · Replies 0 ·
Replies
0
Views
2K
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
6K
Replies
20
Views
3K