- numpy - matplotlib Physim

Plot a Wave

In this section you will practice and apply what you have learned from the Properties of Waves simulation, creating a wave plotter to plot waves given a user input of amplitude, wave number, frequency, and phase constant and understanding the calculations being done.


If you are looking for a reference for Python consider looking at the Python Reference Sheet on the site.



Below are sample runs of some of the outputs you should get when running the program.


Plot a Wave


For user input amplitude = 7, wave number = 1, frequency = 0, and phase constant = 0, the output should be:


For user input amplitude = 2.5, wave number = 5, frequency = 0, and phase constant = 3.14, the output should be:


For user input amplitude = 10, wave number = 2, frequency = 0, and phase constant = 1.571, the output should be:


For user input amplitude = 1, wave number = 10, frequency = 0, and phase constant = 0, the output should be:


For user input amplitude = 5, wave number = 5.5, frequency = 0, and phase constant = 4.711, the output should be:


Note: If you would like to see the wave moving, go back to the Wave Properties Simulation. The framework running python in the browser does not yet support running simulations. Hence the frequencies all being set to 0.


Here is a code editor so that you can compute your calculator program.


# insert your code here


Go Back to Wave Exercises Page