Polarization is the shape traced by an electromagnetic wave's electric-field vector in the plane perpendicular to its direction of travel. It is not color, brightness, or a cosmetic rendering mode. For a wave travelling in the +z direction, the useful state is two perpendicular components—usually x and y—plus their amplitudes and relative phase.
"circular". Store amplitudes and phase difference, sample both at the same time, then classify the resulting trajectory. That representation makes the special cases testable and leaves room for a later optical element to transform the state.One compact ideal model is
\[E_x(t)=A_x\cos(\omega t),\qquad E_y(t)=A_y\cos(\omega t+\delta)\]At a fixed position, plot E_x(t) horizontally and E_y(t) vertically as time advances. If δ = 0 or π, both components reach their extrema together and the tip stays on a straight line: linear polarization. If A_x = A_y and δ = +π/2 or −π/2, the tip rotates at constant radius: circular polarization. Every ordinary mismatch of amplitude or phase produces an ellipse. The sign convention determines whether a particular observer calls the rotation right- or left-handed, so code must document its viewing direction rather than attaching a universal label.
type PolarizationInput = { xAmplitude: number; yAmplitude: number; phase: number; omega: number };
function samplePolarization(input: PolarizationInput, time: number) {
const phaseNow = input.omega * time;
return {
ex: input.xAmplitude * Math.cos(phaseNow),
ey: input.yAmplitude * Math.cos(phaseNow + input.phase),
};
}
The first checks should target limiting cases, not a rendered ellipse. With yAmplitude = 0, every sample must have ey = 0. With equal amplitudes and a quarter-cycle phase difference, ex² + ey² should remain constant up to floating-point tolerance. Adding the same extra phase to both components only chooses a different point at which to start sampling; it should not alter the ellipse. A normalized intensity proxy often scales as A_x² + A_y² in this simple basis, but intensity alone discards the relative phase that makes polarization meaningful.
Change the y-component amplitude and its phase delay. The trace is the electric-field tip at one location, with x and y axes as its transverse basis.
x amplitude 1.0; y amplitude 1.0; relative phase 90°; ideal state: circular polarization.
Prediction: A quarter-cycle delay between equal transverse components makes the field tip rotate, while the same delay between unequal components makes an ellipse.
SampleA_x = A_y = 1 at δ = 0 and then at δ = π/2. Inspect the points at t = 0, T/4, T/2, and 3T/4, where T = 2π/ω. Then set A_y = 0.5 without changing the phase and state which regression check distinguishes the circle from the ellipse.Polarizers are filters on this vector state. An ideal linear polarizer passes the component along its transmission axis and rejects the perpendicular component. A more complete simulation can encode that as a projection onto a unit axis; two crossed ideal polarizers then have zero transmitted field in the ideal model. Wave plates instead introduce a relative phase delay, which is why they can turn a suitable linear state into a circular one. These are transformations of components, not recoloring operations.
Polarization is two transverse field components plus their relative phase. Sample those components directly, use limiting-case assertions to classify the trajectory, and treat polarizers and wave plates as state transformations. A brightness or color value cannot carry the phase information this model needs.
Treat the lesson as a small function before treating it as a fact to memorize. Give every value a unit, keep only the state needed for the next step, and make the output easy to inspect.
\[\text{observable output} = f(\text{inputs},\,\text{state})\]For Polarization, write down the quantities you can control, the values your program must retain, and the result a reader could inspect. In Maxwell’s Equations and EM Waves, the useful program is not the drawing: it is the smallest explicit model that makes a prediction you can test.
Prediction: changing one declared input while holding the others fixed should change only the outputs that the model connects to that input. Choose one input, predict the direction of change, then check a limiting case such as zero, a symmetric arrangement, or a familiar low-speed or small-change approximation.
This lesson is a teaching model, not a complete simulator. Before using it outside the stated question, check which interactions, scales, uncertainties, boundary conditions, and measurement limits it leaves out.
Treat Polarization as a contract: named inputs and units enter a rule, the rule produces an observable result, and a known limit or invariant checks whether the implementation deserves trust.
Model polarization from explicit transverse field components and their relative phase.