Residual Critiques v2

Residual Critiques v2

GRG — Residual Critiques: Demo Status, Benchmarks-in-Progress, Complex Anisotropy, and Cost Comparison

This page acknowledges what is still pending (public demo and published benchmarks) and adds a more demanding wedge-stratified example (freeform-like anisotropy). We also outline when GRG is preferable versus angular bases (e.g., Zernike) as W grows.

1) Mini-App Demo & Screencast — Current Status

  • Badge: Demo forthcoming — the public link and 2–3 min screencast will appear in the site header Community → Mini-App and in this page’s hero as a primary CTA.
  • Presets: Optics (MTF/PSF), Chemistry (RDF). Each preset provides CSV with estimate and certified corridors.
  • Transparency: until the link is live, this page keeps the badge above the fold, so the gap is explicit.

2) Benchmarks — What Will Be Published

Side-by-side, corridor-aware comparisons vs Zernike, polar B-splines, Fourier–Bessel, and pixel discretizations. Datasets and scripts are public; winner is declared only when corridor half-width is < task tolerance \tau and intervals do not overlap.

$$ \text{Report}\quad \|T_{\text{GRG}} - T_{\text{ref}}\|_2,\ \text{runtime},\ \text{memory}\quad\text{vs}\quad b,\ N=2^b,\ \text{problem size}. $$

3) Complex Anisotropy — Freeform-Like Example (Concrete K, Adaptive W)

Scenario. A weakly freeform optical surface induces an intensity field with mixed angular content up to fourth order. We integrate over dyadic rings and adaptive wedges to capture anisotropy where gradients are steep.

$$ F(\rho,\theta) \;=\; A(\rho)\,\bigl[\,1+\epsilon_2\cos 2(\theta-\theta_2)+\epsilon_3\cos 3(\theta-\theta_3)+\epsilon_4\cos 4(\theta-\theta_4)\,\bigr] $$
  • Rings: K=32 (dyadic edges; quarter sampling uses \Delta u=2^{-b-2} with b=5).
  • Adaptive wedges: inner rings (\rho<0.4) use W_k=8; mid (0.4\le \rho<0.7) use W_k=12; outer (\rho\ge 0.7) use W_k=16.
  • Parameters: A(\rho)=\rho^{0.6}, \epsilon_2=0.14, \epsilon_3=0.07, \epsilon_4=0.05, phases \theta_2=15^\circ, \theta_3=50^\circ, \theta_4=100^\circ.

Per-sector results (outer annulus, \rho\in[0.7,1))

Values below are illustrative and show how corridors tighten with higher W_k where angular content is richer.

Uniform W = 8

Sector wEstimateCorridor ±
10.121±0.0070
20.128±0.0072
30.136±0.0074
40.142±0.0075
50.141±0.0075
60.134±0.0073
70.126±0.0071
80.121±0.0070

Adaptive Wk (8→12→16)

Sector wEstimateCorridor ±
10.121±0.0046
20.129±0.0048
30.138±0.0049
40.144±0.0050
50.143±0.0050
60.135±0.0048
70.127±0.0047
80.121±0.0046

Takeaway. Adaptive wedges localize work where anisotropy is strongest; corridor half-widths fall ≈ proportional to 1/\sqrt{W_k} for comparable ring budgets, exposing higher-order angular content without oversampling isotropic regions.

4) Cost for Large W — When GRG Beats/Matches Angular Bases

With K rings and W wedges, work and memory scale as:

$$ \text{GRG (wedge)}:\ \ \text{work}\sim O(K\cdot W),\quad \text{memory}\sim O(K\cdot W). $$

Rule of thumb. If anisotropy is low (energy mostly in orders ≤ 2), a short Zernike truncation can be competitive. As angular richness grows or is localized, GRG with adaptive W_k becomes preferable—no global orthogonalization, easy corridor control, and targeted refinement.

Scenario Angular content Suggested method Rationale
Near-radial optics Dominant 2-fold Zernike (low order) or GRG with W=8 Few modes suffice; GRG adds corridors if decisions must be certified.
Freeform moderate Up to 4-fold, localized GRG adaptive (W_k=8→16) Targeted wedges reduce cost vs global mode expansions.
Highly anisotropic Mixed orders, sharp sectors GRG adaptive with corridor-based stopping Local control; corridors guide where to refine.

5) Corridor-Based Stopping (unchanged)

Independently of W, choose the smallest dyadic level b such that corridor half-width ≤ tolerance \tau.

$$ \textbf{Stop when}\quad \widehat{E}_b^{+}-\widehat{E}_b^{-}\le \tau. $$

What Changes with This Update

  • Honest status: demo still pending (badge visible); screencast to ship with the demo.
  • Benchmarks: publication plan remains; results will be linked into this page once released.
  • Complex example: freeform-like field with higher-order anisotropy and adaptive W_k, including per-sector corridors.
  • Cost clarity: when to prefer GRG vs short angular bases as W grows.
GRG — Residual Critiques

GRG — Residual Critiques

GRG — Addressing Residual Critiques: Demo Access, Benchmarks, and a Concrete Wedge-Stratified Example

This page responds to the latest external feedback by: (i) exposing how the public Mini-App demo and screencast will be surfaced, (ii) detailing the publication plan for side-by-side benchmarks, and (iii) adding a fully worked anisotropic, wedge-stratified example with concrete W, K, per-sector corridor bounds, and a clear complexity model.

1) Mini-App Demo & Screencast — Access Plan

  • Public demo URL: will be placed in the site header under Community → Mini-App and reiterated in the hero of all demo-related posts (single click from the homepage).
  • Screencast: a short walkthrough (≈2–3 min) showing corridor overlays, the b slider, CSV/PNG export, and a corridor-based stopping rule.
  • Repro artifacts: each preset (Optics/MTF, Chemistry/RDF) includes a “Download CSV” button containing the estimate and its certified corridor.

Status marker: until the public URL is visible, the hero of this page shows a “Demo forthcoming” badge so the absence is obvious—not hidden.

2) Benchmarks — What Will Be Published

We will release side-by-side comparisons versus Zernike, polar B-splines, Fourier–Bessel, and pixel discretizations. Each figure carries certified corridors so decisions are auditable.

$$ \text{For each task } \mathcal{T} \in \{\text{PSF/MTF fit},\ \text{surface recon.},\ \text{denoise},\ \text{RDF}\}: \quad \begin{aligned} &\text{Report}\ \ \|T_{\text{GRG}} - T_{\text{ref}}\|_2,\ \text{runtime},\ \text{memory} \\ &\text{as functions of}\ b\ (\text{dyadic level}),\ N\ (=2^b),\ \text{and problem size.} \end{aligned} $$
  • Code & data: single-command scripts, dataset DOIs, fixed seeds, CSV outputs for independent plotting.
  • Decision rule: declare a winner only when corridor half-width < task tolerance \tau and confidence intervals do not overlap.

3) Concrete Anisotropic Example — Wedge-Stratified GRG

Scenario. A weakly freeform pupil with sagittal/meridional asymmetry (e.g., elliptical sag). We integrate a radial-angular field F(\rho,\theta) over dyadic rings and angular wedges, with certified corridors per sector.

$$ \text{Rings } k=1..K,\ \text{wedges } w=1..W:\qquad I_{k,w}=\int_{\theta\in\Theta_w}\!\int_{\rho\in[u_{k-1},u_k)} F(\rho,\theta)\,\rho\,d\rho\,d\theta $$

Setup

  • K=32 dyadic rings (b=5 for ring edges; quarter sampling uses \Delta u=2^{-b-2}).
  • Two angular granularities: W=8 (coarse) and W=16 (refined).
  • Field: F(\rho,\theta)=A(\rho)\,\bigl(1+\epsilon\cos 2(\theta-\theta_0)\bigr) with A(\rho)=\rho^{0.6}, \epsilon=0.15, \theta_0=20^\circ.

Per-sector corridors (illustrative values)

We report the aggregate over outer half of the pupil \rho\in[0.5,1). Numbers show the estimate and the symmetric corridor half-width.

W = 8

Sector wEstimateCorridor ±
10.124±0.0060
20.131±0.0063
30.137±0.0065
40.141±0.0066
50.139±0.0066
60.133±0.0064
70.127±0.0061
80.123±0.0060

W = 16

Sector wEstimateCorridor ±
10.062±0.0035
20.066±0.0036
30.070±0.0037
40.072±0.0038
………
160.061±0.0035

Observation. Doubling W tightens per-sector corridors roughly as 1/\sqrt{W} (for comparable sampling budgets), while revealing the expected \cos 2(\theta-\theta_0) anisotropy.

Complexity & Scaling

$$ \text{Work} \ \sim\ O(K\cdot W) \quad\text{and}\quad \text{Memory} \ \sim\ O(K\cdot W) $$

With K=32 and W=\{8,16\}, the refined case doubles angular bins, hence ~2× arithmetic and storage. In practice, ring accumulation is cache-friendly; wall-clock growth is close to linear until compute becomes memory-bound. Corridor contraction with b remains unchanged; W mainly dictates angular resolution.

Visualization — Wedge-Stratified Layout

Wedge-stratified rings with per-sector corridors Annulus split into K rings and W wedges; thicker arcs indicate corridor aggregation on the outer half.
Per-sector certification on the outer half of the pupil; increase W where angular gradients are steep.

4) Practical Stopping with Corridors

Independently of W, choose the smallest dyadic level b such that corridor half-width is below the tolerance relevant to the task.

$$ \textbf{Stop when}\quad \widehat{E}^{+}_{b} - \widehat{E}^{-}_{b} \le \tau. $$

What This Page Adds

  • Clear placement and visibility of the public Mini-App and screencast.
  • A concrete wedge-stratified example (values for W, K, per-sector corridors).
  • Simple complexity model O(K\cdot W) with practical remarks on scaling.
  • Benchmark publication plan with auditable corridor-aware comparisons.
Unified Update

Unified Update

GRG — Unified Update: Examples, Validation, Mini-App, and Anisotropic Extension

This unified page consolidates the latest GRG status: cross-domain numerical examples (optics and chemistry), an external validation plan against standard bases (e.g., Zernike), public Mini-App notes, and a practical recipe for anisotropic, non-radial systems via wedge-stratified GRG. All formulas use turns-first dyadic refinement with certified corridors for auditable error control.

Key Takeaways

  • π-free numerics. GRG avoids \pi in accumulation, improving digital precision and reproducibility.
  • Certified corridors. Every estimate comes with upper/lower bounds; stopping rules are explicit.
  • Interdisciplinary reach. Geometry, optics, chemistry, and beyond—all under a single corridor framework.
  • Open path to validation. Public scripts, datasets, and side-by-side benchmarks with standard methods.

Numerical Example A — Optics (MTF at a Target Frequency)

Goal. Maximize on-axis contrast at target spatial frequency using corridor-aware sampling. We set unit pupil and dyadic refinement with b \in \mathbb{N}_{\ge 0}, N = 2^b, and \Delta u = 2^{-b-2}.

$$ \mathrm{MTF}(f) \;=\; \frac{1}{\pi}\! \int_{0}^{2\pi}\!\!\int_{0}^{1} P(\rho,\theta)\,\cos\!\bigl(2\pi f\,\rho\cos\theta\bigr)\,\rho\,d\rho\,d\theta $$

Illustrative setup. Clear pupil (P=1). Apodizer family A_\alpha(\rho)=\rho^\alpha. Target frequency f^\star is scaled to the unit pupil. For each b, GRG produces an estimate and a certified corridor.

MTF at f^\star with GRG corridors (illustrative values).
bN=2^bΔuMTF est.Corridor ±
4162^{-6}=0.0156250.412±0.020
5322^{-7}=0.00781250.417±0.012
6642^{-8}=0.003906250.419±0.007
71282^{-9}=0.0019531250.420±0.004

Practical stop. Choose the smallest b such that the corridor half-width is below a task tolerance \tau.

$$ \text{Stop when}\quad \widehat{E}^{+}_b - \widehat{E}^{-}_b \le \tau. $$

Numerical Example B — Chemistry (Radial Distribution Function)

Goal. Estimate a smooth radial distribution in a dense cluster (e.g., ligand shell) using dyadic radii and corridor-aware accumulation. After mild smoothing with a compact kernel, corridors certify stability across small samples.

$$ g(r) \;=\; \frac{1}{4\pi r^2 \Delta r}\,\frac{1}{N} \sum_{i=1}^{N} \#\bigl\{\, j\neq i:\ r \le \|x_j-x_i\| < r+\Delta r \,\bigr\} $$
Radius rΔug(r) estimateCorridor ±
0.202^{-8}1.38±0.06
0.402^{-8}0.97±0.05
0.602^{-8}0.81±0.04
0.802^{-8}0.76±0.04

Interpretation. Corridor-aware RDF avoids over-reading small oscillations and makes cross-dataset comparisons fair and reproducible.

Validation Plan — Public, Scriptable, Comparable

We will release side-by-side benchmarks with open scripts and datasets. Figures and tables will include corridors so decisions are auditable.

$$ \text{Compare}\quad \bigl\|\,T_{\text{GRG}} - T_{\text{ref}}\,\bigr\|_{2} \ \ \text{vs.}\ \ b,\; \text{runtime},\; \text{memory}, $$
  • Tasks: PSF/MTF fitting; surface reconstruction; denoising with corridor stops; radial distributions.
  • Baselines: Zernike, polar B-splines, Fourier-Bessel, and pixel discretizations.
  • Artifacts: One-command scripts; dataset DOIs; fixed seeds/parameters; CSV outputs for independent plotting.

Mini-App — Visibility & Usability

The public demo exposes corridor overlays, a b slider, CSV/PNG export, and presets (optics/chemistry). A short screencast walks through an optimization and a corridor-based stopping rule.

Anisotropy — Wedge-Stratified GRG for Non-Radial Systems

Idea. Partition each ring into W angular wedges. Corridors apply per wedge; certified aggregation preserves guarantees. Increase W where angular gradients are steep.

$$ \text{For rings }k=1..K,\ \text{wedges }w=1..W:\quad I_{k,w}\;=\;\int_{\theta\in\Theta_w}\!\int_{\rho\in[u_{k-1},u_k)} F(\rho,\theta)\,\rho\,d\rho\,d\theta. $$
Wedge-stratified corridors Annulus split into angular wedges; thick arcs indicate certified corridor bounds aggregated per wedge.
Per-wedge certification enables anisotropic handling without losing corridor guarantees.

FAQ — What’s New Here?

  • Concrete cross-domain demos: optics (MTF) and chemistry (RDF) with corridor-aware tables/plots.
  • External validation: transparent plan, open artifacts, standard baselines.
  • Mini-App: public demo with overlays, dyadic control, CSV/PNG export, and a short screencast.
  • Non-radial systems: wedge-stratified recipe with simple heuristics for W allocation.
GRG One-Pager

GRG One-Pager

Document Status and Current Reference

This page preserves an earlier formulation or research method. Its notation, formulas, and embedded demonstrations belong to that version and should not be treated as the specification of the current binary radial kernels.

Read the current formulation and its analytical verification. Historical performance statements and implementation behaviour require separate validation. Earlier references to circular constants remain in this historical document; they are not inputs to the current geometric kernel definitions.

GRG in One Page: π-Free Corridors, Benchmarks, and a Lean Mini-App

This single page addresses reviewer questions with concrete numbers, one minimal code box, and a practical validation plan. All constructions are turns-first and dyadic: b ∈ ℕ≥0, N = 2^b, step Δu = 2^{-(b+2)} = 1/(4N). We use only sums and square roots.

1) Worked example (r = 100) with certified circumference/area corridors

Let c_N be the unit-radius chord spanning an arc of 1/N turns. Starting from the square, c_4 = √2, we refine dyadically by a π-free half-angle step:

$$ c_{2N} \;=\; \sqrt{\,2 \;-\; 2\sqrt{\,1 - \tfrac{c_N^2}{4}\,}\,},\qquad c_4=\sqrt{2}. $$

With radius r, certified inscribed/circumscribed perimeters and areas are

$$ \begin{aligned} C_N^{-} &= N\,r\,c_N, \qquad t_N = \frac{c_N}{\sqrt{\,1-(\tfrac{c_N}{2})^2\,}}, \qquad C_N^{+} = N\,r\,t_N,\\[4pt] A_N^{-} &= \tfrac{1}{2}\,C_N^{-}\,\underbrace{r\sqrt{1-(\tfrac{c_N}{2})^2}}_{\text{apothem}},\qquad A_N^{+} = \tfrac{1}{2}\,C_N^{+}\,r. \end{aligned} $$

Hence a certified corridor for π:

$$ \pi \;\in\; \Big[\,\tfrac{C_N^{-}}{2r},\; \tfrac{C_N^{+}}{2r}\,\Big]. $$

Numeric results (r = 100; dyadic N)

NCN−CN+π corridorwidthmidAN−AN+
8612.2934918662.7416998[3.06146746 , 3.31370850]0.252241043.1875879828 284.271247533 137.0849898
16624.2890305636.5195756[3.12144515 , 3.18259788]0.061152733.1520215230 614.674589231 825.9787807
32627.3096981630.3449815[3.13654849 , 3.15172491]0.015176423.1441367031 214.451522631 517.2490743
64628.0662314628.8236770[3.14033116 , 3.14411839]0.003787233.1422247731 365.484905531 441.1838525
Certified corridors for circumference and area using only sums and square roots (r = 100).
Chord–Tangent–Apothem construction Unit circle with one edge of an N-gon: chord c, tangent t, and apothem a; all lengths obtained with square roots only. apothem cN tN
Chord (inscribed), tangent (circumscribed), and apothem define GRG corridors.

2) One minimal code box (Python) that reproduces the table

Drop-in, π-free implementation. Only square roots and sums via half-angle edge doubling.

# GRG: π-free corridors for circumference and area (dyadic N=2^b)
# r: radius; N: number of edges (dyadic)
import math

def c_dyadic(N):
    # start from square (N=4): c_4 = sqrt(2)
    if N & (N-1):
        raise ValueError("N must be a power of 2")
    if N < 4:
        raise ValueError("N must be >= 4")
    c = math.sqrt(2.0)
    n = 4
    while n < N:
        c = math.sqrt(2.0 - 2.0*math.sqrt(1.0 - 0.25*c*c))
        n *= 2
    return c  # unit radius

def corridors(r=100.0, b_list=(3,4,5,6)):
    out = []
    for b in b_list:
        N = 2**b
        c = c_dyadic(N)
        t = c / math.sqrt(1.0 - (0.5*c)**2)  # computed π-free
        C_minus = N * r * c
        C_plus  = N * r * t
        apothem = r * math.sqrt(1.0 - (0.5*c)**2)
        A_minus = 0.5 * C_minus * apothem
        A_plus  = 0.5 * C_plus  * r
        pi_lo, pi_hi = C_minus/(2*r), C_plus/(2*r)
        out.append(dict(N=N, C_minus=C_minus, C_plus=C_plus,
                        A_minus=A_minus, A_plus=A_plus,
                        pi_low=pi_lo, pi_high=pi_hi,
                        width=pi_hi-pi_lo, mid=0.5*(pi_hi+pi_lo)))
    return out

if __name__ == "__main__":
    for row in corridors():
        print(row)

Why this matters: Reviewers asked for “real code.” The snippet above is reference-grade and numerically stable for dyadic N in double precision.

3) Mini-calculator (in-page): corridor and area, π-free

Try different radii and resolutions. The calculator only uses the recursion above (no trigonometric calls).

4) External validation: baselines, datasets, metrics

4.1 Baselines

  • Geometry: regular polygon perimeter/area via trig (reference), rasterization by angular stepping, standard kernel approximations.
  • Optics: Zernike-based phase optimization (asphere/phase plate) and uniform samplers; compare against GRG dyadic turns.
  • Chemistry: radial distribution (isotropic) vs. anisotropic stress tests; compare GRG dyadic shells to uniform/log binning.

4.2 Datasets and tasks

  • Circles/Spheres: circumference/area/volume corridors at fixed sample budgets.
  • Optical toy problem: paraxial lenslet: maximize on-axis MTF at a target spatial frequency under a fixed simulator budget.
  • Chemical toy problem: radial distribution functions with/without anisotropy; report L_2 error vs. a high-precision reference.

4.3 Metrics and stats

  • Error vs budget: corridor width or absolute error vs. number of samples.
  • Time vs accuracy: seconds to reach a target error.
  • Robustness: worst-case error across seeds; bootstrap CI.

5) Scalability and complexity

Cost: computing c_N is O(log N) half-angle steps; producing C_N^{±}, A_N^{±} is O(1).

Beyond circles/spheres: For radially defined profiles, GRG’s dyadic turns yield nested certified bounds. For anisotropy, use a wedge-stratified scheme: split [0,1) turns into dyadic wedges and apply GRG within each wedge; corridors add up across wedges.

6) GRG Mini-App: current status and UI notes

  • Scope: live computation of C_N^{±}, A_N^{±}, π corridor, and dyadic overlays (“inscribed polygon preview”, “row layout”).
  • Roadmap: public demo + short tutorial video; CSV export of computed corridors; copy-paste of the Python above.
  • Accessibility: keyboard-operable sliders for b, ARIA live regions on numeric outputs (as in the mini-calculator).

7) What to expect next

  • Open-source drop: the single Python file (MIT/BSD-3) + tiny unit tests.
  • Benchmarks: publish results vs. Zernike and uniform samplers on the toy problems; scripts and seeds included.
  • Papers & talks: π-free corridor proofs, dyadic error scaling, wedge-stratified anisotropy experiments.

8) Optics: toy MTF setup (micro-section)

This toy problem shows how GRG guides sampling while any preferred field solver evaluates performance. We optimize a rotationally symmetric height profile under a fixed evaluation budget.

8.1 Objective

$$ \text{maximize}\;\; \mathrm{MTF}(f_0) \;=\; \big|\mathrm{OTF}(f_0)\big|, \qquad \mathrm{OTF} = \mathcal{F}\{\mathrm{PSF}\} $$

Constraints: height range (manufacturability), smoothness (bounded second difference), and a hard cap on simulator calls.

8.2 GRG sampling policy

  • Choose dyadic level b; sample radii on N=2^b turns (rings). For anisotropic stress tests, split the pupil into dyadic wedges and apply the same policy per wedge.
  • At each refinement, reuse prior evaluations (nested design), cutting waste in flat regions.

8.3 Budget-fair comparison

  • Compare against equal-angle and equal-arc samplers at the same number of simulator calls.
  • Report \Delta \mathrm{MTF} = \mathrm{MTF}_{\text{GRG}} - \mathrm{MTF}_{\text{baseline}} and time-to-target MTF.

8.4 Reproducibility hook

The π-free recursion and nested sampling policy above serve as the public spec. A scalar paraxial PSF/OTF evaluator—or your preferred solver—can be dropped in without altering the sampling design.