| vertex_areas | R Documentation |
Each triangle distributes one-third of its area to each of its three vertices. Triangle area is computed via the cross-product formula.
vertex_areas(vertices, faces)
vertices |
Numeric matrix (n x 3) of vertex coordinates. |
faces |
Integer matrix (m x 3) of face indices (1-indexed). |
Numeric vector of length nrow(vertices).
vertices <- matrix(c(0, 1, 0, 0, 0, 1, 0, 0, 0), nrow = 3, byrow = TRUE)
faces <- matrix(c(1L, 2L, 3L), nrow = 1)
vertex_areas(vertices, faces)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.