A community-maintained Python framework for creating mathematical animations.
Slight changes to zeta implementation, along with SolveZeta Scene
Grant Sanderson2d55673850ef
diff --git a/active_projects/WindingNumber.py b/active_projects/WindingNumber.pyindex a439f25cb..7c9225db1 100644--- a/active_projects/WindingNumber.py+++ b/active_projects/WindingNumber.py@@ -540,12 +540,19 @@ def point3d_func_from_complex_func(f):return point3d_func_from_plane_func(plane_func_from_complex_func(f))def plane_zeta((x, y)):- answer = mpmath.zeta(complex(x, y))CLAMP_SIZE = 1000+ z = complex(x, y)+ try:+ answer = mpmath.zeta(z)+ except ValueError:+ return (CLAMP_SIZE, 0)if abs(answer) > CLAMP_SIZE:answer = answer/abs(answer) * CLAMP_SIZEreturn (float(answer.real), float(answer.imag))+def rescaled_plane_zeta((x, y)):+ return plane_zeta((x/SPACE_WIDTH, 8*y))+# Returns a function from 2-ples to 2-ples# This function is specified by a list of (x, y, z) tuples,# and has winding number z (or total of all specified z) around each (x, y)@@ -2293,4 +2300,20 @@ class ZetaViz(PureColorMap):#"num_plane" : criticalStrip,"show_num_plane" : True}++class RescaledZetaViz(PureColorMap):+ CONFIG = {+ "func" : rescaled_plane_zeta,+ #"num_plane" : criticalStrip,+ "show_num_plane" : True+ }++class SolveZeta(EquationSolver2d):+ CONFIG = {+ "func" : rescaled_plane_zeta,+ "num_iterations" : 7,+ "display_in_parallel" : False,+ "use_fancy_lines" : True,+ }+# FIN\ No newline at end of file