Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 17 Next »

Name

gen — Generate grid

Syntax

gen [inc] | [nx ny [nz]] [gse] [gre] - generate grid

gen xbo - generate extra border

gen gpl nx ny [step] - generate grid plane

gen ori - generate origin of grid

Description

Generate an empty grid within the graphical window, either surface grid or cube. A quick way to establish a grid that afterwards can be given values and used in various ways.

Arguments

No arguments, the grid will have the same number of rows and columns as the last grid that set the @nrow @ncol variables.

inc xinc yinc

Generate an empty grid with increments xinc and yinc. The z values of the grid will be 0.

inc sav

Save current increments.

inc ret

Return and set saved increments.

inc spa xinc yinc

Set grid nodes spacing to increments xinc and yinc.

inc calc

Set grid increments to what was previously calculated.

nx ny

Generate an empty grid with nx times ny elements in rows and columns. The z values in the grid will be 0. To fill the grid with random values use the command mak ras i.e make random scalars.

inc xinc yinc zinc

Generate an empty cube with increment xinc and yinc and zinc. The scalar values of the cube will be 0.

nx ny nz

Generate an empty grid with nx times ny times nz elements in rows and columns. The scalar values of the cube will be 0.

gse

Grid select. Select the part of the grid that is inside the graphical window window.

gre workspacename

Replace the grid in workspacename into the active grid. The two grids must have the same dimension and location.

xbo

Generate an extra border of boundary cells around the grid or cube. The boundary cells will have no values. For grids one can fill the boundary using the command grp ext.

gpl nx ny [step]

Generate grid plane according to these rules:

  1. 1, 2 or 3 input points will generate a plane through the points.
  2. More than 3 input points generate a step plane after a nearest point rule.
  3. If the step argument is used a step plane is generated in all cases.

ori lo | hi | min | max | zero | cur | z zvalue | x y z

Generate new origin for grid or image.

  • lo - lower left corner of window
  • hi - upper right corner of window
  • min - minimum value of dataset
  • max - maximum value of dataset
  • cur - set the origin to the cursor position
  • z zvalue - shift the z values in grid with zvalue
  • x y z - set the origin to x y z

Examples

Ex.1: Generate grid and cube

# generate a dummy grid and fill it with random scalar values
gen 100 100 ; # generate a grid with 100 x 100 elements in rows and columns
mak ras ; # mak random scalars into the grid
# generate a dummy cube and fill it with random scalar values
win 450000 460000 6450000 6460000 1000 5000 ; # specify the grid window
gen 100 100 50 ; # generate a grid with 100 x 100 x 50 elements in rows, columns and layers
mak ras ; # mak random scalars into the cube
dis ; # display the cube

The above example produces this image of the generated cube.


Result of the gen command

See also

grp - Grid points and lines, gr3 - Grid data into 3D cube

  • No labels