Drawing contour lines is quite straight-forward. Starting point is a
sample of the function values over a grid (*x _{i}*,

For a given function value *f _{0}*, we determine for each
grid point, whether

How these points have to be connected is obvious except for one special
case. Imagine we have a grid square where all four points alternate around
*f _{0}*.
Then we have three possibilities to connect the points: We can have a

We must be careful not to connect points as shown in the image on the left which is mathematically impossible or else we get (wrong) contour lines like the one shown in the first picture on the right rather than one of the other three (correct ones).

Choosing at random one of the (correct) connections has however dangers of
its own. If we are not careful to remember for each square how we connected
the points for value *f _{0}* when we plot the line for another
value

Thus for simplicity, we choose the kind of connection from a fixed table.
This table is defined in package body `Landscape.Isohypse.Construct.Neighbourhood`,
and you may redefine the entries if you want to experiment a bit.
In its current state, the table favours the non-saddle-point solution. The
results of different choices are shown in the image on the left.

Back to Landscape.

Last update: 18 June 1999