integrate( integrate ( delta(cos(theta)-A)*delta(phi-B)*cos(theta)*sin(theta) dtheta ) from 0 to Pi/2 ) dphi from 0 to 2*Pi