View source: R/write_fs_patch.R
| fs.patch | R Documentation |
Constructor for fs.patch
fs.patch(vertices, faces = NULL)
vertices |
numerical nx5 matrix (or nx7 matrix), see |
faces |
numerical nx5 matrix, see |
instance of class fs.patch
Other patch functions:
read.fs.patch(),
read.fs.patch.asc(),
write.fs.patch()
num_vertices <- 6L
# a tiny patch
vertices <- matrix(rep(0., num_vertices * 5), ncol = 5)
vertices[, 1] <- seq.int(num_vertices)
# 1-based vertex indices
vertices[, 2:4] <- matrix(rnorm(num_vertices * 3, 8, 2), ncol = 3)
# vertex coords
vertices[, 5] <- rep(0L, num_vertices)
# is_border
vertices[3, 5] <- 1L
# set a vertex to be a border vertex
patch <- fs.patch(vertices)
patch
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.