I'm working in PHP with some filled arcs and I'm having trouble finding a way of calculating the coordinates for the end point of an arc. I know the centre point coordinates, the radius (the width and height are the same), the start angle, and the end angle (as is required by the php imagefileldarc() function). From this, how can I calculate the end point coordinates for the arc?
I've tried the following formula to no avail:
$end['x'] = cos($Angle) * $Radius + $CenterX;
$end['y'] = sin($Angle) * $Radius + $CenterY;
Many thanks
deg2rad()
and it seems to be working now. Many thanks. – Dan Murfitt