# converting contour lines to grids

Hello, All

I need help for converting contour lines to grids.

My original data are contour lines in an area of 1 mile by 1 mile.
Each contour line consists of some points, each point has x, y, and z. There are about
1000 points. My data file is something like the following:

12.3   23.6  60
17.6   47.9  60
35.9   68.0  60
.
.
.
234    567  120
250    345  120
.
.
.

Each line is the x, y and z value of one point. Now I want to draw the topography surface.
I did the following:

1. Set the grid size (e.g., 10 m)
2. Find the x and y of the grid points (e.g., (0,0), (10,0), ...)
3. Interpolate these grid points to get their z values
4. Draw the grid points to get the topography surface

I tried methods of moving average (with help from Bill and Tom), weighted average, and nearest neighbor for interpolation. I am not satisfied with the results, because the surfaces between contour lines are actual planes. The surfaces do not like a real terrain visually because interpolation by moving average, weighted average and nearest neighbor do not consider factors such as curvature, convex, and concave.

Recently I am reading the book "OpenGL SuperBible, Second Edition" by Richard S. Wright, Jr, and Michael Sweet. There is an example of Bezier curve in Chapter 13. Can we do the same thing in Java3d and VisAD?

Any help will be highly appreciated.

Gaoming Fu