HW0: Newtonian Mechanics
CS
482/681, Dr. Lawlor
In this homework, use the
Simple Newtonian example to simulate the Newtonian
mechanics of a particle moving under gravity:
Position P
Velocity V = dP/dt
Acceleration A = dV/dt = gravitational acceleration of
9.8 meters/sec^2 in the downward (negative z) direction
When your particle reaches the floor, P.z<=0, make it bounce by
making the Z component of the velocity positive.
681 students: make your simulation measure and conserve energy,
including when it bounces off the floor, for example by using Leapfrog
or Verlet
time integration.
To save your PixAnvil simulation, hit the "Save" tab, select all the
text, and save it to a .html file using a plain text editor such as
Notepad. Make a zipfile to turn in your updated .html simulation on
Blackboard (you'll need to log in first)
before the end of the day on Wednesday, January 25.