dilevin / CSC417-a1-mass-spring-1d

Assignment 1 on one-dimensional mass spring systems for CSC2549, at the University of Toronto
14 stars 15 forks source link

Are we writing our own force function for each of the four methods? #5

Open koichishi opened 4 years ago

koichishi commented 4 years ago

If so, I don't know how to compute the force by using only the coordinate and the velocity. Is there any hint?

honglin-c commented 4 years ago

You'll need to compute the "force" (or actually, the gradient of the potential energy) in dV_spring_particle_particle_dq.cpp (~2 lines), and it's the same for the four methods.