# Conetracing

## a different approach to raytracing

Conventional raytracers don't deal correctly with distributed
light sources, have jagged stairstep aliasing, and only support
perfect reflection:

My conetracer supports distributed (spherical) light sources,
has integrated (theoretically correct!) antialiasing, and
allows for diffuse (blurry) reflection:

Conventional raytracers can be modified to support
distributed light sources, antialiasing, and blurry reflections
through Cook, Porter, and Carpenter (statistical) distribution
ray tracing. This entails casting dozens or hundreds of regular,
point-sampling rays for each pixel and examining the bulk statistical
properties of the resulting color samples. This stochastic process
is simply a Monte Carlo estimate of the integral of the color across
the entire pixel. Distribution ray tracers are well known, proven,
general, and fairly slow, especially if a smooth image is required.

In a cone tracer, rays are given a linearly-dependant radius,
resulting in a cone. The radius is chosen so adjacent pixels'
cones overlap slightly. Each cone is traced through the scene,
summing the contributions from each object it intersects (just like
ray tracing; but with cones). Spherical
light sources are easily supported by turning shadow feeler rays
into cones as well. Blurry reflection simply changes the cone
radius on reflection.

The result is that, unlike distribution ray tracing,
only one (initial) cone need be traced for each pixel.
The above image took 9 seconds to conetrace on my Pentium-166.

There are several disadvantages of conetracing which probably
explain why it is much less well known than raytracing.
Tracing (intersection, shadowing, etc.) cones is much more difficult
than simple rays-- spheres and planes are straightforward, but
other implicit shapes (e.g. metaballs) are nearly impossible.
If a cone is partially shadowed by an object, the non-shadowed
fragment is no longer a cone-- I ignore this complication, but
it has a definite (but not glaring) impact on the scene.
A cone's cross section is a circle-- an isotropic shape; but
intersections, shadow, and reflected rays should be anisotropic
(this the same approximation made by OpenGL mip-mapping).
A "flattened cone" tracer could correct the last problem
while exacerbating the first.

I independently discovered conetracing in November of 1999, 15 years
after it was (first?) described by J. Amanatides at Siggraph '84.

Back to Orion's Oeuvre.

Back to Orion's Home Page.