If we draw an arc, how can we get coordinates of arc's end (last point) with respect to the center.
See http://jsfiddle.net/5DdQt/
Use
function getPoint(c1,c2,radius,angle){
return [c1+Math.cos(angle)*radius,c2+Math.sin(angle)*radius];
}
c1
and c2
are the coordinates of the center of the arcradius
is the arc's radiusangle
is the last point's angle in radians.Radians = (degrees * Math.PI) / 180
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With