Amplitude bei Interferenz

y_P = 0 (slider from -5 to 10, step 0.5)
x_P = 1 (slider from 0 to 10, step 0.001)
E_2 = (0, 0)
E_1 = (0, 3)
P: (x_P, y_P)
s_1 = Segment(E_1, P)
s_2 = Segment(E_2, P)
Δs: abs(s_2 - s_1)
λ = 0.5 (slider from 0 to 5, step 0.1)
φ_R: ((2 * π) * Δs / λ)
φ_G: (360 * Δs / λ)
Amp_E = 1 (slider from -5 to 5, step 1)
Amp_P: (Amp_E * sqrt((1 + cos(φ_R))^(2) + sin(φ_R)^(2)))
A: (x(P), Amp_P)
f(x) = (Amp_E * sqrt(2 + (2 * cos(((abs(sqrt((x(E_2) - x)^(2) + (y(E_2) - y(P))^(2)) - sqrt((x(E_1) - x)^(2) + (y(E_1) - y(P))^(2))) * 2) * π / λ)))))