Foundations of Impact Machines