I found this plot on Wikipedia:
which is the plot of the
multi-valued imaginary part of the complex logarithm function, which shows the branches.
So I tried to reproduce myself with the code:
myGradient = (Blend[{{0.345556, RGBColor[0.985, 0., 0.870436]}, {0,
RGBColor[0.359518, 0., 0.81767]}, {1,
RGBColor[0.443748, 1., 0.0305638]}, {0.572157,
RGBColor[0.985946, 0., 0.0269474]}, {0.79284,
RGBColor[1., 1., 0.041413]}}, #3] &);
Plot3D[{Im[Log[x + I y]], Im[Log[x + I y]] + 2 Pi,
Im[Log[x + I y]] + 4 Pi},
{x, -4, 4}, {y, -4, 4},
BoxRatios -> {1, 1, 1},
ImageSize -> Medium,
Mesh -> 25,
ColorFunction -> myGradient
]
which produces the output:
As you can notice I wasn't able to reproduce the curvy grid, which, instead, is the normal square grid of the Plot3D
function. Further mor I have those strange white spaces which I would like to cover, to obtain an image the more similar to the one on Wikipedia.
Some ideas?
EDIT:
I already read this question but by plotting with that code the Log[z]
function I obtain this result:
which is clear not what I want.
z
do the mesh lines you want follow? The wikipedia page isn't clear on that. $\endgroup$MeshFunctions -> {#1^2 + #2^2 &, ArcTan[#2, #1] &}
as an option in thePlot3D
call? That might not be quite it, but if you can figure out what the contour lines are, then you can adapt these functions to that. $\endgroup$MeshFunctions
with the real and imaginary parts of the logarithm? $\endgroup$