Computes a refined constrained Delaunay triangulation on R2 or S2.
Arguments
- ...
Currently passed on to
fm_mesh_2d_inla
or converted tofmesher_rcdt()
options.- loc
Input coordinates that should be part of the mesh. Can be a matrix,
sf
,sfc
,SpatialPoints
, or other object supported byfm_unify_coords()
.- tv
Initial triangulation, as a N-by-3 index vector into
loc
- boundary, interior
Objects supported by
fm_as_segm()
. Ifboundary
isnumeric
,fm_nonconvex_hull(loc, convex = boundary)
is used.- extend
logical
orlist
specifying whether to extend the data region, with parameters- list("n")
the number of edges in the extended boundary (default=16)
- list("offset")
the extension distance. If negative, interpreted as a factor relative to the approximate data diameter (default=-0.10)
Setting to
FALSE
is only useful in combinationlattice
orboundary
.- refine
logical
orlist
specifying whether to refine the triangulation, with parameters- list("min.angle")
the minimum allowed interior angle in any triangle. The algorithm is guaranteed to converge for
min.angle
at most 21 (default=21
)- list("max.edge")
the maximum allowed edge length in any triangle. If negative, interpreted as a relative factor in an ad hoc formula depending on the data density (default=
Inf
)- list("max.n.strict")
the maximum number of vertices allowed, overriding
min.angle
andmax.edge
(default=-1, meaning no limit)- list("max.n")
the maximum number of vertices allowed, overriding
max.edge
only (default=-1, meaning no limit)
- lattice
An
fm_lattice_2d
object, generated byfm_lattice_2d()
, specifying points on a regular lattice.- globe
If non-NULL, an integer specifying the level of subdivision for global mesh points, used with
fmesher_globe_points()
- cutoff
The minimum allowed distance between points. Point at most as far apart as this are replaced by a single vertex prior to the mesh refinement step.
- quality.spec
List of vectors of per vertex
max.edge
target specification for each location inloc
,boundary/interior
(segm
), andlattice
. Only used if refining the mesh.- crs
Optional crs object
Functions
fm_rcdt_2d_inla()
: Legacy method for theINLA::inla.mesh.create()
interfacefm_delaunay_2d()
: Construct a plain Delaunay triangulation.
INLA compatibility
For mesh and curve creation, the fm_rcdt_2d_inla()
, fm_mesh_2d_inla()
,
and fm_nonconvex_hull_inla()
methods will keep the interface syntax used by
INLA::inla.mesh.create()
, INLA::inla.mesh.2d()
, and
INLA::inla.nonconvex.hull()
functions, respectively, whereas the
fm_rcdt_2d()
, fm_mesh_2d()
, and fm_nonconvex_hull()
interfaces may be
different, and potentially change in the future.
Examples
(m <- fm_rcdt_2d_inla(
boundary = fm_nonconvex_hull(cbind(0, 0), convex = 5)
))
#> fm_mesh_2d object:
#> Manifold: R2
#> V / E / T: 16 / 29 / 14
#> Euler char.: 1
#> Constraints: 16 boundary edges (1 group: 1), 0 boundary edges
#> Bounding box: (-4.999623, 4.999623) x (-4.999623, 4.999623)
#> Basis d.o.f.: 16
fm_delaunay_2d(matrix(rnorm(30), 15, 2))
#> fm_mesh_2d object:
#> Manifold: R2
#> V / E / T: 15 / 35 / 21
#> Euler char.: 1
#> Constraints: 7 boundary edges (1 group: 1), 0 boundary edges
#> Bounding box: (-1.116393, 1.654247) x (-1.706687, 3.480540)
#> Basis d.o.f.: 15