points_ineq.tcl

This example shows how to use inequality conditions in points to obtain evenly sampled surface. Here we have two set of points: blue (points_geq) and red (points_leq). For blue points surface should be greater than or equal to points values, for red "less than or equal".

See also:
points_leq, points_geq, completer
Here is the image of the resulting surface:

surface with inequality conditions

Pic 1. surface with inequality conditions

This result was obtained with "examples/surfit/points/points_ineq.tcl" script.

Some comments to script:

00001 #
00002 # This script was generated with funner v2.1beta (www.gridding.info)
00003 
00004 # 
00005 # load plugins
00006 # 
00007 load libsurfit[info sharedlibextension]
00008 
00009 # remove all previous data and gridding rules
00010 clear_data 
00011 
00012 # set name of surface
00013 set map_name "map_points_ineq" 
00014 
00015 # set tolerance for cg solver
00016 set tol 1e-004
00017 
00018 ##
00019 ## load initial data 
00020 ##
00021  
00022 # load points from text file 
00023 pnts_read "points_geq.txt" "points_geq"  
00024  
00025 # load points from text file 
00026 pnts_read "points_leq.txt" "points_leq"  
00027  
00028 ##
00029 ## construct grid 
00030 ##
00031 grid 
00032  
00033 ##
00034 ## create gridding rules
00035 ##
00036 
00037 # resulting surface should be greater than or equal to points values
00038 points_geq "points_geq" 
00039 
00040 # resulting surface should be lower than or equal to points values
00041 points_leq "points_leq" 
00042 
00043 # resulting surface should tend to be constant or plane 
00044 completer 0 1  
00045 
00046 ##
00047 ## run gridding algorithm
00048 ##
00049 surfit 
00050 
00051 ##
00052 ## save results 
00053 ##
00054 
00055 # unload grid from memory
00056 grid_unload 
00057 
00058 # save surface to surfit datafile 
00059 surf_save "points_ineq.dat" "map_points_ineq" 



surfit: open source gridding and contouring software.