-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implementation, model, and README notes updated for code review, see #33
- Loading branch information
Showing
3 changed files
with
66 additions
and
2 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
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 |
---|---|---|
@@ -1 +1,15 @@ | ||
TODO implementation overview | ||
# Coulomb's Law - 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/coulombs-law/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 `Charge`. It handles all positioning as well as the charge values needed to calculate the displayed force. | ||
|
||
The primary distinction within Coulomb's Law is it's handling of negative object properties (charges) and force values. Here the force can be attractive or repulsive. | ||
|
||
## View |
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 |
---|---|---|
@@ -1 +1,19 @@ | ||
TODO model description | ||
# Coulomb's Law Model | ||
|
||
This document describes the model for the Coulomb's Law simulation. <br> | ||
@author Michael Barlow (PhET Interactive Simulations) | ||
|
||
## Inverse Square Law | ||
Coulomb's law is one of two inverse square laws that defines the force that two charges will exert upon each other. | ||
|
||
F = k( q1 * q2 / d<sup>2</sup>) | ||
|
||
Note: See the [Inverse Square Law Common](https://github.com/phetsims/inverse-square-law-common/blob/master/doc/model.md) library for model details. | ||
|
||
## Macro Scale | ||
|
||
Applies to a visual scale where the charges are ~1cm in diameter. When calculating the force, we use each charge's center when measuring distance. | ||
|
||
## Atomic Scale | ||
|
||
Applies to a more realistic scale in which the charges arou ~1pm in diameter and charge is measured in atomic units. |