| TUgridTrim | TCL UTILITIES USER MANUAL | TUdgridTrim |
|---|
| set |
TUgridTrim  |
|
| CmD | - | Defines what action the procedure
should take.
|
||||||||||||
| Grid | - | The input data grid. | ||||||||||||
| gInfo | - | The grid information array. | ||||||||||||
| Ops | - | An array of input options
|
| Returns a list of the effective grid edges. The list elements in order are: the lower and upper column numbers and the lower and upper row numbers. |
# PLOT rows of data through a grid
# SET up a data set consisting of two Gaussians
set nP 0
for { set X -6.0 } { $X <= 6.0 } { set X [expr $X + .1] } {
for { set Y -6.0 } { $Y <= 6.0 } { set Y [expr $Y + .1] } {
set Yy($nP) $Y
set Xx($nP) $X
set rA [expr ($X - 3.0) * ($X - 3.0) + $Yy($nP) * $Yy($nP)]
set rB [expr ($X + 3.0) * ($X + 3.0) + $Yy($nP) * $Yy($nP)]
set Vv($nP) [expr 2.0 * exp(-$rA / 8.0) + 1.5 * exp(-$rB / 8.0)]
incr nP
}
}
# SET up the grid information array.
set gInfo(0) -6.0
set gInfo(1) 6.0
set gInfo(2) -6.0
set gInfo(3) 6.0
set gInfo(4) 100
set gInfo(5) 100
set gInfo(6) POINT
set gInfo(7) POINT
set gInfo(8) COLUMN
set gInfo(9) IGNORE
set gInfo(10) NEW:ADD:END
set gInfo(11) -1
set gInfo(12) -5
set gInfo(13) -1.0e30
set gInfo(14) 1.0e30
set gInfo(15) NO
set gInfo(16) NO
# GRID the data
TUdataGrid $nP 1 Xx Xx 1 Yy Yy Vv Grid Norm gInfo
# TURN on plotting
set GphInfo(xScrL) 500
set GphInfo(yScrL) 800
GraphicsOn TK ETones SWAP
GenWindow 1 0.0 0.0 0.0 1.0 1.0 0.0 0. 0. 0. 1. 1. 0. XY
set WinInfo(8,corFmt) 1
RelWindow 8 1 75.0 375.0 0. 475. 775. 0. -6. -6. 0. 6. 6. 0.
DefinePlot 8 8 $gInfo(4) $gInfo(5)
set WinInfo(9,corFmt) 1
RelWindow 9 1 75.0 75.0 0. 475. 275. 0. -6. 0. 0. 6. 2. 0.
DefinePlot 9 9 -1 -1
# COLOR runs from 0 to 2.0
PLTcolorMap 0.0 2.0 LINEAR 0 cA
# PLOT the Grid
Plot3D 8 Xb Yb Dummy Dummy Grid AUTO Dummy cA
PlotOutlines 8 [list "X" 1.0 "Y" 1.0] [list BOT BOT BOTH BOTH]
# GET the X centers of a row of cells.
TUgridInfo 32 gInfo Xc
# PLOT all cell rows from 0 to 50 incrementing by 5 rows.
for { set I 0 } { $I <= 50 } { incr I 5 } {
set nE [expr [TUgridTrim Grid gInfo Vc RETRIEVE ROW $I] - 1]
Plot2D 9 Xb Yb Xc Vc 0 $nE LINE [list $GphInfo(White) NONE]
}
# PLOT axis and labels
PlotOutlines 9 [list "X " 1.0 "V" 1.0] [list BOT BOT BOTH BOTH]
update
| Sept 27, 2006 |
|---|