To convert the .ppm
files to more common image formats, do the following:
In this directory:
- Install Docker
- Build the converter image:
docker build . -t ray-tracer-format -f format.Dockerfile
- Create a converter container and run it interactively:
docker run -v "$(pwd)"/../:/source/ray-tracer \
--name ray-tracer-format-container \
-it ray-tracer-format
- Restart and attach to the converter container at a later point:
docker start -ai ray-tracer-format-container
- In the running docker container, generate a
.gif
from all files inbuild/artifacts/<example-name>/ppm/animation
:
./format/format.sh <example-name>
- Find the animation in
build/artifacts/<example-name>/gif/<example-name>.gif
- In the running docker container, generate a
.png
from a single file inbuild/artifacts/<example-name>/ppm/
:
./format/format.sh <example-name> -t highres
- Find the high resolution image in
build/artifacts/<example-name>/png/<example-name>.png