Surfaces represented by Regular Data.

Copyright (c) Susan Laflin. August 1999.

The most efficient way of storing such data is possible when the values are measured at regular intervals over a rectangular mesh, as shown in the figure below.

View of a Surface (Fishnet drawing)

In this case it is only necessary to record the values of the spot heights or z-coordinates in a rectangular array H(I,J) because the x and y coordinates can be calculated from the indices I and J.

				x = x0 + dx * J 
				y = y0 + dy * I 
				z = z0 + H(I,J) 

If the only information we have about the surface is contained in the array A, then the mesh must be chosen with care. If the mesh is very fine, so that dx and dy are very small, then all the minor undulations in the surface will be faithfully recorded but the amount of data to be recorded and stored may become exceedingly large. On the other hand, if we economise on storage, this implies a very coarse mesh which records the overall shape of the surface but much of the fine detail is lost forever. The mesh must be chosen so that it is fine enough to include those features which interest us while minimising the time and storage needed to record and store the data.

It is possible to choose an equation to represent the whole surface and use some approximation method such as least squares (beware of ill-conditioning) or minimax to calculate the values of the various parameters which provide the best fit to the surface. This works well in the few cases when we can predict the form of equation which will represent the surface.

In most cases, this is not possible and so it is much more usual to cover the surface with a mosaic of "patches" or "tiles", each of which is fitted to a square of the mesh. (There are several forms of equation for such tiles, the simplest of which is the "Bi-Linear Surface Patch".) Then, using one of the interpolation formulae which are valid over a rectangular surface patch, it is possible to calculate the height at any point on the surface. This assumes that the mesh is small enough to indicate any humps or dips that are of interest, since a feature which lies entirely inside one of the patches cannot be represented if the values at the four corners of the patch are the only information about the surface which has been recorded.

Since some areas of the surface may be of greater interest than others, it can be tedious to record data at regular intervals over the whole of the surface, both dull and interesting areas. One possible solution may be to use a smaller and more detailed mesh in the complex areas, and a much larger mesh in the less variable areas. If you are taking the measurements and have control over the way in which the data is recorded, then this may be your preferred option, since it is certainly easier to process data recorded in this way.

Methods of representing 3D surfaces on 2D output.

Mosaic Method

This method is most effective on a colour terminal, where the different ranges of values of height can be mapped onto different colours, but output on a black and white terminal with a limited range of patterns may also be used. If there are four different patterns, then the range of spot-heights may be divided into four subranges, one corresponding to each pattern. A square filled with the appropriate pattern is drawn surrounding the corresponding (x,y) position. An example of the resulting mosaic is shown in the figure.

Example of Mosaic Output.

The more colours available on the terminal, the smaller is the size of interval in the z-direction corresponding to each colour and so the better the resolution in that direction. However, to give a more accurate impression of the shape of the surface, it is also necessary to improve the resolution in the x and y directions as well. This may be done in steps, or you may fit a surface patch and move directly to the maximum possible resolution. This is discussed in deatil in the attached section.

Contouring Methods

Probably the most familiar example of a contour plot is the method used by the Ordnance Survey to indicate the height of the ground on one of their large scale maps. However, the idea of drawing contours to indicate the shape of a surface is not restricted to this application, and the next figure shows an example of a contour plot of magnetic intensity over an area on an archaeological site.

Example of Contour Plot

Contouring is an important topic and is discussed in the detail in the attached section.

Three-Dimensional Histogram or Pillar.

Instead of drawing a square of the appropriate colour at each of the spot heights, this method draws a square column of appropriate height at each of these positions. The next figure shows an example of this type of output.

Example of Pillar Output.

Isometric Projection Drawing or Fishnet.

Example of Fishnet Output.

The above figure shows an example of this form of output. For both these three-dimensional representations, it is also necessary to be able to vary the viewpoint and look at the surface from any of the four sides, and possibly also from different heights, to get a complete view of the shape of the surface.