maketin.sml

  Download

More scripts: TIN

Syntax Highlighing:

comments, key words, predefined symbols, class members & methods, functions & classes
            
# maketin.sml
# declare arrays to hold node x, y, and z values
array numeric x[100], y[100], z[100];
clear();
tin Tout;
GetOutputTIN(Tout, "TINToolkit", "ComputeStandardAttributes");
numeric zscale = 1;
numeric offset = 0;
numeric xytolerance = 1;
# create some node values
numeric numnodes = 0;
numeric yy, xx;
for yy = 0 to 4 {
	for xx = 0 to 4 {
		if ((xx % 2) == 0) {
			offset = 0;
			}
		else { 
			offset = 10;
			}
		numnodes += 1;
		x[numnodes] = xx * 20;
		y[numnodes] = yy * 20 + offset;
		z[numnodes] = yy * 5 + xx * 10;
		}
	}
# create the tin
TINCreateFromNodes(Tout, numnodes, x, y, z, zscale, offset, xytolerance);