TransWikia.com

Dynamic plots using cpu rather than gpu

Mathematica Asked by Flumpo on June 5, 2021

I’m trying to graph a few dynamic and animated graphs but am running into some issues.
Whenever they are moving, the graphs loose almost all clarity:
enter image description here

On checking the task bar, it seems like the graphs are being rendered almost entirely using the cpu and not at all with the gpu. Is there any setting/function that will allow me to use the gpu to enhance the quality of animations, or are there any other ways to keep the image clear as it animates?

The code for the above graphic is given below:

Animate[Plot3D[Sin[Pi*x/n]*Cos[Pi*y/n], {x, -2, 2}, {y, -2, 2}], {n, 
  1, 4}]

One Answer

PerformanceGoal is an easy option but if you want more control you can use ControlActive which Jon McLoone from Wolfram explains it on YouTube around 13:00.

In summery you can use ControlActive[2,5] to specify two value, first (2) will be used in animations or when you're interacting with graphic, like rotating and etc, second value (5) will be used when there is no interacion therefore the graphic can be rendered in higher quality.

Use ControlActive with properties that change quality of your graphic like MaxRecursion, PlotPoints or ... to really fine-tune your result.

And when you're working with Animate, if it looks little buggy, use RefreshRate to decrease the animation FPS and as a result lower computation and smoother result.

Another options is if you want to send the result as video to someone, capture with low AnimationRate then increase the speed of captured video before sending.

Answered by Ben Izd on June 5, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP