# Unwanted noise (lines and dots) in ContourPlot3D

I have a ContourPlot3D that is a bit noisy on one side of the plot. I have tried MaxRecursion but actually it is of no use, PlotPoints help to some degree but even with a higher PlotPoints it is still there. You can see some dots and unwanted lines on the upper right portion of the plot. Any suggestions on how to resolve this? As a side question, is there a way to fix the viewing angle of the plot so that I don't have to align the plot every time?

ep = 10^-2;
m0 = 500;
g = 3;
F[u_, z_] := 1 - (m0 Exp[-g u]) z^4
intIndefinite[u_, z_] := Evaluate@Integrate[1/F[u, z], z]
int[u_, zz_] := Evaluate[intIndefinite[u, zz] - intIndefinite[u, ep]]
tPlane[x_, z_] := Evaluate[x - int[x, z]]
plot = ContourPlot3D[t == tPlane[x, z], {x, 0, 2}, {t, 0, 2}, {z, ep, 0.9}, LabelStyle -> Directive[Black, 14], Mesh -> 5, ContourStyle -> Directive[Cyan, Opacity[0.7]], Lighting -> Automatic, AxesLabel -> {"x", "t ", "z "}, AxesEdge -> {{-1, -1}, {-1, -1}, Automatic}, PlotRange -> {Automatic, Automatic, {ep, 0.9}}, PlotPoints -> 30]


• Why you used ep = 10^-2;? Cannot it be equal 0? Nov 18, 2023 at 11:30
• @azerbajdzan The integral blows up at $z=0$, so $ep$ is just a cutoff to prevent that. Nov 18, 2023 at 11:35
• No, it is not. z=0 is no problem, integral diverges at the curve you can see in the plot in my answer. Nov 18, 2023 at 11:38
• @azerbajdzan Does that really affect the behavior near the edges where the noise occurs? Nov 18, 2023 at 12:24
• It does not, but it simplifies the function expression. Nov 18, 2023 at 12:27

These artefacts appear near the curve when ArcTanh and ArcCoth functions become non-real which is a discontinuity. It is around x=1 when both ArcTanh[x] and ArcCoth[x] become infinity. So I think it would not be easy to get rid of the artifacts near this discontinuity.

The function I plotted is yours tPlane[x, z] I just used real part Re on it.

Plot3D[Re[
x + 1/(2 Sqrt[2] 5^(3/4)) E^(
3 x/4) (ArcCot[10 Sqrt[2] 5^(1/4) E^(3 x/4)] +
ArcCoth[10 Sqrt[2] 5^(1/4) E^(3 x/4)] -
ArcTan[Sqrt[2] 5^(3/4) E^(-3 x/4) z] -
ArcTanh[Sqrt[2] 5^(3/4) E^(-3 x/4) z])], {x, -6, 6}, {z, -6, 6},
AxesLabel -> {x, z, t}, PlotPoints -> 100, BoxRatios -> {1, 1, 1}]


Update:

With ep=0 we have:

Plot3D[If[E^(3 x) > 500 z^4,
x - (E^(3 x/
4) (ArcTan[Sqrt[2] 5^(3/4) E^(-3 x/4) z] +
ArcTanh[Sqrt[2] 5^(3/4) E^(-3 x/4) z]))/(
2 Sqrt[2] 5^(3/4)), -10], {x, -10, 10}, {z, -10, 10},
PlotPoints -> 200, BoxRatios -> {1, 1, 1},
PlotRange -> {{-5, 10}, {-10, 10}, {-9, 20}},
AxesLabel -> {"x", "z", "t"}, WorkingPrecision -> 100,
Method -> {"RotationControl" -> "ArcBall"},
Exclusions -> {z == -(E^(3 x/4)/(Sqrt[2] 5^(3/4))),
z == E^(3 x/4)/(Sqrt[2] 5^(3/4))},
ExclusionsStyle -> {None, Directive[Thick, Blue]}]


I do not have a quick answer how to get rid of the gray area, but with editing the full-form of the plot it is possible.

• It seems like there are several surfaces for the solution, is it possible to just pick the surface corresponding to my plot? I remember there is a thread talking about a similar situation but I can't remember where, maybe that will eliminate the problem. Nov 18, 2023 at 7:46

The distortions almost vanish if you plot from {t, 0.5, 2}. I know, this cuts off a small stripe at the right side of the plot, but I didn't find another way.

I also added a Viewpoint - option to avoid manual alignment.

ContourPlot3D[
t == tPlane[x, z], {x, 0, 2}, {t, 0.5, 2}, {z, ep, 0.9},
LabelStyle -> Directive[Black, 14],
Mesh -> 5,
ContourStyle -> Directive[Cyan, Opacity[0.7]],
Lighting -> Automatic,
AxesLabel -> {"x", "t ", "z "},
AxesEdge -> {{-1, -1}, {-1, -1}, Automatic},
PlotRange -> {Automatic, Automatic, {ep, 0.9}},
PlotPoints -> 10,
ViewPoint -> {-5, -2.4, 2.}]


• That may seem an easy fix, but I need the range for $t$ in my code. The viewpoint option works though. Nov 17, 2023 at 19:12