If using Windows, first install Microsoft Visual Studio C++ Build Tools following the directions at this link. This includes an installation of MSVC, Windows SDK, and C++ CMake tools for Windows followed by adding MSBuild Tools to your system path.
Using Anaconda, a virtual environment management tool for Python, create and activate a new conda environment and download pip via the anaconda channel by running:
conda create --name radiosity
conda activate radiosity
conda install -c anaconda pipAlternatively, run python -m venv . to create a virtual environment in standard Python without using Anaconda. Activating the virtual
environment (via conda activate radiosity or source bin/activate) means that all python and pip operations will be
managed using the packages installed into the environment. Therefore, the command
must be run before proceeding to the next steps (and before running any code).
First, install python-embree in this conda environment. Begin by installing Embree from the Embree website. Typically, the Embree binaries, headers, and libraries will all be installed to C:\Program Files\Intel\Embree3 by default. Then, clone, build, and install python-embree to the radiosity conda environment:
git clone https://github.com/sampotter/python-embree
cd python-embree
python setup.py build_ext -I "/c/Program\ Files/Intel/Embree3/include" -L "/c/Program\ Files/Intel/Embree3/lib"
python setup.py install
cd ..Next, clone this repository and install the rest of the dependencies, including Boost and CGAL.
git clone https://github.com/sampotter/python-flux
cd python-flux
pip install -r requirements.txtInstall the latest versions of Boost
and CGAL from the corresponding websites. Finally,
link the CGAL and boost directories in python-flux/setup.py (via the include_dirs argument of the flux.cgal.aabb extension).
Finally, from the cloned repository, run:
python setup.py installTo run python-flux's unit tests, just run:
./run_tests.shfrom the root of this repository. All this script does is execute python -m unittest discover ./tests; i.e., it discovers and runs all Python unit tests found in the directory ./tests.
The examples directory contains simple Python scripts illustrating
how to use this package. Each example directory contains a README with
more information about that particulra example.
For instance, try running:
cd examples/lunar_south_pole
python haworth.pyafter following the installation instructions above.