-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc directory added, incl. model and implementation notes, see #55
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Gravity Force Lab Basics - Implementation Notes | ||
|
||
This document contains notes that will be helpful to developers and future maintainers of this simulation. | ||
|
||
## Model | ||
|
||
Start by reading the model description in https://github.com/phetsims/gravity-force-lab-basics/blob/master/doc/model.md | ||
|
||
Following that, almost all types in the model and view are inherited from the Inverse Square Law Common library. It will be useful to become familiar with its [model](https://github.com/phetsims/inverse-square-law-common/blob/master/doc/model.md) and [implementation](https://github.com/phetsims/inverse-square-law-common/blob/master/doc/implementation-notes.md) | ||
|
||
The primary type in this sim is the `Mass`. It handles all positioning as well as the mass values needed to calculate the displayed force. It is an ISLCObject where only one of radius or density is dynamic at a time. | ||
|
||
Unlike in Coulomb's Law, here the force can only be attractive, and it is measured from the objects' centers. | ||
|
||
## View | ||
|
||
The user will mainly be interacting with the ruler, the mass objects, and their control panel. The mass objects have a minimum separation that is always maintained. When dragging one mass, the other's position will never change. Finally, the arrows are added to the screenviews as siblings of the mass nodes themselves. This ensures that both arrows appear in the top layer of the scene graph. | ||
|
||
### Mass Nodes | ||
These are instances of ISLCObjectNodes with dynamic or constant radius. See the [ISLC implementation](https://github.com/phetsims/inverse-square-law-common/blob/master/doc/implementation-notes.md) for the details on updating pullers, force values, and arrows. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Model Notes | ||
=========== | ||
|
||
This document describes the model for the Gravity Force Lab simulation. <br> | ||
@author Jesse Greenberg (PhET Interactive Simulations) | ||
@author Michael Barlow (PhET Interactive Simulations) | ||
|
||
The underlying model for gravitational forces between two masses depicted in this simulation is Newton's law of Gravitation. | ||
Please see | ||
https://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation for more information on this. | ||
|
||
The simulation portrays how the gravitational force changes when masses are changed or the distance between them changes. | ||
|
||
## Inverse Square Law | ||
|
||
As an example of an Inverse Square Law, the underlying model for the gravitational force can be found at: | ||
|
||
[Inverse Square Law Common](https://github.com/phetsims/inverse-square-law-common/blob/master/doc/model.md) |