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 = 1401
size = 45
colormap = "inferno"
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.742727 * np.exp(
-((X - -0.770675)**2 / (2 * 1.323189**2)
+ (Y - -0.137009)**2 / (2 * 1.067573**2))
)
Z += -1.412805 * np.exp(
-((X - 1.402429)**2 / (2 * 0.854391**2)
+ (Y - 2.408846)**2 / (2 * 1.249359**2))
)
Z += -0.827792 * np.exp(
-((X - 0.276562)**2 / (2 * 1.317082**2)
+ (Y - 2.673287)**2 / (2 * 1.055519**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()