Chapter 1. Vectors and Chapter 2. Forces from Nature of Code (2nd Edition)
Included here is a bare-bones version of the Mover
class described in Chapter 1, already pre-linked. The code includes some potentially novel JavaScript usage, so make sure you check it out, but it is largely what is found both in Chapter 1 and the 201 lab.
- update the
Mover
class to accomodate the concepts of mass and acceleration, as well as a way to apply external forces to aMover
(this is described in Chapter 2). - update your code to include at least one interactive element that applies a force to the movers in your code. There are several examples provided.
- update the code visually so that your forces make sense. For instance, if you were going to model the solar system, make it look like the solar system.