Seite 1 von 1

2d-Interpolation

Verfasst: Montag 8. Juli 2013, 13:37
von Grizzly
Hallo,

ich habe z.B. einen Berg als 2d-array und möchte nun meine Auflösung von shape(5,5) auf (10,10) verbessern.
Gibt es dafür eine Möglichkeit ohne die erzeugende Funktion für z ?

Code: Alles auswählen

import numpy as np
from scipy import interpolate
from mayavi import mlab

# create some testdata
s = np.array([[0,0,0,0,0],[0,1,2,1,0],[0,2,3,2,0],[0,1,2,1,0],[0,0,0,0,0]])

# interpolate (5,5) to (10,10) ???
nx = int(len(s))
ny = int(len(s[0]))


# plot the stuff
mlab.figure(size=(800, 600), bgcolor=(0, 0, 0))
surf1 = mlab.surf(s,colormap='Blues')
mlab.show()
Danke Euch !

Re: 2d-Interpolation

Verfasst: Montag 15. Juli 2013, 15:43
von Dobi