library(rayshader)
# volcano is a built-in dataset
volcano_map <- volcano |>
sphere_shade(texture = "desert") |>
add_shadow(ray_shade(volcano), 0.5) |>
add_shadow(ambient_shade(volcano), 0)
# 2D flat render
plot_map(volcano_map)
# 3D interactive render
plot_3d(volcano_map, volcano, zscale = 2, zoom = 0.75, phi = 45, theta = 45)
# phi is the vertical angle, theta is the horizontal rotation