[comp.graphics] Color values: normalize or truncate?

jet@karazm.math.uh.edu (J. Eric Townsend) (10/21/90)

Well, my ray tracing project is coming along quite nicely, but I've
run into an interesting (or maybe just frustrating) problem.

I'm working in RGB, with each color having a possible range of 0.0 to
1.0, and I treat these numbers as vectors in three-color-space.
While computing certain color values, however, I generate numbers
over 1.0.  (I don't know if this is due to an incorrect implementation
of an algorithm, or if it's a side-effect of trying to discretize the
real world. :-)

What I've been doing is to normalize the color vector.  For the hell of
it, I just truncated values > 1.0 and I got a *much* better looking picture.

So what's the scoop?  If normalizing is the "good thing", it means my code
might be broken.  If truncation is the "good thing", then I'm moving
along quite nicely. :-)

thx 1e6
--
J. Eric Townsend     Internet: jet@uh.edu    Bitnet: jet@UHOU
Systems Manager - University of Houston Dept. of Mathematics - (713) 749-2120
EastEnders list: eastender@karazm.math.uh.edu
Skate UNIX(r)