code: def _forceInt(x,y,z,dens,b2,c2,i,glx=None,glw=None):
      
      def integrand(s):
          t= 1/s**2.-1.
          return dens(numpy.sqrt(x**2./(1.+t)+y**2./(b2+t)+z**2./(c2+t)))\
              *(x/(1.+t)*(i==0)+y/(b2+t)*(i==1)+z/(c2+t)*(i==2))\
              /numpy.sqrt((1.+(b2-1.)*s**2.)*(1.+(c2-1.)*s**2.))
      if glx is None:
          return integrate.quad(integrand,0.,1.)[0]                              
      else:
          return numpy.sum(glw*integrand(glx))
docs: Integral that gives the force in x,y,z