# 3D-vectorveld import matplotlib.pyplot as plt import numpy as np rho, phi, theta = np.meshgrid (np.arange (0.1, 5, 0.5), np.arange (0, np.pi, 0.5), np.arange (0, 2 * np.pi, 0.5)) x = rho * np.cos (phi) * np.sin (theta) y = rho * np.sin (phi) * np.sin (theta) z = rho * np.cos (theta) u = x / np.sqrt (x**2 + y**2 + z**2) v = y / np.sqrt (x**2 + y**2 + z**2) w = z / np.sqrt (x**2 + y**2 + z**2) plt.figure (figsize = (8, 8)) ax = plt.axes (projection = "3d") q = ax.quiver (x, y, z, u, v, w, color = "blue", length = 0.5) plt.show ()