3D printed DEM

Found a digital elevation map for South Africa and using some R code turned it into an STL – I think it came out pretty nice:

SA DEM 3d Printed
SA DEM 3d Printed

The elevation is about 1000 times exaggerated to scale – the final print measures 200x200x35 mm

The STL can be downloaded here

I used the following R code:

library(raster)
library(rasterVis)
library(r2stl)

a.loaded <- raster("sa.vrt")
gf <- focalWeight(a.loaded, 0.05, "Gauss")
a <- focal(a.loaded, w=gf)

a <- aggregate(a, fact=10, fun=mean)
a.crop <- crop(a, extent(12,36, -35, -22))

a.matrix <- as.matrix(a.crop)
a.matrix[is.na(a.matrix)] <- 0
x <- 1:dim(a.matrix)[1]
y <- 1:dim(a.matrix)[2]

r2stl(x,y,a.matrix, filename="sa.stl")

 

Found a digital elevation map for South Africa and using some R code turned it into an STL – I think it came out pretty nice: The elevation is about 1000 times exaggerated to scale – the final print measures 200x200x35 mm The STL can be downloaded here I used the following R code: library(raster)…

Leave a Reply