Skip to content

Commit

Permalink
implementation, model, and README notes updated for code review, see #33
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarlow12 committed Nov 21, 2017
1 parent b918a95 commit ef9513a
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 2 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,37 @@ The <a href="http://bit.ly/phet-html5-development-overview" target="_blank">PhET
Development. This guide includes how to obtain simulation code and its dependencies, notes about architecture & design, how to test and build
the sims, as well as other important information.

### Quick Start
(1) Clone the simulation and its dependencies:
```
git clone https://github.com/phetsims/assert.git
git clone https://github.com/phetsims/axon.git
git clone https://github.com/phetsims/babel.git
git clone https://github.com/phetsims/brand.git
git clone https://github.com/phetsims/chipper.git
git clone https://github.com/phetsims/coulombs-law.git
git clone https://github.com/phetsims/dot.git
git clone https://github.com/phetsims/inverse-square-law-common.git
git clone https://github.com/phetsims/joist.git
git clone https://github.com/phetsims/kite.git
git clone https://github.com/phetsims/phet-core.git
git clone https://github.com/phetsims/phetcommon.git
git clone https://github.com/phetsims/query-string-machine.git
git clone https://github.com/phetsims/scenery.git
git clone https://github.com/phetsims/scenery-phet.git
git clone https://github.com/phetsims/sherpa.git
git clone https://github.com/phetsims/sun.git
git clone https://github.com/phetsims/tandem.git
```
(2) Start an http-server

(3) Open `http://localhost/coulombs-law/coulombs-law_en.html` (You will probably need to modify this URL based on your HTTP port and relative path.)

### Get Involved

Contact us at our Google Group: <a href="http://groups.google.com/forum/#!forum/developing-interactive-simulations-in-html5" target="_blank">Developing Interactive Simulations in HTML5</a>

Help us improve, create a <a href="http://github.com/phetsims/coulombs-law/issues/new" target="_blank">New Issue</a>

### License
See the <a href="https://github.com/phetsims/coulombs-law/blob/master/LICENSE" target="_blank">LICENSE</a>
16 changes: 15 additions & 1 deletion doc/implementation-notes.md
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
20 changes: 19 additions & 1 deletion doc/model.md
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.

0 comments on commit ef9513a

Please sign in to comment.