Terrain following allows an aircraft to maintain a relatively constant height above the ground to prevent enemy radar detection, increasing viability. However, an aircraft could not follow the trajectory due to its acceleration limits in rough terrain. Therefore, we proposed a new trajectory generation algorithm for terrain following. The reference trajectory is generated along the terrain sampled at the same time interval, and the vertical speed is estimated by neighboring terrain elevation. The possibility of flight is determined based on the vertical speed. If the trajectory is not flyable, it would be reshaped smoothly for a suitable flight. The simulation demonstrated the performance in terms of flight trajectories, changes in normal acceleration, and altitude above the terrain.