2
$\begingroup$

I want to visualize the following graphics:

ContourPlot3D[Cos[t x] == Sin[t y], {x, -2 Pi, 2 Pi}, {y, -2 Pi, 2 Pi}, {t, -2 Pi, 2 Pi}, 
 ColorFunction -> "Rainbow"]  

It takes long time before the results come out, and, when I rotate the 3d graphics, it moves quite slowly.

What measures can I take to speed up the calculation, as well as a smoother rotation? (I don't need high fidelity 3d graphics).

Thanks.

$\endgroup$
2
  • $\begingroup$ Look up the following options (within the ContourPlot3D doc page): PerformanceGoal, PlotPoints, MaxRecursion. $\endgroup$
    – Szabolcs
    Commented Aug 21, 2018 at 7:30
  • $\begingroup$ @Szabolcs Thanks for your advice, I found that PlotPoints will improve the precision of the 3d graphics. $\endgroup$
    – PureLine
    Commented Aug 21, 2018 at 15:06

1 Answer 1

5
$\begingroup$

Set the value of the option PerformanceGoal to "Speed":

ContourPlot3D[Cos[t x] == Sin[t y], {x, -2 Pi, 2 Pi}, {y, -2 Pi, 2 Pi}, {t, -2 Pi, 2 Pi}, 
  ColorFunction -> "Rainbow"] // AbsoluteTiming

enter image description here

ContourPlot3D[Cos[t x] == Sin[t y], {x, -2 Pi, 2 Pi}, {y, -2 Pi, 2 Pi}, {t, -2 Pi, 2 Pi}, 
  ColorFunction -> "Rainbow", PerformanceGoal -> "Speed"] // AbsoluteTiming

enter image description here

Default value of the option is "Quality":

Options[ContourPlot3D, PerformanceGoal]

{PerformanceGoal :> $PerformanceGoal}

$PerformanceGoal

"Quality"

$\endgroup$
1
  • $\begingroup$ thanks for your advice. I got the point. $\endgroup$
    – PureLine
    Commented Aug 21, 2018 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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