added book

This commit is contained in:
Morten Hjorth-Jensen
2020-12-07 10:47:22 +01:00
parent 7ede26a6eb
commit 07f14316b2
2 changed files with 67003 additions and 0 deletions
@@ -0,0 +1,32 @@
import numpy as np
from imageio import imread
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
import numpy as np
from numpy.random import normal, uniform
# Load the terrain
terrain = imread('SRTM_data_Norway_1.tif')
N = 1000
terrain = terrain[:N,:N]
# Creates mesh of image pixels
x = np.linspace(0,1, np.shape(terrain)[0])
y = np.linspace(0,1, np.shape(terrain)[1])
x_mesh, y_mesh = np.meshgrid(x,y)
z = terrain
# Show the terrain
plt.figure()
plt.title('Terrain over Norway 1')
plt.imshow(terrain, cmap='gray')
plt.xlabel('X')
plt.ylabel('Y')
plt.show()
File diff suppressed because one or more lines are too long