curve_surf.tcl

This examples shows how to build surface approximating other surface values on curves.

Here is the image of the resulting surface:

This surface approximates other surface at two curves

Pic 1. Surface approximates other surface at curves

This result was obtained with "examples/surfit/curvs/curve_surf.tcl" 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_curv_surf" 
00014 
00015 # set solver
00016 set_solver "cg" 
00017 
00018 # set tolerance for solver
00019 set tol 1e-005 
00020 
00021 ##
00022 ## load initial data 
00023 ##
00024  
00025 # load curve from text file 
00026 curv_read "spiral.xy" "spiral"  
00027  
00028 # load curve from text file 
00029 curv_read "spiral2.xy" "spiral2"  
00030  
00031 # load surface from surfit datafile 
00032 surf_load "func.func" "test_func"  
00033  
00034 ##
00035 ## construct grid 
00036 ##
00037 grid 
00038  
00039 ##
00040 ## create gridding rules
00041 ##
00042 
00043 # resulting surface at curve = surface values... 
00044 curve_surf "test_func" "spiral"  
00045 
00046 # resulting surface should tend to be constant or plane 
00047 completer 
00048 
00049 # add "resulting surface at curve = surface values..." with weight 
00050 curve_surf_add "test_func" 0.5 "spiral2"  
00051 
00052 ##
00053 ## run gridding algorithm
00054 ##
00055 surfit 
00056 
00057 ##
00058 ## save results 
00059 ##
00060 
00061 # unload grid from memory
00062 grid_unload 
00063 
00064 # save surface to surfit datafile 
00065 surf_save "curve_surf.dat" "map_curv_surf" 



surfit: open source gridding and contouring software.