graphRiemannZeta.frink

Download or view graphRiemannZeta.frink in plain text format


/** This graphs the Riemann Zeta function along the critical line
    RiemannZeta[1/2 + i s] for real values of s.  This is probably the graph
    you have seen of the Riemann Zeta function.  Compare it to

 https://en.wikipedia.org/wiki/Riemann_zeta_function#/media/File:Zeta_polar.svg
*/

use RiemannZeta.frink
use Grid.frink

digits = 5
p = new polyline

start = now[]
for s = 0 to 34 step 0.01
{
   z = RiemannZeta.zeta[1/2 + i s, digits]
   p.addPoint[Re[z], -Im[z]]
}
end = now[]
println["Time: " + format[end-start, "s", 3]]

g = new graphics
g.stroke[0.0001]
g.add[p]

grid = new Grid
grid.auto[g]
g.add[grid.getGrid[]]

g.show[]
//g.print[]


Download or view graphRiemannZeta.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen, eliasen@mindspring.com