Nice complex 3D surface plotting with discretized color for arg
- To: mathgroup at smc.vnet.net
- Subject: [mg123506] Nice complex 3D surface plotting with discretized color for arg
- From: Chris Young <cy56 at comcast.net>
- Date: Fri, 9 Dec 2011 05:56:57 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
The following plots the Zeta function, but it could be used with any complex function. The trick to getting smooth discrete color bands for the argument values is to pick a mesh value one less than the number of color bands. In this case, I have 12 color bands, set in the ColorFunction, and I have 11 mesh lines for the argument (i.e., the angle of the complex function). Here, I've picked the colors to run from red to purple as the argument runs from -pi to pi. A notebook file is at http://home.comcast.net/~cy56/RiemannZeta.nb and pictures are at http://home.comcast.net/~cy56/RiemannZeta1.png http://home.comcast.net/~cy56/RiemannZeta2.png http://home.comcast.net/~cy56/RiemannZeta3.png Plot3D[ Abs[Zeta[x + y I]], {x, -10, 10}, {y, -10, 40}, PlotRange -> {0, 10}, BoxRatios -> {2, 5, 1}, PlotPoints -> 100, MaxRecursion -> 1, ColorFunctionScaling -> False, ColorFunction -> ( {x, y} \[Function] Hue[ \[LeftFloor]12 Rescale[ Arg[Zeta[x + y I]], {-Pi, Pi}, {0, 1}]\[RightFloor]/12, 0.5, Rescale[Abs[Zeta[x + y I]], {0, 6}, {1, 0.5}] ] ), MeshFunctions -> { ({x, y} \[Function] Arg[Zeta[x + y I]]), ({x, y, z} \[Function] z) }, Mesh -> {11, 50}, MeshStyle -> {Gray, White}, Axes -> True, AxesLabel -> {"x", "y", "z"} ]