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

AI Thread Summary
The discussion revolves around creating an interactive plot of a wave interference function using Wolfram, with a focus on adjustable parameters. The original formula provided includes exponential decay and sine functions based on distance, but users encountered issues with plotting due to character limits and syntax errors. Suggestions include removing the "plot" command to see results, but this does not yield an interactive plot. Participants discuss the need for specific code snippets or libraries that can facilitate the creation of a surface grid, expressing familiarity with programming languages like Java and Python, while also considering C/C++ for potentially better performance. One user points out an error in the original formula regarding the sine components needing to match the distance formula used in the exponential decay. Excel is mentioned as a surprisingly effective tool for this type of analysis, especially when combined with Visual Basic. Overall, the thread seeks guidance on achieving a more refined visualization of wave interference without the initial objects and with improved parameter control.
BiGyElLoWhAt
Gold Member
Messages
1,637
Reaction score
138
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
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
 
Hate to admit it, but excel (?:)) goes a long way...
(especially in combination with VB)

##\ ##
 
Thread 'Star maps using Blender'
Blender just recently dropped a new version, 4.5(with 5.0 on the horizon), and within it was a new feature for which I immediately thought of a use for. The new feature was a .csv importer for Geometry nodes. Geometry nodes are a method of modelling that uses a node tree to create 3D models which offers more flexibility than straight modeling does. The .csv importer node allows you to bring in a .csv file and use the data in it to control aspects of your model. So for example, if you...
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...

Similar threads

Replies
0
Views
869
Replies
0
Views
405
Replies
1
Views
11K
Replies
0
Views
395
Replies
1
Views
3K
Back
Top