If you've arrived here, you probably want to use
If you're me, you probably want to use
However, if you're in a similar level of nerd-dom as me, you might also be interested in the source code for the roller coaster simulator and the source code for the feedrate calculator.