Given the extremes of the range and the number of cells along x y and z, it generates a three-dimensional grid. Cells are counted from the minimum of x, y and z. You can choose whether to increase x or z faster.
Slots
xcellnumeric, number of cells along x
ycellnumeric, number of cells along y
zcellnumeric, number of cells along z
xminnumeric, lower limit along x
xmaxnumeric, upper limit along x
yminnumeric, lower limit along y
ymaxnumeric, upper limit along y
zminnumeric, lower limit along z
zmaxnumeric, upper limit along z
bycharacter, count cells increasing x ("h") or z ("v") faster
Examples
grid3d <- makeGrid3d(
xmin = -50, xmax = 50, xcell = 4,
ymin = -50, ymax = 50, ycell = 5,
zmin = -50, zmax = 50, zcell = 6,
by = "v"
)
grid3d
#> class : Grid3d
#> dimensions : xcell = 4, ycell = 5, zcell = 6, ncell = 120
#> range : xmin = -50, xmax = 50
#> ymin = -50, ymax = 50
#> zmin = -50, zmax = 50
#> by : v, count starts from xmin, ymin, zmin;
#> z increase faster, x slower
makeGrid3d()
#> class : Grid3d
#> dimensions : xcell = 10, ycell = 10, zcell = 10, ncell = 1000
#> range : xmin = -5, xmax = 5
#> ymin = -5, ymax = 5
#> zmin = -5, zmax = 5
#> by : h, count starts from xmin, ymin, zmin;
#> x increase faster, z slower
