In WolframAlpha
we can easily visualize Riemann surfaces of arbitrary functions,
can we plot the Riemann surface of an arbitrary function using Mathematica and with a better color scheme like these plots so that I can see the connection of the branches?
Edit
Here are more Riemann surfaces by Matthias Nieser et. Automatic Generation of Riemann Surface Meshes
related:
How can I recreate Trott's Riemann Surface plot in Mathematica?
Visualization of Riemann Surfaces of Algebraic Functions
Automatic Generation of Riemann Surface Meshes
Answer
You can take Michael Trott's code and modify it a bit to easily plot these surfaces
Import["http://www.mathematicaguidebooks.org/V6/downloads/\
RiemannSurfacePlot3D.m"]
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]}}];
Here it is applied to the functions from the OP
rsurf /@ {Sqrt[z], Log[z], (z + 1)^(1/3) + (z - 1)^(1/2)}
It is a bit tricky to get a nice coordinate mesh in these plots since we aren't actually using a plotting program (like ParametricPlot3D
or Plot3D
) to make them. We are instead building up a list of Polygon
objects and combining them into a GraphicsComplex
. However, we can get a decent approximation of a coordinate mesh by changing the line EdgeForm[]
to EdgeForm[Black]
Import["http://www.mathematicaguidebooks.org/V6/downloads/\
RiemannSurfacePlot3D.m"]
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 -> {30, 20}, Boxed -> False],
RiemannSurfacePlot3D[w == func, Im[w], {z, w}, ImageSize -> 400,
Coloring -> Hue[Rescale[ArcTan[1.4 Re[w]], {-Pi/2, Pi/2}]],
PlotPoints -> {30, 20}, Boxed -> False]}}]/.(EdgeForm[]:>EdgeForm[Black]);
You can change the PlotPoints
above to change the number of polygons drawn, and thus the quality of the 3D image and the density of mesh lines. The two numbers refer to the azimuthal and radial directions, respectively.
rsurf@Sqrt[1 - z^2]
Comments
Post a Comment