# Calculate reflection vector if two circles intersect

This topic is 605 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi,

i would like to calculate the reflection vector if two circles intersect each other. A circle is an object with radius, [x,y] and velocity vector [x_v,y_v]. How could i do that? In this case I don't have a normal vector like in the case of a line / circle intersection, have I?

Edited by IsItSharp

##### Share on other sites

What do you mean by reflection vector in this case? Can you show a rough picture of what you're trying to achieve?

##### Share on other sites

Each circle changes its velocity vector so that they don't intersect each other anymore.

##### Share on other sites
The reflection normal is the difference between the centers at the point of contact.

##### Share on other sites

var normal = circ.pos.sub(cir.pos).normalize();

Where circ and cir are two circles which intersect each other.

1. 1
2. 2
3. 3
4. 4
Rutin
15
5. 5

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633722
• Total Posts
3013550
×