GTGRID User Guide > Examples > Example 2
  

Example 2
This second GTGRID demo calls GTGRID three times using the same random X, Y, and Z data for each example and then displays the results using the SURFACE command.
It differs from the first demo (wgtdemo.pro) in that:
*a different data set is read for the raw data
*the second call to GTGRID adds different fault data
*the third call uses a different gridding algorithm (Scatter)
To start this demo, enter wgtdemo2 at the PV-WAVE prompt. The results are shown in First Grid Generated in Example 2, Second Grid Generated in Example 2, and Third Grid Generated in Example 2.
This example is located in the directory:
<RW_DIR>/gtgrid-3_0/lib/wgtdemo2.pro
 
The demonstration code is:
PRO WGTDEMO2, zz, zzf, zzscat
;
; PV-WAVE procedure file to do the GTGRID examples from Users
; Guide.
;
; Load the GTGRID option
@gtgrid_startup
;
; First, get the test data for the examples.
;
GT_CON_DATA, x, y, z, xf, yf
;
PRINT, ""
PRINT, "  This second GTGRID demo calls GTGRID three times"
PRINT, " using the same random X Y Z data for each example and"
PRINT, " then displays the results using the SURFACE command."
PRINT, ""
PRINT, "  It differs from the first demo (wgtdemo.pro) in" 
PRINT, " that:"
PRINT, "    - a different data set is read for the raw data"
PRINT, "    - the second call to GTGRID adds different fault" 
PRINT, "      data"
PRINT, "    - the third call uses a different gridding" 
PRINT, "      algorithm (Scatter)"
PRINT, ""
PRINT, "  Hit any key to begin the second set of GTGRID" 
PRINT, " examples:"
PRINT, ""
HAK
;
zz = GTGRID(x, y, z)
SURFACE, zz, Ax=50
PRINT, "  Please hit any key to continue with the next GTGRID" 
PRINT, " example:"
PRINT, ""
HAK
;
; Next, add fault processing, reduce the number of smoothing
; passes and increase the size of the output grid.
;
zzf = GTGRID(x, y, z, Xf=xf, Yf=yf, Nx=150, Radius=35, $
Nsm=0, Method='Cluster')
SURFACE, zzf, Ax=50
PRINT, "  Please hit any key to continue with the next GTGRID 
PRINT, " example:"
PRINT, ""
HAK
;
; This last example uses a different method - Scatter, and 
; also defines a non-square returned gridded mesh (150 by
; 100).
;
zzscat = GTGRID(x, y, z, Xf=xf, Yf=yf, Nx=150, Ny=100, $
Rad=35, Nsm=0, Method='Scatter')
SURFACE, zzscat, Ax=50
;
END
 
 
Figure A-4: First Grid Generated in Example 2
 
Figure A-5: Second Grid Generated in Example 2
 
Figure A-6: Third Grid Generated in Example 2
 

Version 3.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.