I've made simple 2D games in the past using mostly just squares. If an object collided with another object (all squares/rectangles) it would just change the slope to the opposite based on what side it hit.
If the object was moving at a slope of
1/1 and it hit the right wall, it would just change the slope to
1/-1. A similar example is demonstrated in this image:
Problem is, now I want to work with circles:
Specifically, I want circles bouncing off of circles. I can determine collisions between the two easily. Problem is, a circle theoretically has an infinite number of sides. Knowing only the slope of the object colliding (assume the second circle is static and wont react to the collision), how can I figure out the new slope of the circle?