Module: ZetaPathOverlayRS

Renders the ζ(½+it) spiral curve using the Riemann-Siegel formula This is much more accurate than the naive eta series approach
Author:
  • Radim Brnka
License:
  • MIT
Source:

Methods

(static) hide()

Hides the overlay
Source:

(static) init(canvasElement, fractalRenderer)

Initializes the zeta path overlay
Parameters:
Name Type Description
canvasElement HTMLCanvasElement The canvas element
fractalRenderer Object The renderer instance (for pan/zoom/terms)
Source:

(static) isVisible() → {boolean}

Source:
Returns:
current visibility state
Type
boolean

(static) resize()

Resizes the canvas and redraws
Source:

(static) setRenderer(fractalRenderer)

Sets the renderer reference (for when renderer changes)
Parameters:
Name Type Description
fractalRenderer Object
Source:

(static) show()

Shows the overlay
Source:

(static) toggle() → {boolean}

Toggles the overlay visibility
Source:
Returns:
New visibility state
Type
boolean

(static) update()

Updates the overlay (redraws if visible)
Source:

(inner) C0func(p) → {number}

C0 Riemann-Siegel coefficient function C0(p) = cos(2π(p² - p - 1/16)) / cos(2πp)
Parameters:
Name Type Description
p number Fractional parameter
Source:
Returns:
Type
number

(inner) C1func(p) → {number}

C1 Riemann-Siegel coefficient (first correction)
Parameters:
Name Type Description
p number
Source:
Returns:
Type
number

(inner) Z(t) → {number}

Riemann-Siegel Z function Z(t) = e^(iθ(t)) · ζ(½ + it) is real-valued Z(t) = 2·Σ_{n=1}^{N} n^(-1/2)·cos(θ(t) - t·ln(n)) + R(t)
Parameters:
Name Type Description
t number The imaginary part
Source:
Returns:
Z(t)
Type
number

(inner) draw()

Draws the zeta path curve w = ζ(½ + it) in the w-plane
Source:

(inner) remainder(p, t, N) → {number}

Riemann-Siegel remainder term Uses the first few correction terms for improved accuracy
Parameters:
Name Type Description
p number Fractional part: sqrt(t/(2π)) - N
t number The t value
N number The main sum limit
Source:
Returns:
Remainder correction
Type
number

(inner) theta(t) → {number}

Riemann-Siegel theta function using Stirling approximation θ(t) = arg(Γ(1/4 + it/2)) - (t/2)·log(π)
Parameters:
Name Type Description
t number The imaginary part of s = ½ + it
Source:
Returns:
theta(t)
Type
number

(inner) zeta(s, terms) → {Array.<number>}

Main zeta function for the path overlay
Parameters:
Name Type Default Description
s Array.<number> Complex number [re, im] (expects re ≈ 0.5)
terms number 100 Unused, kept for API compatibility
Source:
Returns:
Complex result [re, im]
Type
Array.<number>

(inner) zetaAccelerated(s, terms) → {Array.<number>}

Accelerated eta/zeta for small t using Euler acceleration
Parameters:
Name Type Description
s Array.<number> Complex [re, im]
terms number
Source:
Returns:
Complex zeta value
Type
Array.<number>

(inner) zetaDirectSmallT(t) → {number}

Direct zeta computation for small t (where Riemann-Siegel is inaccurate) Uses accelerated eta series
Parameters:
Name Type Description
t number
Source:
Returns:
Approximate Z(t)
Type
number

(inner) zetaFromZ(t) → {Array.<number>}

Compute ζ(½ + it) from Z(t) and θ(t) ζ(½ + it) = e^(-iθ(t)) · Z(t)
Parameters:
Name Type Description
t number
Source:
Returns:
Complex [re, im]
Type
Array.<number>