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
xcell
numeric, number of cells along x
ycell
numeric, number of cells along y
zcell
numeric, number of cells along z
xmin
numeric, lower limit along x
xmax
numeric, upper limit along x
ymin
numeric, lower limit along y
ymax
numeric, upper limit along y
zmin
numeric, lower limit along z
zmax
numeric, upper limit along z
by
character, 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