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 = 1300
size = 37
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 += 1.987855 * np.exp(
-((X - -1.625137)**2 / (2 * 0.567383**2)
+ (Y - 2.637698)**2 / (2 * 1.137880**2))
)
Z += -1.243656 * np.exp(
-((X - -1.085481)**2 / (2 * 1.107059**2)
+ (Y - 1.075510)**2 / (2 * 0.537820**2))
)
Z += -0.548183 * np.exp(
-((X - -0.269262)**2 / (2 * 0.704756**2)
+ (Y - 1.132548)**2 / (2 * 0.642797**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()