Comparing Dirichlet and Neumann boundary conditions for waves escaping a polar ring: 3D view @NilsBerglund
Comparing Dirichlet and Neumann boundary conditions for waves escaping a polar ring: 3D view  @NilsBerglund
Uploaded October 2026 | Updated November 2026, 6 days ago
This is a 3D rendering of the simulation youtu.be/7xqcuro_pPI comparing the effect of Dirichlet boundary conditions (top half) and Neumann boundary conditions (bottom half) for waves generated in the middle of a ring of obstacles put in a radial pattern, used before in the video youtu.be/nromB5BdaA0 .
Dirichlet boundary conditions are very easy to implement in a finite difference scheme: it suffices to keep the wave height equal to zero outside the domain, and use this zero value when computing the discrete Laplacian. For Neumann boundary conditions, however, one has to implement the condition that the normal derivative of the wave height is zero at the boundary. This is implemented here by adding "ghost" points next to the grid points in the domain, and computing their value in such a way that the normal derivative is approximately zero. These points are then used to compute the discrete Laplacian at points in the domain next to the boundary.
The color hue depends on the wave height. The observer rotates around the domain in the course of the simulation.

Render time: 1 hour 19 minutes
Compression: crf 25
Color scheme: Plasma by Nathaniel J. Smith and Stefan van der Walt
github.com/BIDS/colormap

Music: "Socialite Mugshot" by Verified Picasso@verifiedpicasso7260

See also
https://images.math.cnrs.fr/des-ondes-dans-mon-billard-partie-i/ for more explanations (in French) on a few previous simulations of wave equations.

The simulation solves the wave equation by discretization. The algorithm is adapted from the paper hplgit.github.io/fdm-book/doc/pub/wave/pdf/wave-4print.pdf
C code: github.com/nilsberglund-orleans/YouTube-simulations
https://www.idpoisson.fr/berglund/software.html
Many thanks to Marco Mancini and Julian Kauth for helping me to accelerate my code!

#wave #obstacles #diffraction
Comparing Dirichlet and Neumann boundary conditions for waves escaping a polar ring: 3D viewGliders in the Gray-Scott model on the sphereCharged magnetic pentagons on a rotating sphereIncreasing the force constant for charged particles on a sphere: Charge ratio 1:1Winnowing 3: Throwing the particles from the groundFrom salt crystals to plasma: Decreasing the force constant for charged particles on a sphereWaves escaping an Archimedes spiral of obstaclesThe Gray-Scott model with smaller feed rateFrom snakes to mazes in the Gray-Scott model on the sphereComparison of wave propagation in a lattice of connected circles: Effect of circle radiusHexagons on a rotating sphereTemperature cycling in a simple model for steel
Nils Berglund |

Comparing Dirichlet and Neumann boundary conditions for waves escaping a polar ring: 3D view

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER