mesh_to_2d | R Documentation |
Turns a 3D Mesh file into an xy data frame.
mesh_to_2d(mesh, L0 = NULL, plot = FALSE, silent = TRUE)
mesh |
A mesh3d object. |
L0 |
(Optional) The desired DEM resolution in same units at the 3D mesh. |
plot |
logical. Plot the output? |
silent |
logical. Defaults to not showing warnings. |
The function uses the vertices of the mesh object and projects them on the XY plane. Then, only points that define the perimeter of the shape are maintained.
A data frame.
mcap_2d <- mesh_to_2d(mcap, plot = TRUE)
geometry::polyarea(mcap_2d$x, mcap_2d$y) # area
planar(mcap)
perimeter(mcap_2d) # perimeter
circularity(mcap_2d) # circularity
fd_boxes(mcap_2d) # fractal dimension
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.