A Generalization of the Euler-Savary Equation