Mesh2scattering is based on Mesh2HRTF and is an open-source project aiming an easy-to-use software package for the numerical calculation of scattering pattern and scattering and diffusion coefficients of any surface. In a nutshell, Mesh2scattering consists of three parts:
- input: prepares geometrical data and acoustic parameters for the simulation,
- numcalc: based on the input from
input
, it calculates the corresponding sound field - output: processes the output from NumCalc to scattering pattern.
- process: processes the output to scattering and/or diffusion coefficients.
- utils: helping functions.
Please notice that this project does not support HRTF post processing, use Mesh2HRTF instead.
Check out the examples folder for a tour of the most important mesh2scattering functionality and read the docs for the complete documentation.
Use pip to install mesh2scattering
$ pip install mesh2scattering
$ pip install git+https://github.com/pyfar/imkar.git@scattering-freefield
(Requires Python 3.8 or higher)
Note that NumCalc need to be build on Linux and MacOS. For Windows it can be downloaded.
- Install the C++ build essentials by running
$ sudo apt-get install build-essential
- Go into the NumCalc directory by running
$ cd path/to/your/Mesh2scattering/mesh2scattering/numcalc/src
- Compile NumCalc by running make. It is now located in the folder
mesh2scattering/numcalc/bin
$ make
- Copy NumCalc to a folder in your program path: in the same directory run
$ sudo cp NumCalc /usr/local/bin/
- Now NumCalc can be used by running NumCalc (don't do this yet).
- Install the C++ build essentials by installing
xcode
- Go into the
numcalc/src
directory by running
$ cd path/to/your/Mesh2scattering/mesh2scattering/numcalc/src
- Compile NumCalc by running
make
. It is now located in the foldermesh2scattering/numcalc/bin
$ make
- Now NumCalc can be used by running
path/to/mesh2scattering/numcalc/bin/NumCalc
(don't do this yet)
$ path/to/mesh2scattering/numcalc/bin/NumCalc
download the executable from the release.
Refer to the contribution guidelines for more information.