namruto77's picture
Upload VeriRender benchmark dataset
d323f57 verified
Raw
History Blame Contribute Delete
1.5 kB
import numpy as np
import matplotlib.pyplot as plt
# ── Parameters ─────────────────────────────────────────────────────────────
seed = 1204
size = 42
colormap = "magma"
n_blobs = 3
# ── Data ────────────────────────────────────────────────────────────────────
x = np.linspace(-3.0, 3.0, size)
y = np.linspace(-2.0, 4.0, size)
X, Y = np.meshgrid(x, y)
Z = np.zeros((size, size))
Z += 0.642796 * np.exp(
-((X - -1.371097)**2 / (2 * 0.932722**2)
+ (Y - 2.382753)**2 / (2 * 1.420092**2))
)
Z += -1.349326 * np.exp(
-((X - 1.852043)**2 / (2 * 1.306597**2)
+ (Y - 0.960202)**2 / (2 * 1.406501**2))
)
Z += 0.853192 * np.exp(
-((X - 1.932850)**2 / (2 * 1.174295**2)
+ (Y - -0.136271)**2 / (2 * 0.744903**2))
)
# ── Plot ────────────────────────────────────────────────────────────────────
fig, ax = plt.subplots(figsize=(6, 5))
im = ax.pcolormesh(X, Y, Z, cmap=colormap, shading="auto")
fig.colorbar(im, ax=ax, label="Intensity")
ax.set_title(f"Gaussian Heatmap ({n_blobs} blob(s))")
ax.set_xlabel("X")
ax.set_ylabel("Y")
fig.tight_layout()
plt.show()