fm_subdivide | R Documentation |
Splits each mesh triangle into (n + 1)^2
subtriangles.
The current version drops any edge constraint information from the mesh.
fm_subdivide(mesh, n = 1)
mesh |
an fm_mesh_2d object |
n |
number of added points along each edge. Default is 1. |
A refined fm_mesh_2d object
Finn Lindgren finn.lindgren@gmail.com
mesh <- fm_rcdt_2d_inla(
loc = rbind(c(0, 0), c(1, 0), c(0, 1)),
tv = rbind(c(1, 2, 3))
)
mesh_sub <- fm_subdivide(mesh, 3)
mesh
mesh_sub
plot(mesh_sub, edge.color = 2)
plot(fm_subdivide(fmexample$mesh, 3), edge.color = 2)
plot(fmexample$mesh, add = TRUE, edge.color = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.