Starting from:

$30

Lab Submission 2 Solution

10.1 Key Information




Deadline: (1) Submission should be made before 6am on October 15 (Monday in Week 11).
(2) Demonstration should be made in the lab session on Week 11.













Submission: All source code with texture images should be submitted as a zip file via Canvas and counts for 5% of your total assessment. Please provide a README file within the zip file, including the instructions to run your code.












Demonstration: You are required to provide a working live demo to show your work to your tutor during the lab session on Week 11.









10.2 Demonstration Rules




Make sure you can demonstrate your program in the reasonable time. You can either use your laptop or the computer at the lab. Please test your program before coming to the demonstration lab.









You will be required to explain the implementation of your code to the tutor.












If you can not finish all the requirements, you should provide a live demo for the workable parts.






10.3 Bouncing particles (Lab Submission 2 - Due Week 11)




Before you start to program this lab submission, please make sure you understand the basics of 3D graphics from last lab and finish the orbit simulator.

In this task, program an interactive 3D animation with the following scenarios:




When you click mouse at (x, y) on your screen shoot a 3D ball with a random texture (randomly load a texture from your texture pool).



This ball flies away from the screen along the Z axis with a random direction according to the XY plane. It means this ball does not go straight ahead, but instead is shot away in a random direction. The gravity always effect the movement of this ball as long as it is in screen.



While the ball moves away from the screen, it falls down to the ground due to the gravity.



The space is constrained by 5 walls (left, right, ceiling, floor and a wall far ahead facing the screen). When the ball touches any of the wall, it bounces back and its new direction is computed considering its previous direction. The 6th wall (the wall where the camera is placed) is free to design (either bounce the ball back or make the ball disappear when the ball comes towards this wall).



You can shoot new balls into the screen while the previous balls are travelling.



* The ball spins while it is travelling. The direction of spinning is determined by its original direction and the bounces.
* When the balls touch each other, they bounce back as well.



* The potential energy (speed and height) of the ball decays according to the travelling time as well as the number of bounces.



The sources of this task are supposed to be submitted via the eLearning and counts for 5% of your total assessment. You are required to provide a working live demo of your work to your tutor during the lab week 11.






Scenarios marked with * are not assessable for this submission.






It would be easier if you model the balls with a class.









Nice to embed some of the Kinematic equations when you calculate the speed and direction of the balls. For equations of motion, please refer to https://en.wikipedia.org/wiki/Equations_of_motion




































COMP3419

More products