1
$\begingroup$

I have two surface functions, f[x,y] and g[x,y]. Assuming that the DensityPlot of f and g takes a while, is there a way to hold the values of DensityPlot, to efficiently DensityPlot f[x,y]-g[x,y] ?

I'm aware that the mesh used by DensityPlot for the two functions f and g is not necessary the same, depending on variations of these functions. However, maybe it is possible to inform DensityPlot to start with the pre-computed values of DensityPlot[f] and DensityPlot[g] when asking for DensityPlot[f-g]. Any suggestions ?

$\endgroup$
  • $\begingroup$ ListDensityPlot can show values calculated on an explicit grid. $\endgroup$ – mikado Jul 4 '16 at 22:44
  • $\begingroup$ I would rather avoid setting an explicit grid, or at least use the one that DensityPlot did propose $\endgroup$ – Pierre Jul 4 '16 at 22:49
  • 2
    $\begingroup$ FunctionInterpolation might give a more efficiently computed approximation to each function. $\endgroup$ – mikado Jul 4 '16 at 22:52
  • $\begingroup$ Could you be more explicit ? $\endgroup$ – Pierre Jul 4 '16 at 23:32

Your Answer

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

Browse other questions tagged or ask your own question.