I have an underlying function f(x,y,z) that is computationally intensive, but is smooth and continuous. I'm needing to find the function values along a line in xyz. Currently, I'm calculating f at discrete steps and I'm wondering if there is a way to get Mathematica to automatically chose the step size and work out an interpolating function based on some inputs like how accurate I need it to be and what the initial step size should be. I'm thinking it would kind of work like the mesh function does in plotting by evaluating functions more often in areas of higher complexity.
Does anyone have any ideas where to start?
FunctionInterpolation
? It takes many of the same options asInterpolation
. I find I often have to use them since automation fails for all but simple functions however. It might be helpful to give your function even if it is complicated. $\endgroup$FunctionInterpolation
definitely should do what Chris is asking for. However, as Andy mentions, it's very brittle. See for example this question. Still, playing around with its options is probably less work than reverse-engineering thePlot
function. $\endgroup$