
Construct an N-dimensional lattice grid
fm_lattice_Nd(x = NULL, ...)# S3 method for matrix
fm_lattice_Nd(x = NULL, dims = NULL, values = NULL, ...)
# S3 method for data.frame
fm_lattice_Nd(x = NULL, ...)
# S3 method for list
fm_lattice_Nd(x = NULL, dims = NULL, ...)
# S3 method for fm_bbox
fm_lattice_Nd(x = NULL, dims = NULL, ...)
# S3 method for `NULL`
fm_lattice_Nd(x = NULL, ..., dims = NULL)
An fm_lattice_Nd
object with elements
integer vector
the grid coordinate axis values
matrix of constructed grid coordinates
list
, data.frame
, matrix
, fm_bbox
or NULL
. If a list of
vectors, as.matrix(expand.grid(x))
is used to create a full grid
coordinates. data.frame
and matrix
input is assumed to follow the same
ordering convention as the output of expand.grid()
. of length N of
vectors or grid matrices of coordinate values. List vector values are
sorted before use.
Passed on to submethods
numeric; the size of the grid of dimension length(dims)
list of grid axis values
fm_lattice_Nd(`NULL`)
: Ignores the NULL
x
and creates a lattice
based on values
(if non-NULL) and dims
unit hypercube
lattice grid with dims
dimensions.
Finn Lindgren Finn.Lindgren@gmail.com
fm_mesh_3d()
Other object creation and conversion:
fm_as_collect()
,
fm_as_fm()
,
fm_as_lattice_2d()
,
fm_as_lattice_Nd()
,
fm_as_mesh_1d()
,
fm_as_mesh_2d()
,
fm_as_mesh_3d()
,
fm_as_segm()
,
fm_as_sfc()
,
fm_as_tensor()
,
fm_collect()
,
fm_lattice_2d()
,
fm_mesh_1d()
,
fm_mesh_2d()
,
fm_segm()
,
fm_simplify()
,
fm_tensor()
(lattice <- fm_lattice_Nd(
list(
seq(0, 1, length.out = 3),
seq(0, 1, length.out = 4),
seq(0, 1, length.out = 2)
)
))
if (requireNamespace("geometry", quietly = TRUE)) {
(mesh <- fm_delaunay_3d(lattice$loc))
}
Run the code above in your browser using DataLab