The Brylinski beta function of a surface