HTML5 get the coordinates of the end of the arc

If we draw an arc, how can we get the coordinates of the end of the arc (the last point) relative to the center.

+4
source share
1 answer

See http://jsfiddle.net/5DdQt/

Using

function getPoint(c1,c2,radius,angle){ return [c1+Math.cos(angle)*radius,c2+Math.sin(angle)*radius]; } 
  • c1 and c2 - coordinates of the center of the arc
  • radius - arc radius
  • angle is the last point angle
+9
source

Source: https://habr.com/ru/post/1433249/


All Articles