We implemented a simple ray tracing algorithm multiple times using different algebras to do our geometric computations, to compare their run time efficiency. On this page we list the performance results we have got so far. The times are for rendering the following image on a Pentium III 700Mhz (Windows 2000, Visual C++ 6.0):
The scene consists of about 8000 polygons (our ray tracer can handle ony triangles). There are two lights, the teapot is textured and bumpmapped as is the floor, there is one reflective sphere, and one diffuse sphere, and a transparant piece of glass. We use no techiniques for ray tracing efficiency, except for a BSP tree in which we store the polygonal models.
| Model | Implementation | Full render time | Render time w.o. BSP | Executable size | Runtime memory usage |
| 3D LA | standard | 1.0x (23.3s) | 1.0x (0.99s) | 52K | 6.2M |
| 4D LA | standard | 1.05x | 1.22x | 56K | 6.4M |
| 3D GA* | Gaigen | 2.56x | 1.86x | 64K | 6.7M |
| 3D GA | Gaigen | 3.94x | 2.39x | 64K | 6.7M |
| 4D GA | Gaigen | 2.97x | 2.62x | 72K | 7.7M |
| 5D GA | Gaigen | 5.71x | 4.58x | 100K | 9.9M |
| 3D GA* | CLU | 129x | 72.0x | 164K | 12.6M |
| 4D GA | CLU | 164x | 97.1x | 176K | 14.7M |
| 5D GA | CLU | 482x | 178x | 188K | 19.0M |
The table shows the following. The first column specifies the model of geometry that was used. We used 5 different models, 3D LA, 3D GA, 4D LA (homogeneous coordinates), 4D GA (homogeneous model) and 5D GA (double homogeneous model). The two models marked with a * store some primitives in dual form, which is more efficient for some calculations.
The second column specifies how each model was implemented. 3D LA and 4D LA were implemented 'standard': we simply wrote two efficient object oriented implementations. The geometric algebra models were implemented using Gaigen and CLU. We compare Gaigen to CLU to see if the optimizations we applied to Gaigen were worth the effort.
The next two columns list how long it takes to render the image above, relative to 3D LA, the most efficient model. The column marked full render time simply specifies the time it took to render the image. The other column, render time w.o. BSP specifies the render time when we leave out the time spent on line-BSP tree intersections.
We also measured the size of the executable file, with all libraries linked dynamically, except for the algebra implementation. Finally we measured the amount of memory used during execution (using the task manager).
You can see that Gaigen is more efficient than CLU with respect to memory usage and computation time, but that we still have some way to go before GA/Gaigen is as efficient as the traditional way of doing things (3D LA, 4D LA). Also you can see that the double homogeneous model (5D GA, or conformal model) is currently about 5x to 6x slower than 3D LA. It is however, the most elegant model.
The following two pdf documents list how we represented 5 important primitives and 5 important operations in each model.
3D LA may be faster than 5D GA, but we find it a lot less elegant. Equations are longer, and many representation
and operations are split into different cases in the 3D LA model.
Representation of 5 ray tracing primitives
Implementation of 5 ray tracing operations