1. Engineering
  2. Computer Science
  3. in python using matplotlib...

Question: in python using matplotlib...

Question details

Consider dropping two small rocks in a pond. They enter the waler at the same time, at a certain distacne from each other. What is the interference pattern of waves on the surface of the pond? The wave height at point (x, y) from where the firsl rock entered the waler at point (r.yi)s where k-2x/ is the wavenumber related to the wavelength, and f(ri) - A sin(kri) The interference of the two waves is in.n)A sin(krz) + A sin(krz) Let the wavelength be 2 5 cm, the ampitude be A 1 cm, and the rooks points of entry be 20 cm apart. Write a program to make an image over 1 m2 of the pond. To make the image create an array of values representing the heigth of the wave on a grid of paints, then make a pcolormesh piot Here is the outline of the code: #ALL UNITS IN㎝ wavelength-5. k2numpy pi/wavelength seperation 20.8 side of plot 10.0 points 500 spacing side of plot/points height numpy, empty(Ipoints,points], float) x1+ side/2 + seperation/2 x2 side/2 seperation/2 y2 side/2 # INCOMPLETE CODE PRESENTED HERE! (1: loop over points along x side y spacing 1 Loop over points along y side) x spacing*j height [4.j)- NOW MAKE THE PLOT
In python using matplotlib
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution