A Ray Tracer written in Kotlin based on the book "The Ray Tracer Challenge"
The goal of this is to learn how to use Kotlin multiplatform, see the performance difference between the platforms and learn more about performance optimizations for all platforms (specifically around dividing work up using coroutines).
Easiest way to run the application is with the JVM using the script raytracer-scene-builder/run-scene-builder
and
providing it a scene file from the scenes
folder with. To run on other platforms the scene-builder can be used
to generate a json scene file and then run with raytracer-console.
There is no reason other platforms couldn’t be supported, I just haven’t chosen to support / try them out. Should
be as simple as updating the multiplatform-common.gradle.kts
file to include other platforms.
Outputs are in ppm which can be opened in GIMP or Preview (MacOS).