namruto77's picture
Upload VeriRender benchmark dataset
d323f57 verified
Raw
History Blame Contribute Delete
1.12 kB
import numpy as np
import matplotlib.pyplot as plt
# ── Parameters ──────────────────────────────────────────────────────────────
seed = 3908
n_petals = 6 # k in r = A|cos(k·θ/2)|
amplitude = 1.757216
n_points = 1000
# ── Data ────────────────────────────────────────────────────────────────────
theta = np.linspace(0.0, 2.0 * np.pi, n_points)
r = amplitude * np.abs(np.cos(n_petals * theta / 2.0))
# ── Plot ─────────────────────────────────────────────────────────────────────
fig, ax = plt.subplots(subplot_kw={"projection": "polar"}, figsize=(5, 5))
ax.plot(theta, r, linewidth=1.5)
ax.set_title(
f"Rose Curve (k={n_petals}, A={amplitude:.2f})", pad=15
)
fig.tight_layout()
plt.show()