III.3 Beam-tracing technique

Please, note that there are two different approaches that are known as beam-tracing. Here we discuss the variant that is more closely related to the image-source technique. The other one is explained in conjunction with ray-tracing in a later chapter.

Beam-tracing is a technique that reduces the number of image sources by culling out such image sources from the image-source tree that can never produce a valid image source for any listener location. In the basic image source model there is no such checking and for that reason the number of image sources grows very steeply as a function of the reflection order. From purely acoustic point of view, the image-source method and beam-tracing are the same as they produce equivalent results, but the beam-tracing should do it much more efficiently.

III.3.1 Basic beam-tracing technique
The basic principle of beam-tracing is that instead of emitting a wave-front to the whole hemi-sphere around the reflector, it is sufficient to emit the wave front only to the solid angle covered by the beam formed by the image source and the reflector. This is illustrated in the interactive figure below. It represents a shoebox in which all the corners have been cut out. In such a geometry there are no oblique reflection paths for the given source location, but only axial ones (left-right and up-down). The basic image-source technique is not able to benefit from that and it will create possible image sources to locations that can't provide any valid reflection paths to any receiver location. Beam-tracing handles this case perfectly and all the unnecessary image sources are removed.

- You can move the listener to see that there are only axial reflection paths, and that the reflection paths from the side walls will never encounter either the top or the bottom surfaces.
- Switch on beam-tracing to see the beams that determine which surfaces should be used to form higher order image sources. It is best to start with only the first order reflections.
- Move the slider to visualize the wavefronts to see that none of the wave-fronts reflected from the vertical surfaces will hit the horizontal surfaces and vice versa.
- You can alternate between plain image-source and beam-tracing techniques and see the difference in the number of image sources. See also the differences in the image-source trees.

Zoom: Reflection orders: Direct sound 1st 2nd 3rd 4th to 10th
Visualization: Wavefronts Full ray paths Raylets | Computation mode: Plain image source method Basic beam-tracing

From an algorithmic viewpoint this means that instead of reflecting an image source against all the surfaces pointing towards the image source, new image sources are formed only against such surfaces that are inside the respective beam. Forming the beams takes some additional computation and memory, but as the beams will hinder the exponential growth in the number of image sources, those are worth the effort in all practical cases.

Algorithm: Beam-tracing approach for recursive computation of image sources

The pseudo-code above is almost the same as the one for the image-source technique. The differences are on lines 3 and 6. The validForReflection function called on line 3 takes care that no extra image sources are produced but only such surfaces that have a possibility to produce valid reflection paths will be considered. That is the core in the use of the beams whereas the function on line 6 handles the construction of new beams. Both of those functions are written out below starting with the constructBeam function.

Algorithm: Construction of a new beam based on the location, and surface that defines the limits of the beam

The most straightforward way to define a beam is to start by defining its epicenter which in this case is the image-source location. In the 3-D case, the cross-sectional shape of the beam is the 2-D projection of the reflector when seen from the epicenter. This means that the sides of the beam are defined by triangles that all have one vertex at the epicenter and the other two vertices are vertices of one edge of the reflecting polygon. As a result a beam has as many defining triangles as there are edges in the reflector. Thus, the beam can be fully defined by storing the epicenter location and the vertices of the reflector. The 2-D case is even simpler as a beam can be thought of as a sector of a circle.

Algorithm: Checks if a surface can produce a higher order reflection with regards to the previous reflector and the beam

The algorithm shown above starts by checking some prerequisites that are similar to the ones in the image-source technique. Those include the requirements that the reflector is in front of the source and of the previous reflector and that it is pointing towards both of those. The main part here is the call to the function that will check whether the surface is inside the beam or not. Even a partial inclusion is sufficient here. In a 3-D case this means that the 2-D projections of the beam outline and of the new reflector should overlap when viewed from the image source location. In that case the new reflector is inside the beam, and should be included in the resulting image source tree.