import numpy as np
import matplotlib.pyplot as plt

# every pixel gets an x and a y value
x, y = np.meshgrid(np.linspace(-10, 10, 900), np.linspace(-6, 6, 540))

# two stones fall into the water: distance to each, one wave each
r1 = np.sqrt((x + 3)**2 + y**2)
r2 = np.sqrt((x - 3)**2 + y**2)
z = np.sin(5 * r1) / np.sqrt(r1 + 0.5) + np.sin(5 * r2) / np.sqrt(r2 + 0.5)

plt.figure(figsize=(10, 6))
plt.imshow(z, cmap='twilight_shifted', vmin=-1.3, vmax=1.3)
plt.axis('off')
plt.savefig('waves.png', bbox_inches='tight', pad_inches=0)
