function F = flux(nth,nphi) % Flux from a limb darkened spherical star. % % D. Holmgren holmgren@phobos.astro.uwo.ca theta = linspace(0,pi,nth)'; phi = linspace(-pi/2,pi/2,nphi)'; dth = theta(2)-theta(1); dphi = phi(2)-phi(1); sum = 0.; u = 0.6; for k = 1:nth for l = 1:nphi sum = sum + (1 - u + u*cos(theta(k)))*cos(theta(k))*sin(theta(k)); end end F = sum*dth*dphi