I have been looking at interference when waves interact. I found a basic simulator here: https://phet.colorado.edu/en/simulation/wave-interference, and I have been wondering about the math behind it. I have gathered that frequency, amplitude and the distance between the point source are all taken into account at least on the 2D level, but I do not understand how. I am also wondering about what the effect of a time separation between the activation of the sources would be and how I would calculate that. I would appreciate just a quick rundown of the equation for this. I will also be looking at this with more than 2 sources and I would like to look at it in 3d with 5 or more scores.

Thanks in advance.