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$
  • $\begingroup$ Look up the following options (within the ContourPlot3D doc page): PerformanceGoal, PlotPoints, MaxRecursion. $\endgroup$ – Szabolcs Aug 21 '18 at 7:30
  • $\begingroup$ @Szabolcs Thanks for your advice, I found that PlotPoints will improve the precision of the 3d graphics. $\endgroup$ – PureLine Aug 21 '18 at 15:06
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"

| improve this answer | |
$\endgroup$
  • $\begingroup$ thanks for your advice. I got the point. $\endgroup$ – PureLine Aug 21 '18 at 15:05

Your Answer

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

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