Skip to main content

plotting - Modular surface of tri-focal Cassini curve ContourPlot3D missing feet


I am wondering why the following fails to cover the surface at points near $k = 0$.


c[z_] := (z + 1) (z - 1) (z + 1 + I);


ContourPlot3D[Abs[c[x + I y]] == k^3, {x, -2.5, 2}, {y, -2, 2},
{k, 0, 1.75}, Background -> White, AxesLabel -> {"x", "y", "k"}]

Mathematica graphics


Furthermore, when the left hand side is complex expanded and the equation is rearranged with $2xy+k^3$ on the right, the curve looks significantly different, with one large and one small foot, both touching at zero. Why is that?



Answer



ContourPlot3D is not very good at resolving thin features, because it only knows that the feature exists when one of the sampling points happens to land inside it. In general, one thing you can do is to increase PlotPoints, which improves the plot but takes a very long time.


ContourPlot3D[
Abs[c[x + I y]] == k^3, {x, -2.5, 2}, {y, -2, 2}, {k, 0, 1.75},
Background -> White, AxesLabel -> {"x", "y", "k"}, PlotPoints -> 20]


enter image description here


In this particular case, though, your plot is equivalent to $k = |c(x+iy)|^{1/3}$, so you could just use Plot3D instead. This is much faster because it only has to sample the two-dimensional $xy$ plane rather than the three-dimensional $xyk$ space. Then you can afford to make MaxRecursion quite large and it's still really quick to plot.


Plot3D[Abs[c[x + I y]]^(1/3), {x, -2.5, 2}, {y, -2, 2}, PlotRange -> {0, 1.75},
Background -> White, AxesLabel -> {"x", "y", "k"}, ClippingStyle -> None,
BoxRatios -> 1, MeshFunctions -> {#1 &, #2 &, #3 &}, MaxRecursion -> 5]

enter image description here


(I've added a few options to make it look like your original plot.)


Comments