3D printed DEM

0

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")

 

Posted in: Random

Leave a Reply

Get involved

Mailing List / Forum:
Google Group

IRL:

  • Schalk 082 777 7098
    schalk dot heunis at gmail dot com

  • Guy 084 678 0045
    guy dot vandenberg at microsmart dot co dot za

  • Toby
    http://tobykurien.com

Courses:

Subscribe for course announcements





Meta