function value = circle_sector_area_2d ( r, center, theta1, theta2 ) %% CIRCLE_SECTOR_AREA_2D returns the area of a circular sector in 2D. % % Discussion: % % A sector is contained within a circular arc and the lines joining each % endpoint of the arc to the center of the circle. % % Modified: % % 05 May 2005 % % Author: % % John Burkardt % % Parameters: % % Input, double precision R, the radius of the circle. % % Input, double precision CENTER(2), the center of the circle. % % Input, double precision THETA1, THETA2, the angles of the rays % that delimit the sector. % % Output, double precision CIRCLE_SECTOR_AREA_2D, the area of the sector. % value = 0.5 * r * r * ( theta2 - theta1 );