Math 198 Hypergraphics AJ Johnson Project Report -- icbmCAVE May 9, 1996 icbmCAVE was designed to explore projectile motion in three dimensions. The user attempts to launch a projectile from Washington DC at various targets throughout the world by setting the initial firing velocity, pitch, and heading of the missile. Once the projectile is launched, however, the only external force acting on it is the earth’s gravitational field; the missile is not powered while in flight. The force of gravity is given by Newton’s law of universal gravitation: F = (G * me * mp) / (R^2) ir where G = 6.67 * 10^-11 Nm^2/kg^2 is the universal gravitation constant, me = 5.98 * 10^24 kg is the mass of the earth, mp is the mass of the projectile, and R is the radial distance of the projectile from the center of the earth. From Newton’s first law, the radial acceleration due to this force can be calculated: Ar = F/mp = dv/dt = (G * me) / (R^2) ir Once the projectile is launched, icbmCAVE calculates the change in velocity, dv, due to an incremental change in time, dt, for each point along its path. icbmCAVE was written for use in the CAVE in order to truly see the demonstration in 3D. When icbmCAVE is first started, the earth will appear in the center of the screen with two white boxes on the surface. The first box, located at Washington DC on the map, is the launch platform and sticking out from the center of the box is the launch pointer, indicating the current direction at which the projectile will be fired. The second box is the target. The object of icbmCAVE is to fire a missile from the launch platform and hit the target. While running in the CAVE, the user controls the view of the planet and projectile and the selection of firing velocity, pitch, and heading with the CAVE wand. This was implemented with five different viewing modes: two strictly for viewing and three for selecting the velocity, pitch, and heading. The center button on the control wand toggles between the available modes and the current mode is indicated by the color of the text on the screen. In all viewing modes the wand joystick translates the position of the earth through space. In control mode movement of the wand rolls the planet in one direction or another while the center of the planet remains fixed in space. Further, while in control mode the user can use the left and right buttons on the wand. The left button moves the target to a new city on the planet and the right button fires the projectile. When in control mode all screen text is purple. In fly mode motion of the wand rotates the user in space, giving the feeling of flying an airplane through space. The left and right buttons are not used in fly mode and all screen text is yellow. The remaining three modes allow the user to change the launch parameters. The left button decreases the current parameter while the right button increases the value. These parameters are displayed in the upper left hand corner of the screen. The current parameter is highlighted in yellow while all other text is purple. In addition, while in one of the selection modes, motion of the wand controls the rotation of the earth exactly as in normal control mode. When at the console, the current viewing mode is toggled with the spacebar. The firing velocity is incremented with the F5 key (shift-F5 to decrement), the pitch incremented with the F6 key (shift-F6 to decrement), and heading increased with the F7 key (shift-F7 to decrement). The projectile is launched by pressing the F8 key. Further, some commands are only available from the keyboard. F9 toggles the sound on and off, F10 toggles the planet surface on and off, and F11 toggles texture mapping on and off. F3 toggles between the two firing modes. By default, once a projectile hits or misses the target, icbmCAVE waits for the user to tell it to fire again. Pressing the F3 key tells icbmCAVE to immediately launch another projectile after the previous missile expires. The Z key resets the simulation and the escape button exits the application. The F4 key changes the redraw time, making the projectile appear to travel faster or slower in real-time. Note that this does not imply that the firing velocity is changed but simply that the projectile travels farther before a new frame is painted to the screen. The files included with this project are icbmCAVE.x (executable), icbmCAVE.c (source code), icbmtexx.h (texture mapping header file), xearth.ppm (texture map raw picture), 007theme.aiff, launch.aiff, and explode.aiff (sampled sounds). Before running icbmCAVE, vss2.2 must be running and SOUNDSERVER correctly set in the environment in order for the sound to function correctly. Note: currently 007theme.aiff, launch.aiff, and explode.aiff are located in Alex Bourd’s home directory, /afs/ncsa.uiuc.edu/projects/MATH490/bourd/. icbmCAVE was developed in the C++ illiShell written by Alex Bourd, George Francis, and Matthew Stiak. The original C version illiShell was written by George Francis, Glenn Chappell, and Chris Hartman. Further, I would like to thank Alex Bourd for his extensive help porting this program into the CAVE and making it come to life with sound and texture mapping.