CMPS-3350 Software Engineering
Lab-6

Look ----+
         |
         V
For homework... I will build your final program like this: g++ mylab6.cpp -Wall -lX11 -lGL -lGLU -lm libggfonts.a Please do not make your own #include files for now. You may bring these files into your folder and use them: → fonts.h → libggfonts.a The name of your program is: mylab6.cpp ----------
Step 1:

1. Copy your Odin 3350/1/lab1.cpp file as 3350/6/mylab6.cpp

2. Also copy your Makefile and update it.

3. Follow along on the big-screen...

   Add some features to the mylab6.cpp program
      · A box C++ class
      · A particle C++ class
      · Draw the box and a particle above the box
      · Define the velocity of objects
      · Define the physics of gravity
      · Apply gravity to the particle
      · Make an array of particles (a particle system)
      · Create a particle on mouse click
      · Detect and resolve collision of particle and box
      · Particle stopped by box as if a particle of water
      · Delete a particle that goes off screen

Ask for help if you miss something as we go.


Homework...
Continue working on your mylab6.cpp

1. Draw 5 boxes

2. Align them like the Waterfall Model that we have learned.

3. Make your mouse drop many particles to look like a stream of water.

4. The particles will flow down your Waterfall.

Hints:
   Make an array of 5 boxes.
   Set the top box into position, and the rest are offsets from that.
   For each particle, check for collision with any of the boxes.


Your goal will be something like this...




More homework will be listed here.














Here are Waterfall models from previous students...

Alex (2016)


Andrew (2019)


SarahBeth (2015)