3D Quiver

Wind Flow Over Terrain

Atmospheric wind vectors showing airflow patterns deflected by terrain features.

Output
Wind Flow Over Terrain
Python
import matplotlib.pyplot as plt
import numpy as np

# Wind flow field
n = 6
x = np.linspace(-2, 2, n)
y = np.linspace(-2, 2, n)
z = np.linspace(0.5, 2.5, 4)
X, Y, Z = np.meshgrid(x, y, z)

# Horizontal wind with terrain deflection
terrain = 0.3 * np.exp(-(X**2 + Y**2))
U = np.ones_like(X) * 0.8
V = 0.2 * np.sin(Y)
W = 0.3 * np.exp(-(X**2 + Y**2)) * (2 - Z)

fig = plt.figure(figsize=(10, 8), facecolor='#ffffff')
ax = fig.add_subplot(111, projection='3d', facecolor='#ffffff')

ax.quiver(X, Y, Z, U, V, W, length=0.3, normalize=True,
          color='#0891b2', alpha=0.8, arrow_length_ratio=0.3)

ax.set_xlim(-2.5, 2.5)
ax.set_ylim(-2.5, 2.5)
ax.set_zlim(0, 3)

ax.set_xlabel('X (km)', color='#1f2937', fontsize=10)
ax.set_ylabel('Y (km)', color='#1f2937', fontsize=10)
ax.set_zlabel('Altitude', color='#1f2937', fontsize=10)
ax.set_title('Wind Flow Over Terrain', color='#1f2937', fontsize=14, fontweight='bold', pad=20)

ax.tick_params(colors='#6b7280', labelsize=8)
ax.xaxis.pane.fill = False
ax.yaxis.pane.fill = False
ax.zaxis.pane.fill = False
ax.xaxis.pane.set_edgecolor('#e5e7eb')
ax.yaxis.pane.set_edgecolor('#e5e7eb')
ax.zaxis.pane.set_edgecolor('#e5e7eb')

ax.view_init(elev=20, azim=35)
plt.tight_layout()
plt.show()
Library

Matplotlib

Category

3D Charts

Did this help you?

Support PyLucid to keep it free & growing

Support