Adam Wayment and Dr. Robert P. Burton, Computer Science
Raytracing is a technique used by artists and scientists to generate computer imagery with a high degree of realism. Mathematicians have long established the ease and elegance of generating mathematical objects that exist in four or more dimensions. Because raytracing is an elegant abstraction of the process of representation, my aim is to show that raytracing may be extended to more than three dimensions so as to produce images that are consistent with the properties of dimensional space and vision.
This research endeavor is part of the ongoing effort of the Hyperspace Research Group of the BYU Computer Science department to create images that represent objects of four or more dimensions. This project builds specifically on the work of Carey and Bringhurst1.
In an effort to show that 4-dimensional raytracing is a natural extension of traditional 3- dimensional raytracing, I found a simple, open-source 3D raytracer, qrend, by Ivan Tkatchev, which I then extended to raytrace 4-dimensional space2. Many of these extensions were natural, even trivial. Due to a human unfamiliarity with 4-dimensional space, the greatest difficulty encountered in the project was designing scene scripts that demonstrate the capabilities of the raytracer.
Figure 1 shows three successive “slices” of a 4-space scene consisting of three hyperspheres. As slices of 3-space are 2-dimensional planes, slices of 4-space are 3-spaces. As the intersection of a plane and a sphere is a circle, the intersection of a hyperspheres and a 3-space is a sphere. Note how some of the hyperspheres and their reflections seem to jump in and out of existence. This is consistent and expected of the slicing, but makes scene creation time-intensive as slight changes cause objects to pop in and out of images.
Although we do not usually consider our everyday 3-space in successive 2D segments, I propose that 3D vision may be considered the successive union of infinitely many planes, where all points in that summation lie within a single plane that may be viewed concurrently. Those planes closest to the viewer have highest precedence in that – barring transparency – the nonempty spaces of each plane prevent the viewing of subsequent planes behind the occupied space. The natural extension to 4D space: viewing in four dimensions may be accomplished through a union of successive 3D slices of 4-space, with the obstacle that such a union must be able to be viewed concurrently in a 3-space. This may explain why Bringhurst’s imagery does not appear 4-dimensional, not as a fault of his implementation of raytracing, but because he fails to consider the sum of the raytraced images, as a 4D view requires.
The concurrent viewing of points in 3-space is possible, but only through the use of transparency. As Bringhurst demonstrated and as I have duplicated, 3-dimensional slices of 4- space may be obtained with raytracing. The benefit of using raytracing methodology is the trivial preservation of shading, shadows, reflections, and hidden-volume removal. This ensures that the 3D segment is a correct projection of 4-space. In my implementation, these successive raytraced segments are treated as a picture cube, analogous to the conventional picture plane. This cube then is projected with transparency to preserve concurrent vision.
Figure 2 shows eight hyperspheres of equal radius, which are placed in a hypercubical arrangement such that the interior hypersphere is farther away in the 4D space than its colormatching counterpart. Note that this image is 256 x 256 x 256 (where the last number is the number of slices or layers). Though many references were found in the literature to 4- dimensional raytracing, all the images I found were slices of 4-space. This project is, to my knowledge, the first to consider the concurrent viewing of these slices, providing raytraced imagery that actually “feels” 4D!
Among the improvements to be made to the raytracer with transparency are implementation of anti-aliasing techniques, additional primitive shapes, addition of rotations and other transformations, and improved reflection and lighting.
Among the topics still to explore with the hyperdimensional raytracer before project completion are further investigation of lighting and shadows, and experimentation with the behavior of objects of less than four dimensions within 4D viewing.
As I strive to forge the synergy of raytracing and hyperspace, it is energizing to realize how much I have been forced to learn about conventional seeing. In considering the many aspects of usual vision, I have discovered that only when I truly understand my own seeing may I ever aspire to see with some other view.
References
- Hyperdimensional Imagery: the Raytracing of Hyperobjects. Gary L. Bringhurst, 1987. A Four-dimensional Shading Model. Scott Allen Carey, 1987.
- qrend, a minimalist raytracer. © Ivan Tkatchev 1999, released under the GNU-GPL license.