OpenGL is the tool of choice for real-time rendering. Essentially
low-quality images consisting of strictly polygons and possibly simple
image filters. It's not at all necessary for a raytracer but is cool
for modelers or other tools to construct scenes to be raytraced.
Raytracing on the other hand is a straightforward method that is (in
most implementations) quite slow but is capable of producing all sorts
of neat effects like mirrors, funky perfectly curved surfaces, blurry
reflections, transparency (glass), translucency (milk, skin, boogers,
etc). While these effects can be approximated to some degree in OpenGL
using tricky fragment programs and such on new supercool graphics
hardware, the simplest and prettiest (but slowest) results come from
To write a raytracer all you really need is some knowledge of
programming, geometry and linear algebra, and a good book on the subject.
I strongly recommend Andrew Glassner's book, An Introduction to Ray
Tracing. Some others like Pete Shirley's book, Realistic Ray Tracing.
Both of them are filled with errors, though, so if you use one of them
be sure to look up the errata online. Either of these could be at a
university's library, or if you are committed enough, are available used
Another extremely useful resource for you is the source code of other
raytracers. Once you understand the concept of raytracing from the
books or other resources, having a look at others' code will give you
some ideas on how to organize your own code so that it is not a
nightmare to add features to.
15. Phos ray tracer