Learn R Programming

fmesher (version 0.3.0)

fm_mesh_intersection: Construct the intersection mesh of a mesh and a polygon

Description

Construct the intersection mesh of a mesh and a polygon

Usage

fm_mesh_intersection(mesh, poly)

Value

An fm_mesh_2d object

Arguments

mesh

fm_mesh_2d object to be intersected

poly

fm_segm object with a closed polygon to intersect with the mesh

Author

Finn Lindgren finn.lindgren@gmail.com

Examples

Run this code
segm <- fm_segm(rbind(c(-4, -4), c(4, -4), c(0, 4)),
  is.bnd = TRUE
)
str(m <- fm_mesh_intersection(fmexample$mesh, segm))
plot(fmexample$mesh)
lines(segm, col = 4)
plot(m, edge.color = 2, add = TRUE)

Run the code above in your browser using DataLab