Module 6 Lab

Author

Alex Mather

Module 6 Lab

Reading in Volcano Image from .txt file

volcano = read.table("volcanodem.txt")

Converting .txt file to Matrix

volcano = as.matrix(volcano)

Setting variables for data within image

x = 10 * (1:nrow(volcano))
y = 10 * (1:ncol(volcano))

Creating Image of data within volcanodem.txt

image(x, y, volcano)

Showing contour lines within the previous image

contour(x, y, volcano, col = "darkorange", lwd = 2)

Creating a 3D model of the volcanodem.txt

persp(x, y, volcano, theta = 160, phi = 30)