Skip to content

Commit

Permalink
add boilerplate title and intro #264
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom authored Dec 18, 2018
1 parent 6a96ef8 commit 372d72c
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions doc/implementation-notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Wave Interference - implementation notes

This document contains notes related to the implementation of Wave Interference. The audience for this document is software developers who are familiar with JavaScript and PhET simulation development, as described in [PhET Development Overview](http://bit.ly/phet-html5-development-overview).

Before reading this document, see [model.md](https://github.com/phetsims/equality-explorer/blob/master/doc/model.md), which provides a high-level description of the simulation model.

## Overview

The Wave Interference simulation depicts waves on a 2 dimensional surface and the interference patterns they create.
The first 3 screens show a 2D lattice and time-based wave propagation, while the fourth screen shows the interference
pattern from a slit with a given 2d shape, which is instantly updated.
Expand All @@ -8,7 +16,7 @@ Other sim-specific query parameters are described in wave-interference/js/common
There are no dynamically created/destroyed user interface components or model elements in the simulation, so the
simulation doesn't require dispose calls.

# The first three Screens: Waves, Interference, Slits
## The first three Screens: Waves, Interference, Slits

The first three screens are mainly implemented in js/common.

Expand Down Expand Up @@ -43,7 +51,7 @@ correct.

The following values can also be reported by running with`?log`.

## Water
### Water
| Value | Frequency (Hz) | Wavelength (cm) |
| :--- | ---: | ---: |
| min | 0.25 | 7.4 |
Expand All @@ -52,13 +60,13 @@ The following values can also be reported by running with`?log`.
Wave speed measured at 7.1E-2/1.43 = 5cm/sec. In https://github.com/phetsims/wave-interference/issues/43 we decided this
is a reasonable wave speed for a wave pool, even though it doesn't match wave speeds for, say, oceanic waves.

## Sound
### Sound
| Value | Frequency (Hz) | Wavelength (cm) |
| :--- | ---: | ---: |
| min | 220 | 156 |
| max | 440 | 78 |

## Light
### Light
| Color | Frequency (THz) | Wavelength (nm) |
| :--- | ---: | ---: |
| Red (VisibleColor min) | 384.35 | 780.00 |
Expand All @@ -69,13 +77,13 @@ which is about 4% off of the true speed of light. Measuring the colored wavefro
Since the distance and wave propagation speeds are independent of frequency, measurements for different colors will
give the same speed of light. See also WavesScreenModel usage of `timeScaleFactor` for how the model is calibrated.

## Slits Screen
### Slits Screen
Here is a schematic for the two-slit dimensions:
![schematic for the two-slit dimensions](images/slitDimensions.jpg?raw=true "Two-Slit Dimensions")

By using `?dev`, you can show the IdealInterferenceOverlay, which depicts d sin(θ) = mλ (theoretical maxima) and d sin(θ) = (m+1/2)λ (theoretical minima).
See https://github.com/phetsims/wave-interference/issues/74

# The Final Screen: Diffraction
## The Final Screen: Diffraction
In the fourth screen, we use a Fast Fourier Transform (FFT) in order to compute the diffraction pattern, see
https://en.wikipedia.org/wiki/Diffraction

0 comments on commit 372d72c

Please sign in to comment.