Mechanistic derivation of functional responses in predator-prey models