Particle Systems

Overview

In this assignment we will simulate particle systems.

A particle system is a collection of particles which move according to predefined laws and respond to external forces. Particle systems can be used to simulate fire, explosions, smoke, water, falling leaves, clouds, snow, meteor showers and many other phenomena.

Preparation

  1. The assignment is to be maintained and submitted via Github Classroom.
  2. Make sure you have a github.com account and have access to it before proceeding.
  3. Read these instructions about how to get started with assignments on github.
  4. Click on the assignment invitation link sent on the MS Teams channel for the course to begin.

To Do : Particle System Simulation

  1. Read the tutorial on particle system dynamics at this page.
  2. You must create a particle_t class for individual particles and a particle_system_t class to represent the collection of particles.
  3. Particles must have a position, velocity, acceleration and life span. Additionally, particles can have a colour, size or other attributes.
  4. There needs to a global notion of time in your particle simulator, that can be used to integrate the equations of motion for the particles. You can start with a simple Forward Euler integrator, and then move to a RK4 (Runge Kutta Order 4) integrator. Make sure you choose an adequate simulation time step that keeps your system stable.
  5. Create a generic parent class to represent forces and inherit from this class to create particular kinds of forces like gravity, or wind or spring forces that may effect your particles. You can also create sources (emitters) and sinks for your particles.
  6. Model and simulate 3 kinds of phenomena using your particle simulator and render them as creatively as you can. You are free to write your own shaders. Every simulation can keep running till it runs out of particles, or it can also run continuously if particles stay in the system somehow. Each simulation should at least be able to run for 10 seconds. Control the number of particles so that the simulation runs at least at 30fps in real time on your laptops.
  7. Pressing the 1,2 and 3 keys should toggle between the three simulations. You should also add buttons to play/pause (P/p) and restart (R/r) the simulations.
  8. Write a pdf report explaining the design of your code and how you implemented the above mentioned features. Also include rendered screenshots of the three simulations your create in your report. Name this report file submit.pdf. Make sure you include the names of both members of your group in the report. Put the report in a doc folder in these assignment folder tree.
  9. Make sure all your sources (both .cpp and .hpp) go into a src folder, the compiled binary goes into a bin folder. Also ensure that you have a top level Makefile present that generates the executable binary in bin folder on typing make. The executable binary must be called a1sim.
  10. Also, add a clean target to the Makefile that cleans all files generated during compilation, including the binary and temporary files, if any.
  11. The vertex and fragment shaders that you write must be stored in the src folder as well.
  12. At the time of submission make sure your repository only contains the src, doc and data folders, with all the sources in the src folder, the report in the doc folder, other data in the data folder, if required. In addition there should be the Makefile and a README in the top level folder. There should be no other file in the repository.

Do NOT do the following:

  1. Write untidy or unorganized code. This will be penalized.
  2. Submit a repository that does not conform to the expected structure or has extra files.

Plagiarism policy

Do NOT plagiarize code. We will check all submissions for copying.

Marking

  1. Creating a particle class: 50 marks
  2. Creating a particle system class: 50 marks
  3. Creating a class to represent forces: 50 marks
  4. Proper time integration using RK4 integrator: 100 marks
  5. Simulation and rendering of 3 different phenomena: 300 marks
  6. Keyboard control of simulations: 50 marks
  7. PDF report included with submission: 50 marks
  8. Correct repository structure: 50 marks
  9. Total: 700 marks
  10. Deductions: Inconsistently written code: 50 marks
  11. Deductions: Submitting an unclean archive: 50 marks.
  12. Deductions: Missing README and/or declaration: 100 marks
  13. Deductions: For every late day beyond the deadline, you will lose 25% marks. So up to 1 day late, you will be graded out of 75% marks, from 1 to 2 day late out of 50% marks, from 2 to 3 day late out of 25% marks, and beyond that no marks.s

Important Note

Please do not put your solution code and report anywhere public. It should not be available online.

To Submit

  1. Regularly check-in the code into your teams' github repository.
  2. The last checkin before the deadline will be considered for marking.
  3. Modify the README.md file in the repository root folder stating the names and roll numbers of your partner for the assignment, and a declaration in your own words that the assignment is your own work and that you have not copied it from anywhere.
  4. Also cite any sources that you may have used to complete it.
Previous