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. Here is a sample input file to test your system.
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 (will be able to) run my program here:
~adamb/public/MassSpring/massSpring input.ms density spring_stiffness spring_damping delta_t total_simulation_time output-%05d.objThe command:
~adamb/public/MassSpring/springmass input.ms 10 100000 1 0.003333 1 output.%05d.objeems to produce reasonable output.
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.
Turn in this assignment electronically by pushing your source code to your class git repository by 1:00 AM 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.