3d plot of interference from 2 wave sources with 2d grid surface

In summary, a formula was provided that had errors. The sine parts needed to use the same distance formula (sqrt of sum of x and y distances) as the exp (attenuation) part.
  • #1
BiGyElLoWhAt
Gold Member
1,622
131
TL;DR Summary
Library suggestions or code snippets, either java or python (or wolfram query), to make a 2d mesh surface (with grid) that is the superposition of 2 decaying waves starting from 2 different points.
Desired output similar to image, but without the objects and with better wave interference:
s%2F2016%2F04%2FGravitational-Waves-e1509124765609.jpg

I tried plugging the following into wolfram (I specifically want the values to be adjustable):
plot z= H*e^(-m*sqrt((x-a)^2+(y-b)^2))*sin(k*(x-a)+k*(y-b) -w*t) + J*e^(-m*sqrt((x-c)^2+(y-d)^2))*sin(k*(x-c)+k*(y-d) -w*t), H=1, J=1, m=1, a=0, b=0, k=1, w=1, t=0, c=5, d=5

I've actually tried several variations on this including adding a 'for' before the variable list.
*Edit, removing "plot" gives some results, and it correctly interprets what I want, but doesn't give the plot*
I'm not sure if there is a specific way I need to plug this in to get an interactive plot, or if it just can't handle that many parameters. It keeps "interpreting as plot".

Any suggestions for library's/specific code snippets (or maybe there is already a program that basically does this?) that will help me make this surface grid are very much appreciated. I am pretty decent with java and python, but if maybe C/+/# are for some reason objectively better for this, I have experience with those as well.

I plan on adding sliders for the parameters listed at the end. Let me know if I left out anything crucial or if it's unclear what I'm after and I'll update the post as needed.

Thanks in advance.
 
Technology news on Phys.org
  • #2
Have a look at this. Needed to hard-code some parameters cos Wolfram has a limit on number of characters.
Your formula had an error. The sine parts need to use the same distance formula (sqrt of sum of x and y distances) as the exp (attenuation) part.

plot e^(-1*sqrt(x^2+y^2))*sin(2*sqrt(x^2+y^2)-w*t)+e^(-1*sqrt((x-c)^2+(y-d)^2))*sin(2*sqrt((x-c)^2+(y-d)^2)-w*t) where w=1,t=0,c=5,d=5, for x from -5 to 10, y from -5 to 10
 
  • Like
Likes BvU
  • #3
Hate to admit it, but excel (?:)) goes a long way...
(especially in combination with VB)

##\ ##
 

Related to 3d plot of interference from 2 wave sources with 2d grid surface

1. How do you create a 3D plot of interference from 2 wave sources with a 2D grid surface?

To create a 3D plot of interference from 2 wave sources with a 2D grid surface, you can use software like MATLAB or Python with libraries such as Matplotlib. First, define the positions and properties of the two wave sources and the grid surface. Then, calculate the interference pattern at each point on the grid surface based on the superposition of the waves. Finally, plot the 3D surface using the calculated interference values.

2. What is interference in the context of wave sources?

In the context of wave sources, interference refers to the phenomenon where two or more waves overlap and interact with each other. This interaction results in the formation of a new wave pattern that is a combination of the individual waves. Interference can lead to constructive interference, where the waves reinforce each other, or destructive interference, where the waves cancel each other out.

3. How does the 2D grid surface affect the interference pattern?

The 2D grid surface acts as a canvas on which the interference pattern from the two wave sources is displayed. The interference pattern is calculated at each point on the grid surface based on the superposition of the waves from the two sources. The grid surface helps visualize how the interference pattern varies across space and can reveal features such as interference fringes, nodes, and antinodes.

4. What are some applications of studying interference from 2 wave sources with a 2D grid surface?

Studying interference from 2 wave sources with a 2D grid surface has various applications in physics, engineering, and optics. It can be used to analyze diffraction patterns, design antennas, optimize acoustic systems, and understand the behavior of waves in different mediums. Interference patterns are also fundamental in the field of quantum mechanics and can be used to study wave-particle duality.

5. How can the phase difference between the two wave sources affect the interference pattern?

The phase difference between the two wave sources determines whether constructive or destructive interference occurs. When the waves are in phase (phase difference of 0 or a multiple of 2π), they reinforce each other and create a stronger interference pattern. In contrast, when the waves are out of phase (phase difference of π or an odd multiple of π), they cancel each other out and result in a weaker interference pattern. Adjusting the phase difference can control the characteristics of the interference pattern, such as the spacing of interference fringes.

Similar threads

Replies
1
Views
9K
Replies
4
Views
1K
Replies
1
Views
2K
Replies
4
Views
2K
Replies
11
Views
2K
Replies
5
Views
3K
Back
Top