Description
GaTech Buzzy Bowl
The company you work for has been selected to develop a half-time show using UAVs. You need to develop a 3D simulation using MPI and OpenGL to demo the show to the game organizers for their approval.
Below is a description of the show that you will be creating with a 3D simulation.
- The show is made up of 15 UAVs that are placed on the football field at the 0, 25, 50, 25, 0 yard-lines as shown below by the red dots.
- The UAVs remain on the ground for 5 seconds after the beginning of the simulation.
- After the initial 5 seconds the UAVs then launch from the ground and go towards the point (0, 0, 50 m) above the ground with a maximum velocity of 2 m/s
- As they approach the point, (0, 0, 50 m), they began to fly in random paths along the surface of a virtual sphere of radius 10 m while attempting to maintain a speed between 2 to 10 m/s.
- The simulation ends once all of the UAV have come within 10 m of the point, (0, 0, 50 m), and the UAVs have flown along the surface for 60 seconds.
- Each UAV has the following
-
- Each UAV has a mass of 1 kg and is able to generate a single force vector with a total magnitude of 20 N in any direction.
-
- Each UAV it just small enough to fix in a 1-m cube bounding box.
-
- The color of your UAV is determined using the first letter of your last name:
Red A,K,T
Green B,L,U
Blue C,M,V
cyan D,N,W
magenta E,0,X
yellow F,P,Y
Red H,Q,Z
Green I,R
blue J,S
- The shape of your UAV is determined by the first letter of your first name: Sphere A,K,T
Cube B,L,U
Cone C,M,V
Torus D,N,W
Dodecahedron E,0,X
Octahedron F,P,Y
Tetrahedron H,Q,Z
Icosahedron I,R
Teapot J,S
- You must develop a MPI application using 16 processes. The main process (rank = 0) is responsible for rendering the 3D scene with the 15 UAVs and a green (RGB=(0,255,0)) rectangle representing the football field in a 400 x 400 window. You will get 5 extra bonus points for using a bitmap file called ff.bmp in the same location as the executable to apply a football field texture to the rectangle. The other 15 processes are each responsible for controlling the motion of a single UAV.
- The main process gathers the location and velocity vector of each UAV every 100 msec and immediately broadcasts this information to all the UAV processes, and updates the 3D scene.
- The coordinate system of the 3D simulation is define as flows: The origin is location in the center of the football field at ground level. The positive z axis points straight up, and the x axis is along the width of the field and the y axis is along the length.
10) A camera location, orientation, and field of view should be used so that the whole football field and the virtual 10m sphere is in the view.
11) The flight of the UAV is controlled by the following kinematic rules
- a.
The force vector created by the UAV plus the force of gravity (10 N in the
negative z direction) determine the direction of acceleration for the UAV.Use Newton’s 2nd Law to determine the acceleration of the UAV in each
Use the equations of motion for constant acceleration in each direction (xyz) to
determine the location and velocity of the UAV every 100 msec.
You can use any method you want to maintain the UAVs flight path along the
surface of the 10m radius virtual sphere. One possible method to consider is to
use a variation of Hooke’s Law simulating a virtual spring between the surface of
the sphere and the radial distance of the UAV from the center of the sphere.
= (10− )
where D is the distance from the UAV to the center of the sphere. And the direction of is along the normalized vector from the UAV to the sphere center.
The value of k can be varied to bind the UAV tighter to the surface.
ECE6122 Students:
The magnitude of the color of your UAV should oscillate between full and half color throughout the simulation. The RGB values of your color should decrease by one every 20 time steps until it reaches 128 and then increase by one every 20 time steps until it reach 255. Example below:
Red : (255,0,0), (254,0,0)…(128,0,0), (129,0,0)…(255,0,0)
Compiling and running your code:
Compile your code using
>module load mesa gcc mvapich2 >mpic++ *.cpp –lGLU –lglut –std=c++11
To run our code you will need to create an interactive session with 16 processes either using the remote VNC setup or using an X11 server as covered in class.
In the folder where your executable is located, execute the following commands:
>module load mesa gcc mvapich2 >mpirun -np 16 ./name_of_your_exectable
In a few seconds, a window should appear displaying your OpenGL rendering.
