eth-igl / gp2024-Assignments

0 stars 0 forks source link

The closed-form gradient of MLS with respect to? #22

Closed desmondlzy closed 2 months ago

desmondlzy commented 2 months ago

Hi, I'm working on the theory question 2 of assignment 2. I'm wondering what shall we differentiate MLS with respect to. Are we suppose to differentiate the implicit function f(x) that we use marching cubes on with respect to x?

segaviv commented 2 months ago

Hi,

Yes, the MLS approximation is a continuous function from $R^3\rightarrow R$, and thus can be differentiated w.r.t each of the variables (the coordinates of the input point x). You can write an explicit formula for the MLS approximation (in a matrix form), and then differentiate it w.r.t each variable to obtain the gradient (refer to the matrix cookbook for formulas for differentiating matrix expressions).

desmondlzy commented 2 months ago

sounds good. thanks :)

taozhang1004 commented 2 months ago

Hi, But what polynomal degree should we assume? Or should we consider an aribitrary basis?

segaviv commented 2 months ago

Hi,

You don't have to assume a particular degree for the polynomial. You can use the notation from the tutorial slides to describe the polynomial basis evaluated at a point p (i.e. b(p) = [1, x, y, z, ...]). You don't need to expand this vector, you can just use b(p) to describe it and e.g. $\frac{\partial b}{\partial x}$ to describe its derivative w.r.t $x$.

taozhang1004 commented 2 months ago

i see, thanks a lot!