Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 6. Interacting objects: Newton’s... > First extension: Creating movement

6.4. First extension: Creating movement

Okay, enough looking at what’s there. It is time to write some code and make something happen.

The first obvious experiment is to make the bodies move. We have mentioned that the SmoothMover class provides a move() method, and since a Body is a SmoothMover, it, too, has access to this method.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial