Sim*_*mon 22 plot visualization wolfram-mathematica complex-numbers
如何创建一个Mathematica图形来复制sage 中complex_plot的行为?即
...获取一个变量的复杂函数,并在指定的xrange和yrange上绘制函数的输出,如下所示.输出的大小由亮度表示(零为黑色,无穷大为白色),而参数由色调表示(红色为正实,红色增加,黄色,......随着参数增加) .
这是zeta函数的一个例子(从中性漂移的M.Hilton那里偷来的),其覆盖的绝对值轮廓:

在数学文档页面功能复杂的变量,它说,你可以使用可视化复杂的功能ContourPlot和DensityPlot"潜在的阶段着色".但问题在于两种类型的图,ColorFunction只需要一个等于该点的轮廓或密度的变量 - 所以在绘制绝对值时,似乎不可能使相位/参数着色.请注意,这不是传递Plot3D所有3个参数的问题.(x,y,z)ColorFunction
我知道还有其他方法来可视化复杂的功能 - 例如Plot3D文档中的"简洁示例" ,但这不是我想要的.
此外,我确实有一个解决方案(实际上已经用于生成维基百科中使用的一些图形),但它定义了一个相当低级别的功能,我认为应该可以使用像ContourPlot或的高级函数DensityPlot.并不是说这应该阻止你提供你最喜欢的方法,使用较低级别的结构!
编辑: Michael Trott在Mathematica杂志上发表了一些很好的文章:
可视化代数函数的黎曼曲面,IIa,IIb,IIc,IId.
可视化黎曼曲面演示.
黎曼曲面的返回(Mma v6的更新)
当然,Michael Trott编写了Mathematica指南书,其中包含许多漂亮的图形,但似乎已经落后于加速的Mathematica发布时间表!
Bre*_*ion 20
这是我的尝试.我稍微有点了颜色功能.
ParametricPlot[
(*just need a vis function that will allow x and y to be in the color function*)
{x, y}, {x, -6, 3}, {y, -3, 3},
(*color and mesh functions don't trigger refinement, so just use a big grid*)
PlotPoints -> 50, MaxRecursion -> 0, Mesh -> 50,
(*turn off scaling so we can do computations with the actual complex values*)
ColorFunctionScaling -> False,
ColorFunction -> (Hue[
(*hue according to argument, with shift so arg(z)==0 is red*)
Rescale[Arg[Zeta[# + I #2]], {-Pi, Pi}, {0, 1} + 0.5], 1,
(*fudge brightness a bit:
0.1 keeps things from getting too dark,
2 forces some actual bright areas*)
Rescale[Log[Abs[Zeta[# + I #2]]], {-Infinity, Infinity}, {0.1, 2}]] &),
(*mesh lines according to magnitude, scaled to avoid the pole at z=1*)
MeshFunctions -> {Log[Abs[Zeta[#1 + I #2]]] &},
(*turn off axes, because I don't like them with frames*)
Axes -> False
]
Run Code Online (Sandbox Code Playgroud)

我没有想过让网格线颜色变化的好方法.最简单的可能就是用ContourPlot而不是生成它们MeshFunctions.
Sim*_*mon 15
这是我对Axel Boldt给出的功能的变化,他受Jan Homann的启发.两个链接的页面都有一些漂亮的图形.
ComplexGraph[f_, {xmin_, xmax_}, {ymin_, ymax_}, opts:OptionsPattern[]] :=
RegionPlot[True, {x, xmin, xmax}, {y, ymin, ymax}, opts,
PlotPoints -> 100, ColorFunctionScaling -> False,
ColorFunction -> Function[{x, y}, With[{ff = f[x + I y]},
Hue[(2. Pi)^-1 Mod[Arg[ff], 2 Pi], 1, 1 - (1.2 + 10 Log[Abs[ff] + 1])^-1]]]
]
Run Code Online (Sandbox Code Playgroud)
然后我们可以通过运行来制作没有轮廓的绘图
ComplexGraph[Zeta, {-7, 3}, {-3, 3}]
Run Code Online (Sandbox Code Playgroud)

我们可以通过使用并在ComplexGraph中显示特定的绘图网格来复制Brett来添加轮廓:
ComplexGraph[Zeta, {-7, 3}, {-3, 3}, Mesh -> 30,
MeshFunctions -> {Log[Abs[Zeta[#1 + I #2]]] &},
MeshStyle -> {{Thin, Black}, None}, MaxRecursion -> 0]
Run Code Online (Sandbox Code Playgroud)
或者通过结合等高线图
ContourPlot[Abs[Zeta[x + I y]], {x, -7, 3}, {y, -3, 3}, PlotPoints -> 100,
Contours -> Exp@Range[-7, 1, .25], ContourShading -> None];
Show[{ComplexGraph[Zeta, {-7, 3}, {-3, 3}],%}]
Run Code Online (Sandbox Code Playgroud)

不是一个正确的答案,原因有两个:
无论如何,对我来说,下面的解释要清楚得多(亮度是......好吧,只是亮度):

布雷特的代码几乎完好无损:
Plot3D[
Log[Abs[Zeta[x + I y]]], {x, -6, 3}, {y, -3, 3},
(*color and mesh functions don't trigger refinement,so just use a big grid*)
PlotPoints -> 50, MaxRecursion -> 0,
Mesh -> 50,
(*turn off scaling so we can do computations with the actual complex values*)
ColorFunctionScaling -> False,
ColorFunction -> (Hue[
(*hue according to argument,with shift so arg(z)==0 is red*)
Rescale[Arg[Zeta[# + I #2]], {-Pi, Pi}, {0, 1} + 0.5],
1,(*fudge brightness a bit:
0.1 keeps things from getting too dark,
2 forces some actual bright areas*)
Rescale[Log[Abs[Zeta[# + I #2]]], {-Infinity, Infinity}, {0.1, 2}]] &),
(*mesh lines according to magnitude,scaled to avoid the pole at z=1*)
MeshFunctions -> {Log[Abs[Zeta[#1 + I #2]]] &},
(*turn off axes,because I don't like them with frames*)
Axes -> False]
Run Code Online (Sandbox Code Playgroud)