Advertisement
Membership
Login
ACCU Buttons
Search in Book Reviews
Search is a simple string search in either book title or book author. The full text search is a search of the text of the review.
Indeed the code does not bear close examination. For example on page 115 (in the context of ANSI C) the author offers the following coding trick to replace
floor()from
math.hwith a macro:
#define floor(a) ((double)((long)(a) - ((a)<0.0)))
He maintains that on the three compilers he tried this he got a highly significant increase in execution speed. While I have every reason to believe him, the problem is that using the pre-processor to re-write reserved words is a nasty hack. Why not just write your code with an all- uppercase macro name that can be used to provide either the above macro or the ISO C
floor()function.
Finding things like these leaves me a little unhappy. The authors are well aware of flaws in other published works on graphics coding so it would have been nice if they had been more consistent themselves. I suspect that the problems come from multiple authorship.
Having entered the above caveat on the source code, the technical content of the book seems to be good and as long as it is used for study rather than as a source of cut and paste code.
You should also be warned that to get full value you will need access to RenderMan (though most of the book is independent of this).
Finally, it is not clear from the copyright notice on the CD whether you are entitled to use any of the provided code either privately or as part of a distributed executable. Publishers must be clear in their own minds whether published code is simple to help understanding or is usable as is.
With my stated caveats, this is a good book and one well worth study if the subject matter is one that interests you. Just be careful.