persp3d(volcano, col = "green")
if ((hasorientlib <- requireNamespace("orientlib", quietly = TRUE)) &&
requireNamespace("lattice", quietly = TRUE))
lattice::wireframe(volcano, screen = rglToLattice())
if (hasorientlib) {
angles <- rglToBase()
persp(volcano, col = "green", border = NA, shade = 0.5,
theta = angles$theta, phi = angles$phi)
}
Run the code above in your browser using DataLab