The source is Copyright (c) 1990-1991 by Apple Computer, Inc. You may not use
it in anything for which you charge money, beyond reasonable fees to cover
duplication and handling. If you give your software away, feel free to use
The source is the implementation of a gem, "Implementing Progressive Radiosity
with User-Provided Polygon Display Routines," that I wrote for Graphics Gems II.
A hard copy of the source can be found in Appendix II of Graphics Gems II.
The source included here is a newer version than the one in the book
and should replace it. For more details on the source and radiosity methods,
please refer to the book.
No warranties expressed, implied, or even hinted at.
The source is written in ANSI C and is C++ friendly (you can include the
.h files in C++ programs).
Please send bug reports and/or enhancements to the author "[email protected]
I would also like to hear any system that you have ported the source to.
However, please don't ask me for technical support on the source.
C Code From Graphics Gems II, Academic Press, Inc.
This is a list of the files and directories containing the C code for Graphics Gems II.
They are listed in order of their appearance in the book. Beside each file name is the
Gem number, author's name, and Gem title to help you find what you're looking for.
Unfortunately, not all of the code listed in the appendix of the book is here (for various
reasons). The missing ones will be added as they turn up. Changes will be listed at the
bottom of this file.
File or Gem
Directory Number Author and Title of Gem
--------- ------ -----------------------
xlines.c I.2 Mukesh Prasad, "Intersection of Line Segments"
Peano/ I.7 Ken Musgrave, "A Peano Curve Generation Algorithm"
Hilbert.c I.8 Douglas Voorhies, "Space-Filling Curves and a Measure of Coherence"
dither/ II.3 Spencer W. Thomas and Rod G. Bogart, "Color Dithering"
RealPixels/ II.5 Greg Ward, "Real Pixels"
rotate8x8.c II.6 Sue-Ken Yap, "A fast 90-Degree Bitmap Rotator"
inv_cmap/ III.1 Spencer W. Thomas, "Efficient Inverse Color Map Computation"
quantizer.c III.2 Xiaolin Wu, "Efficient Statistical Computations for Optimal Color Quantization"
ran_ramp.c III.3 Ken Musgrave, "A Random Color Map Animation Algorithm"
hot.c III.6 Dave Martindale and Alan Paeth, "Television Color Encoding and 'Hot' Broadcast Colors"
viewcorr/ IV.5 Rod G. Bogart, "View Correlation"
InterPhong.c IV.9 Nadia Magnenat Thalmann and Daniel Thanmann, "InterPhong Shading"
RayCPhdron.c V.1 Eric Haines, "Fast Ray-Convex Polyhedron Intersection"
intersect/ V.2 Joseph M. Cychosz, "Intersecting a Ray with an Elliptical Torus"
VoxelCache.c V.6 Andrew Pearce, "A Recursive Voxel Cache for Ray Tracing"
radiosity/ VI.1 Eric Chen, "Implementing Progressive Radiosity
README with User-Provided Polygon Display Routines"
FastUpdate.c VI.3 Filippo Tampieri, "Fast Vertex Radiosity Update"
inverse.c VII.5 Kevin Wu, "Fast Matrix Inversion"
rotate.c VII.7 James Arvo, "Random Rotation Matrices"
sparse.c VII.8 James Arvo, "Classifying Small Sparse Matrices"
BitCounting/ VIII.3 Alan W. Paeth and David Schilling, "Of Integers, Fields, and Bit Counting"
noise3.c VIII.10 Greg Ward, "A Recursive Implementation of the Perlin Noise Function"
Additional header files and utilities
GraphicsGems.h Andrew Glassner
GGVecLib.c Andrew Glassner
vector.h Steve Hollasch, "Useful C Macros for Vector Operations"
c_format.c Dale Schumacher, "A PostScript typesetting program for C source code"
10/02/91 Added ran_ramp.c, rotate8x8.c, inverse.c, VoxelCache.c, and Peano directory.
10/09/91 Added dither and inv_cmap directories.
11/05/91 Updated quantizer.c and sparse.c