2
$\begingroup$

I have the following $1D$ bump function h1 defined as follows:

h[t_] := Piecewise[{{Exp[1/(t^2 - 1)], -1 < t < 1}, {0, Abs[t] >= 1}}];
h1[t_] := Exp[1] Piecewise[{{h[(t + a)/(b - a)], -b < t < -a}, {h[(t - a)/(b - a)], a < t < b}, {0, Abs[t] >= b}, {Exp[1/(-1)], -a <= t <= a}}];

The graph is, for a=1,b=3: enter image description here

To turn this into a $2D$ bump function and make a plot I tried two solutions:

  • using a substitution $t\mapsto \sqrt{x^2+y^2}$ and then using Plot3D
  • using RevolutionPlot3D[h1[t], {t, -4, 4}]

In both cases I get an irregular plot with two rings missing:

enter image description here

Do you know how to solve this issue?

$\endgroup$
2
  • 4
    $\begingroup$ Try Exclusions -> None. $\endgroup$
    – Greg Hurst
    Apr 23, 2020 at 22:21
  • $\begingroup$ @ChipHurst Great, this solves the missing rings. I got that MaxRecursion and PlotPoints do the rest. Thank you. $\endgroup$
    – Leonardo
    Apr 24, 2020 at 7:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.