Thanks, Jecel! This is great. I still have exercise answers and teachers notes to write, so with your permission, I'll pass this on to teachers that way.
Mark
Mark,
great draft chapter! By coincidence, I have always used the falling object example to explain Morphic (in Self). I don't know what your intended audience is, but when creating the example for people who have had some high school physics I like to use points for acceleration and velocity. The code is just as simple as what you presented (to the amazement of those who have tried something like this in some other language):
step velocity _ velocity + gravity. self bounds: (self bounds translateBy: velocity).
where you have set velocity to 0@1 or something. Now you can start with a horizontal velocity and get the nice parabola with no extra coding! In fact, with a slight patch in the above method to always have gravity pointing to some object (instead of straight down) you can plunge directly into celestial mechanics (and no - I don't mean SMTP ;-)
-- Jecel
-------------------------- Mark Guzdial : Georgia Tech : College of Computing : Atlanta, GA 30332-0280 Associate Professor - Learning Sciences & Technologies. Collaborative Software Lab - http://coweb.cc.gatech.edu/csl/ (404) 894-5618 : Fax (404) 894-0673 : guzdial@cc.gatech.edu http://www.cc.gatech.edu/gvu/people/Faculty/Mark.Guzdial.html