Videos of Trajectory Design Based on Motion Primitives: Direct Design and Learning