Conditions on the grazing function g for efficient collimation