Trajectory generation for given hkl positions