Whenever I make a 3D plot using the Max or Min functions, I get breaks in the plot when it switches from one expression in Max or Min to the other. How can I eliminate these breaks to get one continuous surface?

The particular example I want to make work is this:

ParametricPlot3D[{r Cos[t], r Sin[t],
  Max[r^2 Cos[t]^2 - 1.06^2, 0] + Max[r^2 Sin[t]^2 - 1.92^2, 0]},
  {t, 0, 2 \[Pi]}, {r, 0, 3.4}, Mesh->None, Boxed->False, Axes->None]

which produces this:

surface showing breaks in plot

but it is possible to reproduce the effect with simpler expressions like Plot3D[Max[x, 1], {x, 0, 2}, {y, 0, 2}].

I've checked that occurs with Mathematica 7 and 8 on Windows and Linux.

  • $\begingroup$ David, what system are you on? I couldn't reproduce this on Win7 M9. $\endgroup$ – Vitaliy Kaurov Feb 7 '13 at 23:44
  • $\begingroup$ Version 8 on Linux (Gentoo). Let me try v7 and v9 (if I can get it to work) to see if it does the same. $\endgroup$ – David Z Feb 7 '13 at 23:47
  • $\begingroup$ Ah, this is indeed a duplicate. I didn't find that question when I was looking for prior work. $\endgroup$ – David Z Feb 8 '13 at 2:11
  • $\begingroup$ It's not always easy to find them, even when I remember the question! $\endgroup$ – Szabolcs Feb 8 '13 at 2:18
  • $\begingroup$ David, if you unaccept the answer below, I will delete it. (The system does not allow deletion of accepted answers.) $\endgroup$ – kglr Feb 8 '13 at 5:07

Browse other questions tagged or ask your own question.