rgl-call | R Documentation |
'rgl'
without requiring 'x11'
Internally used for example show-cases. Please install package 'rgl'
manually to use these functions.
rgl_call(FUN, ...)
rgl_view(expr, quoted = FALSE, env = parent.frame())
rgl_plot_normals(x, length = 1, lwd = 1, col = 1, ...)
FUN |
|
... |
passed to |
expr |
expression within which |
quoted |
whether |
env |
environment in which |
x |
triangular |
length , lwd , col |
normal vector length, size, and color |
# Make sure the example does not run when compiling
# or check the package
if(FALSE) {
volume <- array(0, dim = c(8,8,8))
volume[4:5, 4:5, 4:5] <- 1
mesh <- mesh_from_volume(volume, verbose = FALSE)
rgl_view({
rgl_call("shade3d", mesh, col = 3)
rgl_plot_normals(mesh)
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.