title: How to find end point of arc with start point and center of arc in java?
body: <p>I want to find end point of a arc using start point and center point. then i want to draw a new arc using the end point (as center of new arc). but i don't know how i find end point.</p>
  
  <p>p2 is center of old arc.</p>
  
  <p>thanks.</p>
  
  <pre><code>int x = p2.x-radius;
  int y = p2.y-radius;
  int width = 2*radius;
  int height = 2*radius;
  int startAngle=(int)Math.toDegrees(Math.atan2(p1.y-p2.y, p1.x-p2.x));
  startAngle=(startAngle&gt;0)?(360-startAngle):(startAngle*(-1));
  
  int endAngle=(int)Math.toDegrees(Math.atan2(p3.y-p2.y, p3.x-p2.x));
  endAngle=endAngle&gt;0?360-endAngle:endAngle*(-1);
  int sweepAngle=Math.abs(startAngle-endAngle);
  g.drawArc(x, y, width, height,startAngle,sweepAngle);
  </code></pre>
  
  <p>so, How do i draw new arc?</p>