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)

##\ ##
 

1. How does a 3d plot show interference from 2 wave sources?

A 3d plot is a graphical representation of a 3-dimensional dataset. In the case of interference from 2 wave sources, the plot will show the combined amplitude of the waves at each point on a 2-dimensional grid surface. This allows us to visualize the pattern of constructive and destructive interference.

2. What is the purpose of using a 2d grid surface for the 3d plot?

The 2d grid surface represents the location where the interference is being observed. By plotting the interference on this surface, we can see how the waves behave at different points and how they interact with each other.

3. How is the amplitude of the waves calculated for the 3d plot?

The amplitude of the waves is calculated using the principle of superposition, which states that the net amplitude at any point is equal to the sum of the individual amplitudes of the interfering waves. This calculation is repeated for each point on the 2d grid surface to create the 3d plot.

4. Can a 3d plot of interference from 2 wave sources be used to predict the interference pattern?

Yes, a 3d plot can be used to predict the interference pattern by analyzing the shape and amplitude of the plot. The pattern of constructive and destructive interference will be reflected in the peaks and valleys of the plot.

5. Are there any limitations to using a 3d plot for interference from 2 wave sources?

One limitation is that the 3d plot only shows the interference at a specific point in time, so it cannot capture any changes in the interference pattern over time. Additionally, the plot may become complex and difficult to interpret when dealing with multiple sources and complex wave patterns.

Similar threads

  • Programming and Computer Science
Replies
15
Views
2K
  • Programming and Computer Science
Replies
1
Views
9K
  • Programming and Computer Science
Replies
4
Views
609
Replies
1
Views
1K
  • Programming and Computer Science
Replies
2
Views
4K
  • Programming and Computer Science
Replies
1
Views
2K
  • Programming and Computer Science
Replies
6
Views
1K
  • Programming and Computer Science
Replies
11
Views
2K
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
1
Views
941
Back
Top