| view_srep | R Documentation |
Plots a skeletal representation (s-rep) object based on its three-dimensional base, spokes, and boundary.
view_srep(
base,
dirs,
bdry,
radii,
show_base = TRUE,
show_base_pt = TRUE,
show_bdry = TRUE,
show_bdry_pt = TRUE,
show_seg = TRUE,
col_base = "red",
col_bndy = "blue",
col_seg = "green",
static = TRUE,
texts = NULL,
cex_base = ifelse(static, 0.5, 6),
cex_bdry = ifelse(static, 1, 8),
lwd_seg = ifelse(static, 1, 2),
cex_texts = 1,
alpha_base = 0.1,
alpha_bdry = 0.15,
r_texts = 1.25,
alpha_ashape3d_base = NULL,
alpha_ashape3d_bdry = NULL,
lit = FALSE,
...
)
base |
base points, a matrix of size |
dirs |
directions of spokes, a matrix of size |
bdry |
boundary points, a matrix of size |
radii |
radii of spokes, a vector of size |
show_base, show_base_pt |
show base and base grid? Default to
|
show_bdry, show_bdry_pt |
show boundary and boundary grid? Default to
|
show_seg |
show segments? Defaults to |
col_base, col_bndy, col_seg |
colors for the base, boundary, and segments.
Default to |
static |
use static ( |
texts |
add text labels? If given, it should be a vector of size
|
cex_base, cex_bdry |
size of the base and boundary points. |
lwd_seg |
width of the segments. |
cex_texts |
size of the text labels. Defaults to |
alpha_base, alpha_bdry |
transparencies for base and boundary. Default to
|
r_texts |
magnification of the radius to separate the text labels.
Defaults to |
alpha_ashape3d_base, alpha_ashape3d_bdry |
alpha parameters for
|
lit |
lit parameter passed to |
... |
further arguments to be passed to |
Invisibly returns NULL. Called for the side effect of
producing a static or interactive 3D plot of the s-rep.
García-Portugués, E. and Meilán-Vila, A. (2023). Hippocampus shape analysis via skeletal models and kernel smoothing. In Larriba, Y. (Ed.), Statistical Methods at the Forefront of Biomedical Advances, pp. 63–82. Springer, Cham. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/978-3-031-32729-2_4")}
hippocampus, interp_polysph.
if (requireNamespace("scatterplot3d", quietly = TRUE)) {
base <- r_unif_polysph(n = 50, d = 2)
dirs <- base
radii <- runif(nrow(base), min = 0.5, max = 1)
bdry <- base + radii * dirs
view_srep(base = base, dirs = dirs, bdry = bdry, radii = radii,
texts = 1:50, xlim = c(-2, 2), ylim = c(-2, 2), zlim = c(-2, 2))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.