Skip to content

Instantly share code, notes, and snippets.

@etachov
Last active August 12, 2018 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save etachov/ba640800d13ba2c21c1717e4eadd7a4c to your computer and use it in GitHub Desktop.
Save etachov/ba640800d13ba2c21c1717e4eadd7a4c to your computer and use it in GitHub Desktop.
Plot Mount Marcy elevation using rayshader
# devtools::install_github("tylermorganwall/rayshader")
library(rayshader)
library(raster)
# Mount Marcy DEM data https://cugir.library.cornell.edu/catalog/cugir-008186
mount_marcy = raster("h47elu.dem")
mount_marcy_matrix <- matrix(extract(mount_marcy, extent(mount_marcy), buffer = 1000),
nrow = ncol(mount_marcy),
ncol = nrow(mount_marcy))
mount_marcy_matrix %>%
sphere_shade(texture = "imhof2") %>%
plot_3d(mount_marcy_matrix, zscale=5, background = "black")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment