You will be doing your work this semester in a class git repository. Before you get started on any of the assignments, you should fetch yourself a copy of your personal repository following these directions. Your personal class respoitory on the UMBC GL/Linux systems is /afs/umbc.edu/users/a/d/adamb/pub/491/your-user-name.git
For this assignment, you must write a C or C++ program that will perform spring mass simulations. I have put sample input files and a skeleton program (mostly i/o) in your git repositories.
Each line will begin with with either a m, s, or t. m is for mass-point, s is for spring, t is for triangle. Each m line will include the x, y, z initial position of the mass-point, and the mass of the mass-point.
m x y z volumeEach s line will give the index of node i, the index of node j, and rest length for the spring.
s i j lEach t line will give the indices into the mass-point array of a surface triangle (which will be used for output as in the previous assignment).
t a b cUnlike the obj format, all indices will be given assuming zero-offsets.
You can run my program here:
~adamb/public/MassSpring/massSpring input.json output-%02d-%05d.obj
v(t+delta_t) = v(t) + a(t) * delta_t x(t+delta_t) = x(t) + v(t+delta_t) * delta_tFor force use
f_ij = stiffness * (mag(p_j-p_i) / l - 1) * (p_j-p_i) / mag(p_j-p_i) + damping * (v_j -v_i)for the force on node i when there is a spring between nodes i and j.
For 50 extra points implement position-based dynamics.
For 50 extra points implement clustered shape matching.
Turn in this assignment electronically by pushing your source code to your class git repository by 11:59 PM on the day of the deadline. Do your development in the proj1 directory so we can find it. Be sure the Makefile will build your project when we run 'make' (or edit it so it will). Also include a README.txt file telling us about your assignment. Do not forget to tell us what (if any) help did you receive from books, web sites or people other than the instructor and TA.
Check in along the way with useful checkin messages. We will be looking at your development process, so a complete and perfectly working ray tracer submitted in a single checkin one minute before the deadline will NOT get full credit. Do be sure to check in all of your source code, Makefile, README, and updated .gitignore file, but no build files, log files, generated images, zip files, libraries, or other non-code content.
To make sure you have the submission process working, you must do at least one commit and push by the friday before the deadline.