The waveform is… complex now, to say the least. It might not even be periodic anymore! But how can we concretely define this notion of “coherence”? Technically the wave is well-defined everywhere in space here. Indeed if we knew the underlying ten pure waves, we could know exactly what this ugly wave is doing everywhere in space.
But in reality we don’t have the luxury of perfectly measuring the wave at every position for all time. We have to make do with sampling a subset of it. Let’s consider a pure state again, where we measure the value of a portion over time and see how much that information constrains the wave’s behaviour at another position:
//y(t) for the measured point of the wave (red dot)p1_t = {var p1_t = [];for (var t =1; t <= observation_time; t++){var j = d1x_m3 * distance / NumPoints;var k = t / wavelength_m3; p1_t.push([k,amplitude_m3 *Math.sin(j *2*Math.PI/ wavelength_m3 + k)]); }return p1_t;}
Code
//y(t) for the hypothetical point of the wave (blue dot)p2_t = {var p2_t = [];for (var t =1; t <= observation_time; t++){var j = d5x_m3 * distance / NumPoints;var k = t / wavelength_m3; p2_t.push([k,amplitude_m3 *Math.sin(j *2*Math.PI/ wavelength_m3 + k)]); }return p2_t;}