Thursday, October 28, 2004

Turing Lecture - Add Gravity


Bridge-2
Originally uploaded by Croqueteer.
This is a (simulated) scene from Alan's Turing Lecture. This is a pseudoscripting system that Andreas put together last week to match the look of the etoys system and present the code in a bit more readable form. Otherwise, this pretty much the same code for the flag as seen below. This is real code - we are indeed modifying it as the system runs and not only that, but it is being done collaboratively, so if we had mutliple machines running this they would all recieive the same new code and compile it.

Here we are comuting the acceleration of the mass from the force and then computing the new velocity and new mass location from this. The last line sets the initial force to a downward gravity of -2.5. The other two values in that vector are there to create noise.

No comments: