This is the supplementary code for "Kelvin Transformations for Simulations on Infinite Domains." 

## General
The code runs on Houdini 18.0 or later versions.  The free Houdini Apprentice License is fully functional.  If you are using Windows, use Houdini 18.5 with python3 that can be found on [Houdini's daily build](https://www.sidefx.com/download/daily-builds/).  

In each example hipnc file, it requires some digital assets (hdanc files) that are located in the "./otls" folders.  If the hipnc file doesn't link to those otls automatically, you can install the assets by selecting in the menu bar `Assets > Install Asset Libraries`.

## Install Scipy
For many examples, you will need to install the python package **scipy**.  (A separate Python implementation is shipped within the Houdini software, and thus we need to manually install additional package for it.)  

### MacOSX / Linux
1. First, make sure scipy is indeed not installed.  Open Houdini, on any panel add a tab "Python Shell" (for example click "+" right next to the "Geometry Spreadsheet" tab).  Typing `>>> import scipy` should give us error `ImportError: No module named scipy`.  (If there is no error, then you do have scipy installed, and you can skip all the following steps.)
2. Find the Python directory: Open Houdini.  Open a Python shell (like step 1.) and type 
    ```
    >>> import os
    >>> path=os.path.abspath(os.__file__)
    >>> print(path)
    ```
    The result should be something like `/Applications/Houdini/Houdini18.0.499/Frameworks/Python.framework/Versions/Current/lib/python2.7/os.pyc`
3. Open Terminal, and goto the bin directory ".../Versions/Current/bin" (according to the path shown on Step 2.)
    ```
    $ cd /Applications/Houdini/Houdini18.0.499/Frameworks/Python.framework/Versions/Current/bin
    ```
4. Use the local python to install the Python Package Installer (pip):  In that directory, execute (you will need to enter your root password for the superuser do (sudo) command)
    ```
    $ sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
    $ sudo ./python get-pip.py
    ```
5. Use the local pip to install scipy:
    ```
    $ sudo ./pip install scipy
    ```
6. Your Houdini should now work with scipy.  Back to the Houdini Python shell (Step 1).  Now `>>> import scipy` should give no error.

### Windows
The following installation steps require python3.  Therefore download Houdini 18.5 with python3 that can be found on [Houdini's daily build](https://www.sidefx.com/download/daily-builds/).
1. First, make sure scipy is indeed not installed.  Open Houdini, on any panel add a tab "Python Shell" (for example click "+" right next to the "Geometry Spreadsheet" tab).  Typing `>>> import scipy` should give us error `ImportError: No module named scipy`.  (If there is no error, then you do have scipy installed, and you can skip all the following steps.)
2. Download `get-pip.py` from [bootstrap.pypa.io/get-pip.py](https://bootstrap.pypa.io/get-pip.py) (save as a file) and place it in your Houdini python37 folder (e.g. C:\Program Files\Side Effects Software\Houdini 18.5.456\python37)
3. Run windows cmd with admin rights and navigate to your python folder (e.g. cd "C:\Program Files\Side Effects Software\Houdini 18.5.456\python37").  Then, execute the command `python 3.7.exe get-pip.py`.  (A new pip.exe should appear in the scripts folder.)
4. Execute the command `python3.7.exe -m pip install scipy`.
5. Your Houdini should now work with scipy.  Back to the Houdini Python shell (Step 1).  Now `>>> import scipy` should give no error.
