Learn R Programming

fmesher (version 0.3.0)

fm_mesh_3d: Construct a 3D tetrahedralisation

Description

Constructs a 3D tetrahedralisation object.

Usage

fm_mesh_3d(loc = NULL, tv = NULL, ...)

fm_delaunay_3d(loc, ...)

Value

An fm_mesh_3d object

Arguments

loc

Input coordinates that should be part of the mesh. Can be a matrix, sf, sfc, SpatialPoints, or other object supported by fm_unify_coords().

tv

Tetrahedron indices, as a N-by-4 index vector into loc

...

Currently unused.

Functions

  • fm_delaunay_3d(): Construct a plain Delaunay triangulation in 3D. Requires the geometry package.

Examples

Run this code
(m <- fm_mesh_3d(
  matrix(c(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), 4, 3, byrow = TRUE),
  matrix(c(1, 2, 3, 4), 1, 4, byrow = TRUE)
))
if (FALSE) { # requireNamespace("geometry", quietly = TRUE)
(m <- fm_delaunay_3d(matrix(rnorm(30), 10, 3)))
}

Run the code above in your browser using DataLab