Wave visualization on a 2D waveguide mesh.
The Matlab script mesh2d.m
implements a 2D rectilinear digital waveguide mesh structure, allowing visualization of wave propagation over time in the structure. This same algorithm is also implemented for realtime synthesis in the Mesh2D class of the Synthesis ToolKit in C++ (STK).
The rectilinear 2D (and 3D) grid is convenient because it can be implemented with relatively simple data structures (typically a double, alternating matrix scheme) and it is relatively easy to calculate the grid geometry for a given 2D or 3D space. Further, the 2D mesh can be implemented without multiplies in fixed-point arithmetic.
Though not apparent in the simulation, the response of the rectilinear waveguide mesh aliases at a normalized temporal frequency of 0.25 (where 0.5 = 1/2 the digital sample rate).
The 2D rectilinear grid can be easily extended to three dimensions. In this case, however, each grid junction has 6 ports and the resulting scattering equations are not multiply-free for fixed-point implementations.