Skip to content

Evaluation_grids

Fabian Brinkmann edited this page Aug 3, 2022 · 3 revisions

Mesh2HRTF uses EvaluationGrids to define a sampling grid at which the sound pressure (HRTF) is computed. Typical grids used for HRTFs are spherical and have a radius of 1 to 2 meters. Mesh2HRTF contains evaluation grids in the folder Mesh2Input/EvaluationGrids/data that can be viewed with the function read_evaluation_grid. Custom grids can be generated with the function write_evaluation_grid. Both functions are part of the Mesh2HRTF API

An evaluation grid consists of two text files (see Nodes and Elements for a more detailed description).

Nodes.txt

contains the points (nodes) of the evaluation grid in cartesion coordinates in meters:

  • The first lines gives the number of points contained in the evaluation grid
  • The remaining lines hold the coordinates. The first entry is a unique ID for each node (see below), the second, third, and forth entry are the x, y, a z coordinates followed by an empty line

Elements.txt

specifies how the nodes are connected to form a triangular mesh:

  • The first lines gives the number of elements contained in the evaluation grid.
  • The remaining lines hold the elements. The first entry is a unique ID for each element (see below), the second, third, and forth entry give the IDs of the nodes that belong to the element followed by the sequence '2 0 1' that will remain mysterious for ever.

Unique IDs

Mesh2HRTF assigns IDs to the Reference mesh, i.e., the 3D head mesh that is used to simulate HRTFs and to the evaluation grids. The IDs must not overlap. For example, if your Reference mesh has 150,000 elements, IDs for your evaluation grid must be larger or equal to 150,000. If you are using more than one evaluation grid, the IDs must not overlap as well.