8
$\begingroup$

My ultimate goal is to simulate the interference of two sinewaves. They do not have to follow at the moment any specific physical requirement (the wave modifier could be OK).

I thought to proceed by steps and first trying to render 1 sinewave and then 2. For each sinewave I would like to have a 2D representation, like a wave modifier seen from above (e.g. concentric circles on a water surface). I first tried using particles and let them arranged by a force field emitted by a mesh plane with a wave modifier. Seems ok, but it is very heavy on my PC. So I thought I would stick to the wave modifier only and find some way to render depths and peaks with different colors (a normal jet color map could be OK). I am not an expert so I wonder whether you could suggest a quick way to do this.

After this, I would like to simulate the interference of two waves, just visually, without any matematical calculation (again, imagine the example of drops of water falling on a water surface).

Ultimately, my plane would be to convert whatever I managed to do in 2D, in 3D (say on a spherical surface).

I would appreciate any input :) thanks !

$\endgroup$

2 Answers 2

13
$\begingroup$

If you'd like to visualize interference in 3D, that can also be done. The animation below illustrates 5 sine waves interacting with each other in 3D. The coloring is done by taking a slice through the combined waves and assigning colors to the intensity of the wave. Using shaders is fast enough that the images can be generated in real time. This solution is based on an an antenna/radar example here,

enter image description here

enter image description here


Details for visualizing 2 interfering waves on a surface - (Tested on Blender 2.92)

enter image description here

  1. To visualize 2 waves with interference, some simple geometry is setup for the visualization. The key is using the wave texture. A plane is used to visualize the waves, and 2 spheres are used to visualize and control the origin of the waves.

enter image description here

  1. Shaders are used to generate the visualization of the interference. The wave node texture performs the math for each wave and a math node sums the waves together to see the interference. The full shader for 2 interfering waves is shown below. This shader is named 'wave'

enter image description here

  • The nodes in the red frame calculate the sine waves and when summed together generate the interference patterns in 3D.
  • The nodes in white are used to specify the origin of the waves. To help with the visualization, this is done using the two spheres in the geometry that were called Wave Source 1 and Wave Source 2. The text Coordinate node is used to get their origin and then use that to set the origin of the waves.
  • The nodes in the two blue frames are used to set the wavelength and phase of the waves. The wavelength in blender defaults to 1mm, so it is scaled to meters. The phasing is defined in radians so it is scaled to degrees. If the phasing is animated, the sign will control the direction of travel of the wave.
  • The nodes in the green frame control how the calculated wave intensity is visualized. This node scales the wave intensity to a value between 0 and 1, then uses a color ramp to make it red where positive and blue where negative. Transparency is used to set the color emissivity to zero where there the intensity is near zero.
  • Note this shader defines the intensity everywhere. When it is applied to an object, it will show the wave intensity there.
  1. In this example, the shader called 'wave' is applied to a plane called 'surface'. This will show the wave intensity on that plane.

enter image description here

  1. Additional slices can be visualized by adding more planes to the scenes.

enter image description here enter image description here

The blender 2.92 model for this example is available here -


Extension #1 - Visualizing as a 3D wave enter image description here

  1. Add a volume for visualizing the waves.

enter image description here

  1. Copy and modify the previous surface shader. The turquoise frame shows the changes for volume rendering.

enter image description here

  • The math block on the left scales the input to 0..1 so it will work with a color ramp. The color is applied to a 'Principled Volume' color input. This sets to color of the location in the volume.
  • The math node connected to the alpha is used to scale the density which sets the opacity of the volume.
  1. Adjust light and setting to get desired look.

The blender 2.92 model for this example is available here -

References - See creating mesh on an isosurface


Extension #2 - Visualizing the interference as a surface wave

enter image description here

  1. Turn on experimental features for rendering. enter image description here

  2. Add a subdivision multiplier to the visualization plane. Use simple subdivision. Set adaptive.

enter image description here

  1. Add a displacement node to the shader.

enter image description here

The blender model for this example is available here - References


Extension #3 - Multiple wave sources By adding more wave sources, these kinds very complex wave interactions can be visualized.

enter image description here

enter image description here

This Blend file contains the model used to generate the animation - This blend file was generated in Blender 2.90


References

References - See http://exnumerus.blogspot.com/2021/02/visualizing-3d-sine-wave-using-blender.html This shows an application in Blender to illustrate how phased array radars and antennas work.

$\endgroup$
8
  • $\begingroup$ Thank you Ed. How you can visualize only slices of the interference. Are you just mapping it into the volume ? is it possible to projet them on a separate plane or even on a surface ? I would like to do it in a graded way, depending on the distance $\endgroup$
    – livio
    Feb 27, 2021 at 15:47
  • $\begingroup$ I have another question, if you don't mind: why the multipliers on the phase offset ? $\endgroup$
    – livio
    Feb 27, 2021 at 15:56
  • $\begingroup$ @user879506, the answer was updated to show the adding planes to the surface visualization. It also added an explanation for the scaling on the phase (convert degrees to radians). If this answers your question, please consider marking it as solved. $\endgroup$
    – Ed Tate
    Feb 27, 2021 at 18:33
  • 4
    $\begingroup$ Wow, this answer is above and beyond. Maybe the question landed right on your patch? Love your blog. $\endgroup$
    – Robin Betts
    Feb 27, 2021 at 19:21
  • $\begingroup$ thanks Ed ! that's very useful ! It will be definitely help me to make the model I was imagining. Really, thanks a lot ! It seems the only way to get a "line" wave front would be to add multiple points one next to each other. Is that the case ? Thanks again for the cool work ! $\endgroup$
    – livio
    Mar 1, 2021 at 8:34
11
$\begingroup$

There seems to be no need for 3D->2D->3D conversion. You can simply add 2 wave modifiers with different start positions and their displacement will be summed:

Modifiers & result

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .