In this final phase of our investigation, we assume that the surface is given, not analytically by a formula, but digitally, by a collection of data coordinates. Because we will interpolate the data points to generate a smooth surface, we need to impose some structure on the grid supporting the heights of the surface. The grid does not have to be equispaced in the supporting xyplane, but it has to be regular. By regular, we mean that heights are known at each point , where is a member of an ordered list of xcoordinates in the data set, and is a member of the corresponding list of ycoordinates. In effect, the surface is known at each point of the direct product of the lists of x and ycoordinates.
Thinking of the function used earlier, namely
 (1) 
we write the coordinate lists
and generate a matrix of corresponding function values:
 (2) 
Next, we define , a function that interpolates the given data.
The first argument to ArrayInterpolation is a list of the lists of the independent coordinates. The second argument is the matrix of known heights. The third argument defines the "target," that is, the points at which "new" function values are to be calculated. Ordinarily, this would be an Array with the coordinates of many points. Here, it consists of the coordinates of a single point, . Thus, is the interpolated height at the single point .
The final argument to ArrayInterpolation is the interpolating method. Since this is merely an illustrative example, we've picked "spline" for no particular reason. Figure 5 displays the surface generated by the interpolating function .

Figure 5 Surface generated by the interpolating function

Now we must devise a "steepestascent algorithm" that works strictly numerically, on just data. We don't have a function whose gradient field we can integrate. We can use only the given data points and the interpolating function .
Here is our thinking. If we are at a point where the height is , we want to move to the "nearest highest point." Of course, for a continuous surface, this is meaningless. So instead, we ask for the nearest highest point in a neighborhood of P, and define that neighborhood as a small circle around P. But how do we find the highest point on subject to a constraint such as ? We use the Search command from Dr. Sergey Moiseev's DirectSearch package. A sequence of such optimizations generates the steepestascent curve as a set of points in .
For example, we start a steepestascent curve at the point on the base contour where , and compute the corresponding ycoordinate to be
 (3) 
and hence, the initial point on the steepestascent curve is
Additional points are then obtained as per the calculations in Table 3.

Table 3 A sequence of steepestascent points computed as constrained maxima

Figure 6 contains a graph of the connected points, superimposed on the surface in Figure 5.

Figure 6 Discretely computed steepestascent curve on the surface in Figure 5

Of course, the calculations in Table 3 would have to be repeated for a number of different initial points if we wanted to reproduce the equivalent of Figure 4. Other considerations include the "stepsize," that is, the radius of the constraint circle defining the neighborhood of each point on the surface.