Figure 5: Section of terrain mesh triangulated with the RQT algorithm
The RQT algorithm, as published, is really intended for "flat" Earth terrain where the sea level elevation reference is assumed to be an infinite plane. Since Flight Simulator models the Earth's curvature, we had to modify the algorithm a bit. The main problem is that the unmodified RQT tends to eliminate nearly all the mesh vertices over large open expanses of ocean which it interprets as being completely flat. The solution is to increase the error metric for each point in the mesh by the height of the Earth's curvature above the line connecting the point's opposite neighbors. The result is an increase in the error metric roughly proportional to the distance to its neighbors. The larger the error metric, the less likely a point will be eliminated from the triangulation. This helps preserve the Earth's curvature in large areas with the same elevation.