4. Trajectory Generation