title: How to calculate the two tangent points to a circle with radius R from two lines given by three points
body: <p>This is related to the arc drawn by HTML5 canvas "arcTo" function. I need to calculate the two tangent points of a circle with the radius R and two lines given by three points Q(x0,y0), P(x1,y1) and R(x2,y2).</p>
  
  <p>The sketch explains the problem more. I need to find the tangent points A(xa,ya) and B(xb,yb). Note that the center of the circle is not given. Please help.</p>
  
  <p><img src="https://i.stack.imgur.com/8nx1I.png" alt="enter image description here"></p>