# Plot3D + Graphics3D Manipulate issue

I'm not sure what the issue is here. Part of the Plot3D graph disappears when I use the slider.

Manipulate[
Show[{
Plot3D[x^2 + 2 y^2, {x, y} \[Element] Disk[]],
Graphics3D[{Black, Thick,
Line[{{Cos[t], Sin[t], 0}, {Cos[t], Sin[t],
Cos[t]^2 + 2 Sin[t]^2}}]}]}, PlotRange -> 2],
{t, 0, 2 Pi}]


How can I fix this? I run across these issues from time to time when using multiple graphics with Manipulate. Either it runs too slow or get some kind of behavior shown here. Can you direct to some tips on programming Manipulates?

• Since you're not actually Manipulateing the plot, you should generate the Plot3D outside of the Manipulate and insert it with With. That will fix this issue and possibly others. Dec 26, 2017 at 4:52
• Wow! That did it. This will definitely fix a number my issues. Dec 26, 2017 at 4:58
• add the option PerformanceGoal -> "Quality" to Plot3D?
– kglr
Dec 26, 2017 at 5:00
• Someone just posted an alternate answer that I thought worked well. Any chance you could put it back up? Dec 26, 2017 at 5:09
• @MichaelMcCain I removed my answer since I saw your answer after posting. They are the same thing. I like put stuff inside Initialization that is all. When Making demos for Wolfram website, all things like this has to go to Initialization. So I am used to doing it that way. Dec 26, 2017 at 5:25

Thanks to b3m2a1,

With[{sd = Plot3D[x^2 + 2 y^2, {x, y} \[Element] Disk[]]},
Manipulate[

Show[{
sd,

Graphics3D[{Black, Thick,
Line[{{Cos[t], Sin[t], 0}, {Cos[t], Sin[t],
Cos[t]^2 + 2 Sin[t]^2}}]}]}, PlotRange -> 2],

{t, 0, 2 Pi}]]