I am reading the article "Visualization of Riemann Surfaces of Algebraic Functions" by Michael Trott, and I couldn't run an important expression. He wrote
The following picture shows all four sheets of the imaginary part (we omit the polygons from the third quadrant to have a better look at the inner parts) of the function $w^4=1-z^4$.
rsf = With[{ε = 1/10^12},
Show[Function[f,
Apply[Plot3D[Re[f], {x, #1, #2}, {y, #3, #4}, PlotPoints -> 17,
DisplayFunction -> Identity] &, {{ε,
2, ε,
2}, {-ε, -2, ε,
2}, {-ε, -2, -ε, -2}}, {1}]] /@
{Sqrt[1 - (x + I y)^4], -Sqrt[1 - (x + I y)^4],
I Sqrt[1 - (x + I y)^4], -I Sqrt[1 - (x + I y)^4]},
DisplayFunction -> $DisplayFunction, BoxRatios -> {1, 1, 1},
ViewPoint -> {4, -2, 1.7}]]
For Riemann surfaces with more than two or three sheets, we typically encounter the problem that it is hard to look inside. To have a better look in the inner parts of the surface, we define a function
holePolygon
which cuts a hole of sizef
in a polygon.
holePolygon[Polygon[l_], f_] :=
Module[{m = Plus @@ l/Length[l], innerPoints},
innerPoints = (m + f (#1 - m) &) /@ l; {MapThread[
Polygon[Join[#1,
Reverse[#2]]] &, {Partition[(Append[#1, First[#1]] &)[l], 2,
1], Partition[(Append[#1, First[#1]] &)[innerPoints], 2,
1]}], (Line[Append[#1, First[#1]]] &)[innerPoints]}]
The following picture shows the previous Riemann surface with holed polygons:
Show[Graphics3D[{EdgeForm[], Thickness[0.0001],
SurfaceColor[Hue[0.8199999999999999], Hue[0.22],
1.209999999999999],
Cases[rsf, _Polygon, ∞] /.
p_Polygon :> holePolygon[p, 0.8]}],
BoxRatios -> {1, 1, 1.399999999999999}, ViewPoint -> {4, -2, 1.7}]
When I run the last piece Mathematica returns
"Coordinate...should be a triple of numbers, or a Scaled form".
Someone has any idea why is it happens?