7

I'm working in the plotting the Riemann surface of two functions, namely:

$$ w_{1}(z)=\sqrt{1-z^{2}} \,, $$

and

$$ w_{2}(z)=\tanh\left(k\sqrt{1-z^{2}}\right)-2iz\frac{\sqrt{1-z^{2}}}{1-2z^{2}}\,, $$

where $k$ is a constant and $z$ is a complex number. All that I've tried until now didn't work. How to do this plot?

mmal
  • 3,508
  • 2
  • 18
  • 38

1 Answers1

13

It would be more satisfying to make my own function to do this, but I could not improve upon the package in the second link that Lou provided.

Import["http://www.mathematicaguidebooks.org/V6/downloads/RiemannSurfacePlot3D.m"]

Using the default options, you get something like this,

RiemannSurfacePlot3D[w == Sqrt[1 - z^2], Re[w], {z, w}]

enter image description here

You can tweak it to make some really pretty graphics. You can color the real surface by the value of the imaginary part, and show both in a grid. Thanks to Rahul for help with the color function, for other surfaces you may need to tweak the prefactor inside the ArcTan in order to see good color variation - the larger the prefactor, the more variation you see for small values. (I think having a nonlinear color bar would be helpful here)

rsurf[func_] := Grid[{{
    RiemannSurfacePlot3D[w == func, Re[w], {z, w},
     ImageSize -> 400, 
     Coloring -> Hue[Rescale[ArcTan[1.4 Im[w]], {-Pi/2, Pi/2}]],
     PlotPoints -> {40, 40}, Boxed -> False],
    RiemannSurfacePlot3D[w == func, Im[w], {z, w},
     ImageSize -> 400, 
     Coloring -> Hue[Rescale[ArcTan[1.4 Re[w]], {-Pi/2, Pi/2}]],
     PlotPoints -> {40, 40}, Boxed -> False]}}];
rsurf[Sqrt[1 - z^2]]

enter image description here

The more complicated the function, the longer it takes to plot, but they are more interesting,

With[{k = 1 + 2 I},
 rsurf[Tanh[k Sqrt[1 - z^2]] - 2 I z Sqrt[1 - z^2]/(1 - 2 z^2)]
 ]

enter image description here

Jason B.
  • 68,381
  • 3
  • 139
  • 286
  • 1
    Hello @JasonB, Thank you very much for your answer! I really appreciate that method! But could I insert the real and imaginary axes on the plot? – Herr Schrödinger Dec 02 '15 at 14:35
  • 1
    @Jason B, Good approach, anyway, +1 –  Dec 02 '15 at 14:54
  • 4
    Shouldn't your Coloring be Hue[Rescale[ArcTan[.8 Im[w]], {-Pi/2, Pi/2}]]? –  Dec 03 '15 at 00:07
  • 2
    @Rahul,you are right, since the ArcTan can return values from $\pm \pi/2$, I just arrived at the {-1,1} range from trial and error since arctan approaches those values only assymptotically, using the correct range will almost never use the full color range. There is some arbitrariness in the prefactor inside of the ArcTan function. I set it a little bit higher here and that gives a decent result. Thanks! – Jason B. Dec 03 '15 at 08:38