function [xx,A] = circ(N,R) % % function xx = circ(N,R) % % This function computes a uniform boundary element dicretisation of a % circle of radius R, centred on the origin. % % On entry: % % N is the number of boundary elements into which the circle is to be % divided % R is the radius of the circle % % On exit: % % xx is an N x 2 matrix, the jth row of xx containing the position % vector of the centre of the jth element on the circle % A is the arc-length of each element % dtheta = 2*pi/N; A = R*dtheta; theta = (1:N)'*dtheta; xx = R*[cos(theta), sin(theta)];