&args tin /* *************************************************************** /* tin2wrl.aml (Feb 19, 1996) /* Erich Schroeder, Illinois State Museum GIS Lab /* erich@museum.state.il.us /* Feel free to use this, please let me know if you make changes that /* might be useful to a generic version. /* /* History: /* Jan 29, 1996: Began creation of the structure /* Feb 16, 1996: Incorporated some suggestions from John Salf of NCSA /* (jshalf@bach.ncsa.uiuc.edu) /* Feb 19, 1996: First release /* /* *************************************************************** &if [null %tin%] &then &return Usage: tin2wrl &if [exists tnpoly -cover] &then kill tnpoly &if [exists tnpoint -cover] &then kill tnpoint &describe %tin% tinarc %tin% tnpoly clean tnpoly build tnpoly build tnpoly line build tnpoly node nodepoint tnpoly tnpoint addxy tnpoly node additem tnpoly.nat tnpoly.nat node-id 6 7 i additem tnpoly.nat tnpoly.nat spot 4 12 f 3 tinspot %tin% tnpoint &data arc info ARC CALC $COMMA-SWITCH = -1 SEL TNPOLY.NAT REDEFINE 9,ID,4,5,B ~ CALC NODE-ID = ID - 1 SEL TNPOINT.PAT REDEFINE 21,ID,4,5,B ~ SEL TNPOLY.NAT RELATE TNPOINT.PAT BY ID DISPLAY 'MOVING SPOT OVER' CALC $NM = 1 CALC SPOT = $1SPOT RUN SETPOLYNODE4 OUTPUT ../%tin%.wrl INIT CALC $NUM2 = ((%TIN$XMAX% - %TIN$XMIN%) / 2.0) + %TIN$XMIN% CALC $NUM3 = %TIN$ZMAX% CALC $NUM4 = %TIN$YMIN% RUN WRITEWRL Q STOP &end &type %tin%.wrl has been created &type NOTE: you will have to edit out a leading space on the first line &return