HW0: Introduction to Simulations
CS 493, Dr. Lawlor
Here is a spreadsheet that simulates ballistic motion.
- Using the given physics, pick initial conditions in row 3 so that at t=+2 seconds, position=+5 meters and velocity=+5 meters/second (to an accuracy of one significant digit). Save your new spreadsheet as "hw0_1.xls".
- Add an "energy" column that sums the potential and kinetic energy of the particle, in Joules. You may assume a particle mass of 1Kg. While the particle travels through free space, this energy should be conserved, although it will change during collisions, and tends to grow with a small factor proportional to the timestep. Save this spreadsheet as "hw0_2.xls". (Hint: write the equation once, select the cells below, and "Fill Down".)
- Add an approximation for air resistance to the simulation. You should see the total energy decrease due to the energy lost to air resistance. A huge number of possible air resistance approximations exist, from the trivial "reduce velocity by 1% per timestep" to the turbulence-derived drag equation. Save your spreadsheet as "hw0_3.xls".
- Verify that you can run WebGL, at http://get.webgl.org/. Save a screenshot of this page running in your browser as "hw0_4.jpg".
Turn in your three spreadsheets and screenshot on Blackboard by midnight Thursday, January 24.