dilevin / computer-graphics-mass-spring-systems

Computer Graphics Assignment – Mass Spring Systems
1 stars 2 forks source link

What are the energies? #21

Open AlekseyPanas opened 7 months ago

AlekseyPanas commented 7 months ago

I am pretty lost on this assignment. I've read the slides and the assignment page but it has only managed to give me a very very high level understanding. The math notation becomes extremely scary by the end, variables seem to get renamed very often, and the notation varies from step to step.

I understand that the idea is to find the vertex positions at the next time by integrating the spring (and external) forces over time. I understand that block coordinate descent is used to make this problem easier by solving via an iterative approximation.

I don't understand how we go from the simple and friendly f=ma to the monstrosity at the end.

To start with a specific question, what are the energies? I get that in physics, energies are forces integrated over a distance. In multiple dimensions, this would be a force vector field integrated over a path (something about potential functions from calc is coming to mind). However, it seems that in our case, E1 and E2 aren't actual energies in the physics sense; instead they are arbitrarily picked to satisfy some properties that will help us solve the original eq. Why are the energies chosen in the way they are? Why is this step (in the image below) in the assignment mathematically valid (i.e why is finding argmin p in RHS equivalent to LHS)? How are we able to split the equation into two energies and why (why not 1, or 3. Is this a choice that was made to make solving easier, etc, etc)?

image

The last paragraph gives an intuition on these energies as being kinetic and potential. Is it just coincidence that they "resemble" these energies, or is there some connection to physics of why it ends up being this way?

Second, am I correct in understanding that the idea in this part is to minimize the entire E1 energy?

image

That is, by minimizing the term in the image above, we implicitly minimize all of this:

image

Is this what is meant by a local step, since dij is per-spring?

Zhecheng-Wang commented 7 months ago

Professor and Jonathan might have different takes on this but here are my thoughts (not as a TA):

You probably have seen spring potential energy in a more innocent form before: $F = -k \Delta \boldsymbol x$, the spring force, where $k$ is the spring coefficient and $\Delta \boldsymbol x$ is the distance from equilibrium (rest shape).

Now, when we think in optimization, although we will be dealing with forces (negative gradient of energy) which are more intuitive, we would like to formulate the problem as an energy minimization problem. Then we say spring potential energy is $E = \frac{1}{2}||l - \overline{l}||^2$ where $l$ is current spring length and $\overline{l}$ is the rest shape.

In addition, the spring potential energy by itself is only spatial (potential energy), but we want a dynamic simulation, an animation -- so we need a temporal energy (kinetic energy), and that's what the second part of the energy is for.

So to answer your first equation, those energies are "physical", and even related to the good old kinetic energy <-> potential energy. You might find this CSC417 Physics-Based Animation lecture interesting.

I think it is the finite differencing velocity formulation make it confusing -- normally we do model velocity as a separate vector field defined on the mesh, but this paper formulates the problem in a way that you don't explicitly store velocity.