0
$\begingroup$

I'm reading Baraff's '98 paper: http://run.usc.edu/cs599-s10/cloth/baraff-witkin98.pdf

He defines condition vector functions that equal zero $C(x(t))=0$. An energy function is defined using a vector function:

$$ E_c(x)=\frac{1}{2}k*C(x(t))^TC(x(t)) $$

The confusion comes from equation (7). (7) comes from computing the partial derivative of $\frac{\partial E_c(x)}{\partial x}$. Applying the chain rule, I imagine it would look something like:

$$ \frac{\partial E_c(x)}{\partial x}=k*C(x(t))*\frac{dx}{dt} $$

Could anyone clear up how to obtain the correct result in equation (7)? I must be miss-applying the chain rule, but am still a bit new to vector calculus (especially in regards to total vs partial derivatives).

For convenience, here's equation (7):

$$ f_i=-\partial \frac{E_c}{\partial x_i}=-k\frac{\partial C(x)}{\partial x_i}C(x) $$

Here's a screenshot of the relevant section from the above paper:

asdf

$\endgroup$
5
  • 1
    $\begingroup$ If the derivative is being taken with respect to $x_i$, $t$ is not considered an independent variable, thus no $dx/dt$ $\endgroup$
    – David P
    Aug 25 '17 at 4:48
  • $\begingroup$ Where are you getting the $t$ dependence from? $\endgroup$
    – copper.hat
    Aug 25 '17 at 4:49
  • $\begingroup$ Pretty sure the condition functions are passed position vectors that change over time. My understanding was that conceptually $C(x)$ was $C(x(t))$. But maybe I misinterpreted the paper. Nonetheless I'm still baffled how to reach equation (7). Specifically, where does the $C(x)$ come from at the end of (7)? $\endgroup$
    – Cecil
    Aug 25 '17 at 4:52
  • $\begingroup$ @DavidPeterson Did you mean $t$ is not considered dependent? $\endgroup$
    – Cecil
    Aug 25 '17 at 4:54
  • $\begingroup$ You are treating $x$ as dependent on $t$, but should not be, as the notation $\partial/\partial x$ is telling you $x$ is independent. $C(x)$ and $C(x(t))$ are the same function (albeit with possible restrictions on the range of $x$). However $\partial/\partial x C$ and $\partial/\partial t C$ mean different things. $\endgroup$
    – David P
    Aug 25 '17 at 5:13
0
$\begingroup$

If $E(x) = { 1\over 2} \|C(x)\|^2$ then $DE(x) = C^T(x) DC(x)$, or ${\partial E(x)\over \partial x} = C^T(x) {\partial C(x)\over \partial x} $.

Hence ${\partial E(x)\over \partial x_i} = {\partial E(x)\over \partial x} e_i = C^T(x) {\partial C(x)\over \partial x}e_i = C^T(x) {\partial C(x)\over \partial x_i} = \sum_k [C(x)]_k [{\partial C(x)\over \partial x_i}]_k$.

$\endgroup$
4
  • $\begingroup$ So then $DE(x) = D({1\over 2} \|C(x)\|^2)*DC(x)=C^T(x)*DC(x)=C^T(x)*{\partial C(x)\over \partial x}$ ? But the answer in the paper has the order reversed to: ${\partial C(x)\over \partial x}C(x)$, where ${\partial C(x)\over \partial x}$ is a matrix and $C(x)$ is a vector. $\endgroup$
    – Cecil
    Aug 25 '17 at 5:17
  • $\begingroup$ @Cecil: Not quite. If we let $s(y) = \|y^2\|$ then $E = {1 \over 2} s \circ C$ and so $DE(x) = {1 \over 2} Ds(C(x)) D C(x) = C^T(x) DC(x)$. $\endgroup$
    – copper.hat
    Aug 25 '17 at 5:22
  • $\begingroup$ OK gotcha! I think I was getting a little confused with your answer since you had $vector^T * Matrix$, though I suppose it's computationally the same as the paper's answer with reversed notation $Matrix * vector$. $\endgroup$
    – Cecil
    Aug 25 '17 at 5:32
  • $\begingroup$ It is because $a^T b = b^T a $. $\endgroup$
    – copper.hat
    Aug 25 '17 at 5:34
0
$\begingroup$

If you write $\mathbf C(\mathbf x)$ as a vector $$ \mathbf C(\mathbf x)=\begin{pmatrix}C_1(\mathbf x)\\\vdots\\C_p(\mathbf x)\end{pmatrix}$$ the energy is given by $E_{C}=\frac k2\sum_{j=1}^pC_j(\mathbf x)^2$. From there, this is pretty straightforward. $$f_i=-\frac{\partial E_C}{\partial x_i}=-k\sum_{j=1}^p\frac{\partial C_j}{\partial x_i}C_j.$$

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.