# Mathematics and physical interpretation

## An ideal plane wave

For a monochromatic plane wave traveling in the positive x-direction in vacuum,
one convenient model is

```text
E(x,t) = ŷ E₀ sin(kx − ωt + φ)
B(x,t) = ẑ B₀ sin(kx − ωt + φ)
```

Here ŷ and ẑ are unit vectors, E₀ and B₀ are amplitudes, φ is a phase offset,
`k = 2π/λ` is the angular wavenumber, and `ω = 2πf` is angular frequency.
The fields oscillate in phase and are perpendicular to each other and to the
direction of propagation. The sign of `kx − ωt` makes constant-phase points
move in the positive x-direction. For this ideal vacuum wave,

```text
c = λf = ω/k       and       B₀ = E₀/c.
```

`E` is measured in volts per meter (V/m), `B` in tesla (T), `λ` in meters,
`f` in hertz (Hz), `ω` in radians per second, and `k` in radians per meter.
The speed of light in vacuum is exactly `c = 299,792,458 m/s`.

The phase satisfies the one-dimensional wave equation, for example
`∂²Eᵧ/∂x² = (1/c²) ∂²Eᵧ/∂t²`. This is a useful connection to partial
differential equations: both spatial curvature and temporal acceleration are
proportional to the same sinusoid. The picture illustrates such a wave; it
does not numerically solve this equation or Maxwell's equations.

## Frequency and wavelength

The frequency control covers 400–790 THz (`1 THz = 10¹² Hz`) and defaults
to 500 THz. In vacuum, `λ = c/f` and the period is `T = 1/f`.

| Frequency | Vacuum wavelength | Period |
| --- | ---: | ---: |
| 400 THz | 749.5 nm | 2.50 fs |
| 500 THz | 599.6 nm | 2.00 fs |
| 790 THz | 379.5 nm | 1.27 fs |

`1 nm = 10⁻⁹ m` and `1 fs = 10⁻¹⁵ s`. These wavelengths span roughly
the visible range and its edges; perceived color depends on viewing conditions
and cannot be inferred exactly from a screen color. Increasing frequency
decreases the vacuum wavelength and period.

## Energy and field strength

For a photon of frequency `f`, the energy is `E_photon = hf`, where
`h = 6.62607015 × 10⁻³⁴ J·s` exactly. At 500 THz this is approximately
`3.313 × 10⁻¹⁹ J`, or `2.068 eV` using
`1 eV = 1.602176634 × 10⁻¹⁹ J`. This is energy **per photon**, not the
energy represented by a decorative particle in the display.

For the ideal sinusoidal vacuum wave above, the time-averaged intensity is
`I = ½ ε₀cE₀²`, in W/m². The instantaneous energy-flow direction is given
by the Poynting vector `S = (1/μ₀) E × B`: with the orientations above it
points along +x. Frequency alone does not determine intensity or the field
amplitude; those require additional physical information.

## Reading the visualization responsibly

The rendering uses normalized shapes and independent visual scales for Eᵧ
and Bᶻ. A displayed height or a ratio of heights is not a measurement in V/m
or T, and the physical relation `E₀ = cB₀` cannot be read from their relative
screen heights. Animation time and distance are visual aids, not necessarily
literal femtoseconds and nanometers. The particle effect is decorative.

This simplified plane-wave discussion assumes vacuum and does not model
sources, boundaries, polarization mixtures, material dispersion, quantum
measurement, reconnection, or gravity. The visualization is not a Maxwell
solver and should not be used to calculate physical field strengths or
experimental predictions from screen measurements.

## Nonrelativistic test-particle motion

The particle modules use the Lorentz force in prescribed fields:

```text
dv/dt = (q/m)(E + v × B)
dx/dt = v
```

The Boris update splits the electric impulse around the magnetic rotation.
With `v⁻ = vⁿ + (qE/m)Δt/2`, `t = (qB/m)Δt/2`,
`s = 2t/(1 + |t|²)`, and `v' = v⁻ + v⁻ × t`, it computes
`v⁺ = v⁻ + v' × s`, then `vⁿ⁺¹ = v⁺ + (qE/m)Δt/2`. The position is advanced
using `vⁿ⁺¹`. The implementation is in
[particle-integrator.js](../src/physics/particle-integrator.js).

This nonrelativistic test-particle method does not let particles change the
fields. Its magnetic-only rotation preserves speed up to floating-point
roundoff, but finite-step gyro phase is approximate. See
[the automated tests](../tests/particle-integrator.test.js); they are
dimensionless method checks, not physical plasma validation.

## Prescribed symmetric current sheet

The symmetric reconnection preset defines

```text
Bx(y) = B₀ tanh((y − y₀)/δ)
By = 0
Bz = Bg
Jz(y) = −(1/μ₀) dBx/dy
      = −B₀/(μ₀δ) sech²((y − y₀)/δ)
```

Here `B₀` and `Bg` are in tesla, `y₀` and `δ` are in meters, and `Jz` is in
A/m². The center-sheet diagnostic uses `y = y₀`, giving
`Jz(y₀) = −B₀/(μ₀δ)`. The calculation is implemented in
[reconnection-models.js](../src/physics/reconnection-models.js).

This is a static prescribed field, not a pressure-balanced equilibrium or an
active reconnection solution. The electric field in the current reconnection
view is zero; its field-line overlays are explicitly schematic.

## Double-well symmetry comparison

The symmetry model uses the one-dimensional potential

```text
V(x) = −(α/2)x² + (β/4)x⁴ + λx.
```

For `α > 0`, `β > 0`, and `λ = 0`, the minima are at
`x = ±√(α/β)`. A nonzero `λ` explicitly tilts the potential. For sampled
reference and modified scalar models, the displayed RMS deviation is
`sqrt(mean((f_modified − f_reference)²))`; the mean absolute deviation is
reported separately by the shared analysis utility in
[symmetry-analysis.js](../src/physics/symmetry-analysis.js). These model
comparisons do not, on their own, establish spontaneous symmetry breaking or a
universal complexity measure.
