I'm supposed to compute partial derivatives for 3D volume rendering (in ray tracing). I'm bad at math and so I can't understand what $f$ is in my case. In reviewing examples, I'm seeing the $f$ function being provided. Like in the Stewart Calculus textbook, the first given example defines a function $π(π₯,π¦)=π₯^2β3π₯π¦+2π¦^2β4π₯+5π¦β12$
My Basic Computation in 1D
I'm told that we have $f(x)$ (black squiggly)
Then for the derivative at any point on $x$, say $x_i$, I've been told I can use:
$f`(x_i) = df(x_i)/dx = [f(x_i) - f(x_i-1)]/dx$.
I'm told $dx$ is constant, so it is dropped:
$f`(x_i) = df(x_i)/dx = [f(x_i) - f(x_i-1)]$.
But what is $f$?
What if I have $x_i=2$, for example? Or any number, since that is the info I do know. Please explain what I do, or how I ascertain $f$.
Working in 3D
Once I understand the basics, I need to compute the values for 3D, meaning I need partial derivatives for $x$, $y$ and $z$. I've been given the formulas to achieve this:
$\frac{ππ}{ππ₯} =\frac{1}{2}(f(x_{i+1}, y_j, z_k,) - f(x_{i-1}, y_j, z_k))$ $\frac{ππ}{πy} =\frac{1}{2}(f(x_i, y_{j+1}, z_k,) - f(x_i, y_{j-1}, z_k))$ $\frac{ππ}{πz} =\frac{1}{2}(f(x_i, y_j, z_{k+1}) - f(x_i, y_j, z_{k-1}))$
I have the required $x$, $y$ and $z$ ranges, so if I can understand the math, my goal is compute the three above values.
Note: based on this paper