Repository navigation
2D wave
First of all, to develop this practice, we used the 2D sinusoids that after some operations using the Euler method we obtain a function of sines and cosines. They depend on the number of rows and columns that we have selected, that in this case is 512x512. Also, they are sinusoidal “gratings” of unit amplitude, period λ and direction θ.

Then 2piw/N is the radian frequency, and w/N the frequency, of the wavefront and λ=N/w is the wavelength in pixels in the wavefront direction. To simplify this practice, we used Kx and Ky and after applying some operations we obtain the terms said before. After that we use just the real part, discarding the imaginary one, and we will have the wave. All this is represented on the code view.

We are able to see in the program, when we run it, four edit fields. Two first ones implement the rows and columns that we decided to use, but you will be able to select the rows and columns you want as long as they make a quadratic image. The other two are to select the Kx and Ky axis if you want an exact number for the 2D wave.
Then you have two spinners where you can select the Kx and Ky again, but those values will be much less accurate than the edit fields. Also, you can see the limits up to what you can choose. After pressing the execute button, an image will be displayed according to our preferences.

In this image we have the 2D wave plot just in two dimensions. We can observe the different deepnesses of the wave run by the constants chosen
Video of how it works: https://youtu.be/mZ3zwHrs56k