import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits import mplot3d
# A fgv definíciója
def z_function(x, y):
return np.sin(np.sqrt(x ** 2 + y ** 2)) * 6
fig = plt.figure(figsize=(18,18))
x = np.linspace(-6, 6, 30)
y = np.linspace(-6, 6, 30)
X, Y = np.meshgrid(x, y)
Z = z_function(X, Y)
ax = plt.axes(projection='3d')
ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap='ocean', edgecolor='none')
plt.show()