Did you check the extension that Davy suggested? I know nothing about it.
I remember a formula for a quadratic curve but not in this context. It was for putting an object on a quadratic curve.
The formula in this project might help. The preview is gone but the project is on github.