CS320      Lab4 - Vectors and Collision Detection and Resolution

Objectives:

  1. Download and unzip collision.zip and then import the collision project in Eclipse.  Try it out.
     
  2. You will now try a couple of modifications:
     
    Aim the second ball so that it passes through (X_OFFSET, 0.0) rather than the origin by changing the x component of the velocity vector to X_OFFSET - ball2.position.x


     


  3.  
    Now change it so that a third ball is stationary at position  (X_STATIONARY, Y_STATIONARY).  The third ball should have the same mass and size as the second ball. Store the three balls in an array and make sure that you check for collisions with all three balls.

     

  4. Email your completed Lab4 program to me.