Conformal Model Raytracer
Chapter 23 of the book describes a simple ray tracer in detail. The ray tracer was implemented using conformal geometric algebra. Special attention was paid to run-time efficiency, as we wanted to show that conformal geometric algebra is not slower than traditional approaches. Below you can download the full source code of this ray tracer, or view selected parts of the raytracer online.
Benchmarking Platform
The ray tracer was also used as a benchmarking platform. We implemented the same ray tracing algorithm many times using different methods to implement the geometry
- linear algebra: 3-D 'vector space'
- linear algebra: 4-D homogeneous coordinates
- geometric algebra: 3-D 'vector space'
- geometric algebra: 4-D homogeneous model
- geometric algebra: 5-D conformal mode
Download
You can download the full source code of the ray tracers. The source code is a bit rough since the raytracers were only intended for benchmarking and comparing different geometry implementations.
Download the source code of the raytracers.
Online Viewing of Source Code
You can also view parts of the ray tracer source code online, through the following list of links: (To do when final book is ready: link pages of the book (code examples) directly to source)
- scene.cpp
- model.cpp
- mesh.cpp
- face.cpp
- bsp_node.cpp
- light_source.cpp
- ui_versors.cpp