alecjacobson / computer-graphics-mass-spring-systems Goto Github PK
View Code? Open in Web Editor NEWComputer Graphics Assignment – Mass Spring Systems
Computer Graphics Assignment – Mass Spring Systems
After switching to sparse matrices the pre-computation is significantly faster but the animation is still quite slow. If I created Q and b using multiplications and additions should they still be stored efficiently? The solve() part is what is bottlenecking the application here.
In single-spring-horizontal.json, my unpinned vertex slowly comes to rest at the bottom of the pendulum without swinging from side to side. What can be the problem?
I see that f_ext is a constant -9.8. Shouldn't it be -9.8 * sin(alpha), where alpha is the angle between the current position and rest position of the vertex?
My other examples are working fine. I notice there's only a single pinned vertex in this one, so I wonder if the problem might lie in the C matrix or penalty term?
I'm a bit confused with what would be updated when iterating the Local-Global Algorithm.
As the readme states and we did in class:
Now from the read me, we use Pt and Pt-step to solve for Pt+step.
If thats the case, how do we iterate again?
What value is updated when we go back to step one, as we only got a new value for Pt+step?
Have I misunderstood what we are solving for?
After the Equation(22), it states "We can conceptually rewrite our system as 𝐐𝐩=𝐛 with 𝐋𝐋⊤𝐩=𝐛."
Should it be 𝐐𝐩𝑡+∆t=𝐛 with 𝐋𝐋⊤𝐩𝑡+∆t=𝐛 instead?
Hi, I am just a little confused why the two-steps work on a calculus-level:
First, is the output space of the expression convex? Otherwise, we might run into issues that more than one possible location at the next timestamp.
Second, how do we make sure that each time we minimize one of the two variables (LaTeX: d_{ij}d i j and LaTeX: p_ip i), the overall expression will get closer to any local min?
Thanks!
For the sparse matrix implementation I've used the same code I had for the dense implementation, but I've made every regular matrix (including ones from the input) into a sparse matrix using the triplet method in the readme. Despite this Flag.json still runs really slow (about 40 seconds per frame on debug, and like 5-10 seconds per frame on release).
Not sure what I'm doing wrong, any help would be appreciated!
I'm doing the step for each simulation, and I feel like I'm doing something wrong. Because of the pinned vertices, the matrix that is transformed into LLT is different in every iteration. What I end up doing is reverting Q back into its original matrix, adding the result of the penalty method, and then turning that into LLT form. My output looks correct, though. Am I misunderstanding how this is done?
I think E should be # edges by 2 list, not 3 by looking at the read_json comment and printing the dimension...
http://graphics.berkeley.edu/papers/Liu-FSM-2013-11/Liu-FSM-2013-11.pdf doesn't resolve for me
$ wget https://graphics.berkeley.edu/papers/Liu-FSM-2013-11/Liu-FSM-2013-11.pdf
--2022-03-21 17:08:58-- https://graphics.berkeley.edu/papers/Liu-FSM-2013-11/Liu-FSM-2013-11.pdf
Resolving graphics.berkeley.edu (graphics.berkeley.edu)... 128.32.244.183
Connecting to graphics.berkeley.edu (graphics.berkeley.edu)|128.32.244.183|:443... failed: No route to host.
I successfully produced the correct results for single spring, horizontal chain and net.
However, when I tried to run "./masssprings_dense ../data/flag.json", it took more than 5 minutes but still didn't pop up the OpenGL window, does it mean I implement the dense code wrong?
For Pinned vertices formula, you recently added C after C^T in commit 42be408.
That is wrong. It's impossible for me to show the math to you by typing here. However, for three of us, after adding C to our code, the animation became wrong.
I believe that the original version of pinned vertices formula is correct.
Bests,
Sey
It seems like Dec 2nd is Monday instead of Tuesday. Do we need to upload the finished project on Dec 2nd or we are actually expected to have the deadline on Dec 3rd, Tuesday?
In the central finite difference algorithm to define the acceleration, shouldn't be + \p^{t-∆t} at the end instead of - \p^{t-∆t}?
in equation (5), there is one missing delta(t) in the internal equation.
after running ./masssprings .....
I press 'A' to toggle the animation, but the spring just disappears, and nothing left on the screen but background color.
Anyone meet the same issue?
Had me stuck for a bit:
-tr( p.T w C.T p_rest )
should be -tr( p.T w C.T C p_rest )
How to submit A8?
As title, what is "indices of fixed vertices as indices" and "selection matrix"?
The README tells us to "add these quadratic and linear coefficients to Q and b above correspondingly."
Does this mean to add the penalty term to every element in the b and Q matrices? Or only to the rows and columns that correspond to the pinned vertices? None of this seems to work.
It says in the fast_mass_springs_step_sparse.cpp:
Unext #V by 3 list of previous vertex positions (at time t-∆t)
Should it be:
Unext #V by 3 list of next vertex positions (at time t+∆t)
instead?
in the header file, it says to conduct a single step. However, in the read me, it mentioned about 50 iterators for a satisfying result, as well as in the .c file, it has a for-loop for 50 iterators.
I am currently debugging my code, and it did make the result different. I wonder how many iterators I should use for this function.
In the documentation we used Sum( m_i * (a_i)^2 * (delta_t)^2 )
to represent the Kinetic Energy, but in real physics, we always use 1/2 * Sum( m_i * v_i ^ 2)
to represent the Kinetic Energy. Is there a special reason for us to use a
instead v
here, and also wondering why we won't keep the 1/2
here but meanwhile we have this in the elastic potential energy?
As we use the central finite difference for estimating the a
, does that decision influnce the way we iterate the Kinetic Energy, or this is two irrelevant decisions?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.