An algorithm for random trajectory generation between two endpoints, honoring time and speed constraints