Bouncing a ball bounded by a circle
http://www.flickr.com/photos/60395315@N00/3621325296/
I am working on figuring the math for this, wondering if I am on the right path
Lets say the ball is starting from (a,b) inside the circle (see figure) hitting any point (c,d) on the circle. The next point the program calculates based on the acceleration /velocity is outside the circle (m,n).
Now when we check the bounds, the ball should have bounced from the point (c,d).
The line (a,b) & (m,n) intersects the circle at (c,d)
The tangent of the line is x.c + y.d = r*r (x,y are points on the line)
The distance of m,n from the tangent is equal to the point p1, p2 where the bounces to at this point I reverse the velocity & reduce it to .75 percent of its original(approximation).
Am I on the right path here. How do I find point (p1,p2), where I am going to draw the ball?