Can anyone help shedding some light on how ripple tanks are programmed? example I'm looking to simulate light waves, to perform theoretical calculations, as opposed to for just visual effect. The ones I've found lack the ability to set a specific wavelength and place objects (e.g slits, walls) at specific locations.
-
Hi, it's hard to tell what you are asking. Ripple tanks (at least the ones in my high school circa 1970) use oscillators to generate sinusoidal pressure waves. If you control the oscillation frequency and the size/position of the impeller plates, you get wave interactions. – Carl Witthoft Apr 08 '21 at 12:31
-
I'm looking for the rules that govern wave interaction (for a simulation of a ripple tank, as opposed to a physical ripple tank), this has given me the most promise so far https://www.gdcvault.com/play/203/Fast-Water-Simulation-for-Games%22%3EFast, but still I have concerns about this approach – Morgan Gethin Barrett Apr 08 '21 at 16:17
1 Answers
You can view the source code for your example by right clicking in your web browser and clicking "view source", then navigate inside the iframe and view its source. This link should work for chrome and firefox: example source code
There are always diverse scientific libraries available for python. Here are some I found in a quick search:
LightPipes for Python 2.0.9
LightPipes 8.3.3. Two holes interferometer.
Interactive visualization of propagation of light in Jupyter notebook
OpenFOAM is an opensource computational fluid dynamics package. It was mainly developed for physical fluids and works by solving the Navier–Stokes equations across an array of 2d or 3d cells. There have been some electromagnetic solvers that have been added. This might be a good solution if you are attempting to test with more complex geometry. Not sure that there is anything specifically for light, but they have a strong community so that might be something to look into.
- 7,689
- 1
- 9
- 28