title: Reflecting a circle off another circle
body: <p>Working with iPhone and Objective C.</p>
  
  <p>I am working on a game and I need to correctly reflect a ball off a circle object. I am trying to do it as a line and circle intersection. I have my ball position outside the circle and I have the new ball position that would be inside the circle at the next draw update. I know the intersect point of the line (ball path) and the circle. Now I want to rotate the ending point of the ball path about the intersection point to get the correct angle of reflection off the tangent.  </p>
  
  <p>The following are known:  </p>
  
  <ul>
  <li>ball current x,y  </li>
  <li>ball end x,y  </li>
  <li>ball radius </li>
  <li>circle center x,y  </li>
  <li>circle radius</li>
  <li>intersection point of ball path and circle x and y</li>
  </ul>
  
  <p>I know I need to find the angle of incidence between the tangent line and the incoming ball path which will also equal my angle of reflection. I think once I know those two angles I can subtract them from 180 to get my rotation angle then rotate my end point about the angle of intersection by that amount. I just don't know how.</p>