Skip to content
matlab
% world.rope.simulate(dt, g, 'primal', 'newton');
world.rope.simulate(dt, g, 'primal', 'gaussnewton');
% world.rope.simulate(dt, g, 'primal', 'jacobi');

% world.rope.simulate(dt, g, 'dual', 'newton');
world.rope.simulate(dt, g, 'dual', 'gaussnewton');
% world.rope.simulate(dt, g, 'dual', 'jacobi');
I ran both primal and dual simulations with identical conditions (dt=1/60, mass=1, stiffness=10000, max_iter=100, alpha=0.5, tol=1e-6, no line search), but I'm still uncertain whether this suggests we can derive both mass-spring and constrained dynamics from a single common variational framework. It's suspicious though that the pendulum trajectories, while diverging during motion, always converge at the dead points...