points_approx.tcl

This example shows how one goes from randomly spaced data points to an evenly sampled surface. We have 13504 approximation points (file `examples/surfit/points/points.txt`

) and equidistant grid with more than 250000 nodes. To approximate points to evenly sampled **smooth** surface we do the following things:

- load scattered points to the memory
- create equidistant grid of 512x512 nodes
- set some additional parameters (tolerance, map_name)
- create sequence of gridding rules (how to use data points and space between them)
- run Description of the surfit gridding algorithm algorithm
- save results to file

- See Also
- points, points_add, completer

Here is the image of the resulting surface:

Pic 1. approximation surface

Pic 2. small part of approximation surface

This result was obtained with `"examples/surfit/points/points_approx.tcl"`

script.

Some comments to script:

- map_name variable is used to set name of resulting surface
- tol variable is used to manage tolerance of iterative linear system solver algorithm. If this value is too big, an iterative algorithm will make low number of iterations and it will lead to rough result.
- grid_unload function call to remove grid grid from result file.
- to produce more smoother surface you should reduce weight value in points_add command. To produce more precise approximation (surface tends to interpolation) you should enlarge weight value in points_add command.

`surfit`: gridding and contouring software.