What I did:

f[t_,z_] := Cos[z/2]^0.5 * (1 + HeavisideTheta[z - 0.35 Pi]);
ParametricPlot3D[{f[t, z] Cos[t], f[t, z] Sin[t], -z}, 
  {t, -Pi, Pi},{z, -Pi, Pi}, PlotRange -> All]

What I got:

enter image description here

The plot shows a gap in the surface that I wouldn't have expected just because the gradient is infinite.

What I want: The same image, but without the break.

  • 4
    $\begingroup$ Add Exclusions -> None to the options of your ParametricPlot3D. $\endgroup$ – MarcoB Jul 28 '15 at 22:26
  • $\begingroup$ "This question arises due to a simple mistake" Incorrect. "easily found in the documentation" That doesn't make it off topic. "If this question can be reworded to fit the rules" It already fits the rules -- see mathematica.stackexchange.com/help/on-topic . "This question appears to be off-topic for this site" is false and this question should not be on hold. $\endgroup$ – ChrisJJ Jul 29 '15 at 13:45
  • 2
    $\begingroup$ How is that not a simple mistake ?! Did you try searching the Q/A for similar questions ? Because If you did you would have found a dozen questions about the same thing. Also, it is easily found in the docs -- just try looking through the Options menu. $\endgroup$ – Sektor Jul 29 '15 at 14:03
  • $\begingroup$ "This question already has an answer here: Why does Plot3D omit parts of the surface at kinks?" No. Different question and different problem, though same solution. $\endgroup$ – ChrisJJ Jul 29 '15 at 22:14
  • $\begingroup$ FTR, the false characterisation of this question as "off-topic" has now been rescinded. Thanks to whoever did that. $\endgroup$ – ChrisJJ Jul 29 '15 at 23:03

As MarcoB says in his comment, add the option Exclusions -> None.

f[t_, z_] := Cos[z/2]^0.5*(1 + HeavisideTheta[z - 0.35 Pi]);
ParametricPlot3D[{f[t, z] Cos[t], f[t, z] Sin[t], -z}, 
  {t, -Pi, Pi}, {z, -Pi, Pi},
  PlotRange -> All,
  Exclusions -> None]

plotenter image description here

  • $\begingroup$ Thanks. Works fine. I'd read " Exclusions Automatic u points or curves to exclude" and never guessed what it was hiding. :-) $\endgroup$ – ChrisJJ Jul 28 '15 at 23:17

Not the answer you're looking for? Browse other questions tagged or ask your own question.