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.

Parameters

Parameters

Parameters and Notation

This page defines the current circle-kernel conventions. Historical methods may use other conventions; their symbols must be interpreted locally.

Geometric Scale

R is the positive radius. N is the number of complete sectors across one Turn. Binary depth b gives N = 2ᵇ; the nondegenerate chord–tangent kernels require b ≥ 2.

Angular Steps

The complete sector width is 1/N Turn, its half-width is 1/(2N), and the quarter-step parameter is 1/(4N). If M counts samples in a quarter of the full Turn, state explicitly how M relates to N; do not use the same symbol for both counts.

Local Geometry

a is the chord apothem, h the half-chord, and e the half-tangent side. The geometric ratios are c = a/R, s = h/R, and q = h/a.

Implementation Parameters

Specify arithmetic format, rounding, construction procedure, stopping rule, and any stored tables. Additional parameters for adaptive or noncircular methods require their own definitions.

Full definitions and formulas.

Radius, Rotation, Arc

Radius, Rotation, Arc

Generative Radial Geometry: Radius, Rotation, and Arc Length

Generative Radial Geometry (GRG) provides a discrete, π-free, constructive method to generate circles, spheres, and related shapes. Instead of assuming π and continuous formulas, GRG builds geometry from radial divisions, summing chords and trapezoids. This creates a radically different perspective compared to the classical approach. Angles are expressed as fractions of the turn ($u\in[0,1)$).

Why GRG Matters

Classical geometry relies on π and continuous trigonometric functions. GRG, in contrast, is digital-native: it works with finite steps, exact points on the circumference, and simple arithmetic operations. This makes it both conceptually new and computationally efficient.

Core Comparison

The table below highlights the key differences between the two approaches.

Aspect Classical Approach Generative Radial Geometry (GRG)
Definition of angle Radians \((s=r\theta)\) with \(\pi\). Angle = discrete fraction \(k/N\) of the turn \((u\in[0,1))\), generated internally.
Mathematical tools Trigonometry, sine/cosine, continuous integrals. Finite sums of chords and trapezoids; additions and square roots.
Points on the circle Require trig functions (numerically approximated). Exact by construction on generated radial sets \((x^2+y^2=R^2)\).
Lengths and areas Closed forms: \(s=r\theta\), \(A=\pi R^2\). Generated sums: \(L=\sum \ell_i\), \(A=\sum A_i\); \(\pi\) emerges as a limit.
Local error None in theory, but depends on \(\pi\)/trig numeric precision. Error only from finite sums; boundary points remain exact.
Extension to 3D New formulas needed (e.g., \(V=\tfrac{4}{3}\pi R^3\)). One constructive scheme extends to surfaces and volumes.
Computational efficiency Expensive trig; slower on low-level hardware. Roots + sums; friendly to SIMD/GPU and embedded devices.
Concept of \(\pi\) \(\pi\) assumed a priori. \(\pi\) appears from the discrete generative process.
Conceptual view Geometry as a static entity to be measured. Geometry as an internal, generative process.

Three GRG Modes

On this page we use three operational modes. Two are Cartesian and compute area on a quarter (by symmetry). One is radial and computes circumference on the full turn.

Mode Target Partition Element Estimate Formula (sketch) Notes
Δx Trapezoidal (Cartesian) Area Quarter, \(x_i=i\,\Delta x\), \(\Delta x=R/N\) Trapezoids between heights \(h_i=\sqrt{\,R^2-x_i^2\,}\) Lower (under-tiling) \(A_Q \approx (\Delta x/2)\sum(h_i+h_{i+1})\); total area \(=4\,A_Q\) Monotone ↑ with \(N\)
Projection Corridor (Cartesian) Area Quarter, same \(\Delta x\) Riemann-like bars at right / midpoint Lower/Upper (squeezing) \(A_Q^{\downarrow}=\Delta x\sum h_i\), \(A_Q^{\uparrow}=\Delta x\sum h_{i+\tfrac12}\); total \(=4\times\) Certified bounds
Chord-Sum at \(\Delta u\) (Radial) Circumference Full turn, \(\Delta u=1/N\) Chords between consecutive radial points Lower (inscribed polygon) \(L \approx N\,R\,\sqrt{\,2-2\,c(1/N)\,}\) No quarter; defined on the whole circle
Note on “quarters”. The quarter is used only for the Cartesian area modes (by symmetry). For circumference we operate on the full turn (radial partition), so “quarters” are not meaningful there.

Further Evaluations & Options

  • Certified area bounds. The corridor (right vs midpoint) yields lower/upper bounds that squeeze the exact area as \(N\) grows.
  • Stronger circumference bracketing. Pair the inscribed chord-sum (lower) with a circumscribed tangent-sum (upper) to bound the true length.
  • Adaptive refinement. Increase \(N\) only where variation is largest (near endpoints for Cartesian area; uniform \(\Delta u\) usually suffices for chords).
  • Hybrid pipelines. Use circumference from chords to cross-check the discrete derivative of area w.r.t. \(R\).
  • 3D extension. The same logic generalizes to spherical belts (length) and frusta/patch sums (area/volume) with discrete radial partitions.
  • Hardware efficiency. All modes need only sums and square roots → ideal for embedded, SIMD, and GPU kernels.

Conclusions

Classical geometry excels in closed-form elegance. GRG complements it with a digital-native, constructive view: exact boundary points, sums that converge without assuming π, and a single scheme that scales from 2D to 3D. Here we use three GRG modes—two Cartesian for area on a quarter, one radial for circumference on the full turn—unlocking certified bounds, adaptive strategies, and hardware-friendly implementations.

Turns & Precision

Turns & Precision

Turns & Precision

This page formalises the angle unit used across ERG/GRG. Angles are measured in turns (fractions of a full rotation). We also define a binary fixed-point representation for hardware/software precision.

Angle unit (turns)

A full rotation is \(1\) turn. Quarter-turn \(= \tfrac{1}{4}\), half-turn \(= \tfrac{1}{2}\), etc. Trigonometric functions are period-1 in turns: \(c(u),\, s(u)\) with \(c(0)=1,\ s(0)=0,\ c(\tfrac{1}{4})=0,\ s(\tfrac{1}{4})=1\).

Equal-angle partition (N sectors)

Choose the number of sectors \(N\) and set the step \(\Delta u = \tfrac{1}{N}\). Sampling angles: \(u_k = \tfrac{k}{N}\), \(k=0,\dots,N-1\).

Binary fixed-point turns (B bits)

Store angles as \(u = \tfrac{k}{2^{B}}\) turns with \(k \in \{0,\dots,2^{B}\!-\!1\}\). The angular resolution is \(\Delta u_B = 2^{-B}\). To get exactly \(N\) equal sectors, pick \(N\) dividing \(2^{B}\) (e.g. \(N=2^{B}\)). Then use indices \(k = m\,j\) with \(m = \tfrac{2^{B}}{N}\), \(j=0,\dots,N-1\).

0 1/8 1/4 3/8 1/2 5/8 3/4 7/8
Example with \(B = 3\) bits ⇒ \(2^{3}=8\) ticks. Increasing \(B\) doubles the ticks and the precision.

Why more bits ⇒ more accuracy

  • Circumference (chords): \( C_N \;=\; 2\,N\,r\, s\!\bigl(\tfrac{1}{2N}\bigr) \) is the inscribed \(N\)-gon perimeter; as \(N\) doubles, the step halves and the error typically drops ≈ \(\times 4\).
  • Area (sectors): \( A_N \;=\; \tfrac{N}{2}\,r^{2}\, s\!\bigl(\tfrac{1}{N}\bigr) \) behaves similarly (step-squared).

Quick reference

Inline: \( \Delta u = \tfrac{1}{N},\quad u_k = \tfrac{k}{N},\quad u = \tfrac{k}{2^{B}},\quad \Delta u_{B} = 2^{-B} \).
Display:

$$ C_{N} \;=\; 2\,N\,r\, s\!\Bigl(\frac{1}{2N}\Bigr), \qquad A_{N} \;=\; \frac{N}{2}\,r^{2}\, s\!\Bigl(\frac{1}{N}\Bigr). $$

Implementation notes

  • Keep an angle register \(k\) modulo \(2^{B}\) (wrap-around on \(B\) bits).
  • For LUTs of size \(2^{M}\) with \(M \le B\), index by \(k \gg (B-M)\).
  • Step-doubling check: compare \(N\) vs \(2N\) to gauge the remaining gap.
ERG – Radial (Turns)

ERG – Radial (Turns)

ERG — Radial (Turns)

Method block (turns-based). Angles are measured in turns (fractions of a full rotation, u∈[0,1)). We write c(u), s(u) for period-1 cosine/sine in turns (so c(0)=1, s(0)=0; c(1/4)=0, s(1/4)=1). No sexagesimal units and no external constants appear in the primary formulas.

Radial node

For a circle of radius r and an angle u (turns):

$$ P(u) \;=\; \bigl(r\,c(u),\; r\,s(u)\bigr), \qquad u\in[0,1). $$

Uniform partition over the full turn: $u_k = k/N$, step $\Delta u = 1/N$.

Fig. A — Radial node with turns arc Axes, a circle, two radii separated by an angle u in turns, an arc marking u, and the point P(u). u P(u) O
Fig. A — Radial point $P(u)=(r\,c(u),\,r\,s(u))$ with angle $u$ expressed in turns.

Circumference (equal-angle chords)

Each chord between $P(u_k)$ and $P(u_{k+1})$ has length $2r\,s(\Delta u/2)$. Sum of $N$ identical chords → product:

$$ \boxed{\,C_N \;=\; 2\,N\,r\,s\!\Bigl(\tfrac{1}{2N}\Bigr)\,} $$

Interpretation: inscribed regular $N$-gon; $C_N$ increases with $N$ and converges to the circle’s circumference.

Fig. B — Regular N-gon from equal-angle chords (N=12) Circle of radius 100 with twelve equal-angle chords forming an inscribed regular polygon. N = 12, Δu = 1/N
Fig. B — Equal-angle chords tile the full turn (regular $N$-gon).

Area (equal-angle sectors)

The $N$ isosceles sectors (sides $r,r$ and angle $\Delta u$) each have area $\tfrac12 r^2 s(\Delta u)$. Sum → product:

$$ \boxed{\,A_N \;=\; \tfrac{N}{2}\,r^2\,s\!\Bigl(\tfrac{1}{N}\Bigr)\,} $$

$A_N$ increases with $N$ and converges to the circle’s area.

Fig. C — Sectors at equal angular step Two illustrative sectors on a circle, approximately 1/8 turn each, showing area by equal-angle sectors. Δu = 1/N (turns)
Fig. C — Area by sectors at equal angular step (sum of identical pieces).

How to use

  • Pick a precision N (e.g., 128–1024). If you store angles as fixed-point turns k/2^B, choose N dividing 2^B.
  • Step-doubling check: compare results at N vs 2N to gauge the remaining gap.

Pseudocode (2D)

Input: r, N
C = 2 * N * r * s( 1 / (2*N) )
A = 0.5 * N * r^2 * s( 1 / N )
  

Notes

  • Turns keep formulas simple and hardware-friendly (fixed-point angle indices, LUTs, SIMD).
  • Use this block when you want a pure angular build; for Cartesian builds see Δx Trapezoidal and Original Projection pages.

Angle unit & precision (turns, binary fixed-point)

We measure angles in turns: a full rotation is 1 turn. Hence quarter-turn = 1/4, half-turn = 1/2, etc. Trigonometric functions are period-1 in turns: c(u), s(u) with c(0)=1, s(0)=0, c(1/4)=0, s(1/4)=1.

Equal-angle partition

Choose an integer N (number of sectors) and set the angular step Δu = 1/N. The sampling angles are uk = k/N, k=0,…,N−1.

Binary fixed-point turns (B bits)

For hardware/software precision, store angles as u = k / 2^B turns with k ∈ {0,…,2^B−1}. The angular resolution is ΔuB = 1 / 2^B. If you want exactly N equal sectors, pick N that divides 2^B (e.g., N = 2^B), and use indices k = m·j with m = 2^B / N, j = 0,…,N−1.

Why more bits ⇒ more accuracy

  • Circumference (chords): CN = 2 N r · s(1/(2N)) is the perimeter of the inscribed regular N-gon and increases to the circle’s circumference. With N=2^B, the step halves when B→B+1 and the error typically drops ~×4 (quadratic in the step).
  • Area (sectors): AN = ½ N r² · s(1/N) is the area of N equal sectors and increases to the circle’s area; same step-squared behaviour.
0 1/8 1/4 3/8 1/2 5/8 3/4 7/8
Example with B = 3 bits ⇒ 23 = 8 ticks. Increasing B doubles the ticks and the precision.

Pseudocode (B-bit angles)

Input: r, B
N = 1 << B            // N = 2^B sectors
C = 2 * N * r * s( 1.0 / (2 * N) )
A = 0.5 * N * r^2 * s( 1.0 / N )

Implementation tip: if you keep an angle register k modulo 2^B, additions are wrap-around on B bits. For LUTs of size 2^M with M ≤ B, you can index by k >> (B−M).