San Mateo: M & T Books, 1991. — 491 p.
Why this Book is for You
Ray Tracing
Object-Oriented Programming-Myth and Fact
Newton’s Method-An Example of the Power of C++
Three-Dimensional Vectors
Classes for Ray Tracing
Rendering the Screen
Ray Tracing Rendering Interfaces
Communicating with the Ray Tracer
Using the Language
Functions that Match an Object
Determining Ray-Object Intersections
Tracingthe Ray
Putting it All Together
Displaying the Created Scene
Rendering Fractal Scenes
Quaternions
Hardware and Software Requirements
Expanding Your Horizons
Object-Oriented Programming: Myth and Fact
In the Beginning
Nine Years Later
Object-Oriented or Conventional-What’s the Difference
The Word is Paradigm
Some Philosophical Background
The Non-Aristotelian World
Some Good Words about C++
Beyond C with C++: A Newton’s Method Example
Graphics Functions
Program for Plotting a Simple Equation Using Newton’s Method
The Concept of Classes in C++
Public, Private, and Protected
Ordinary Functions Within a Class
Assigning Memory for a Class
Constructors
Overloading Operators
Output, Input, and Friends in C++
Some Complications with Newton’s Method
Generalized Newton’s Method Display Program
Another Newton’s Method Program
New Directions
Three Dimensional Vector Mathematics with C++
Overloading of Vector Operators
Other Vector Functions
Ray Tracing Object Structures
The Concept of Linked Lists
Lines, Lamps, and Patterns
Objects and Derived Classes
The World According to Ray Tracing
Additional Parameters
Rendering the Scene-An Overview
Main Rendering Program
Ray Tracing Rendering Interfaces
Standard Procedural Database
The RenderMan Interface.
The QRT Input Language
Striking Out on Our Own
Communicating with the Ray Tracer
The input.cpp File
Creating the Parser
Loading the World
Processing Attributes
Processing Color Data
Processing Instances
Processing Bounding Boxes
Processing Objects
Creating a Sphere
Creating a Triangle
Creating a Ring
Creating a Parallelogram
Creating a Quadratic
Creating a Cone
Attaching a Pattern to an Object
Processing Pattern Data
Transferring an Instance to the Object List
Making Bounding Boxes
Using the Ray Tracing Definition Language
FILE_NAME
PATTERN
COLOR
BEGIN_BBOX
BEGIN_INSTANCES
SPHERE
TRIANGLE
RING
PARALLELOGRAM
QUADRATIC.
CONE
SKY
FOC_LENGTH
LAMP
OBSERVER
XRES
YRES
NAME
Sample Files
Functions that Match an Object: The Concept of Virtual
Functions
The objects.cpp File
Constructors
Destructors
Finding the Normal to an Object
Generating Bounding Boxes
Changing the Scale of a User-Generated Object
Determining Position Variables for an Object
Finding Where the Ray Hits an Object
The Intersect Function
General Intersection Math
Intersection with a Sphere
Intersecting a Quadratic Curve
Intersection with a Ring
Intersection of the Ray with a Parallelogram
Intersection with a Triangle
Intersection with a Bounding Box
Tracing the Ray
The Overall Scene Tracing Function
Tracing a Ray.
Determining the Background Color
Ambient Color
Specular Reflections and Color Emitted by an Object
Tracing a Ray through a Transparent Medium
Reflections
Sending a Line to the Data File
Pattern Effects on Color
Putting it All Together with the Make Capability
Creating the Ray-Tracing Program with Zortech C++
Running Programs with Turbo C++
Ray-Tracing Pictures
Displaying and Saving Screens
Creating a VGA Color Display
Using High-Resolution VGA Cards
Saving the Display in .PCX Format
Viewing the .PCX File
Rendering Fractal Scenes
The Midpoint Displacement Technique
Handling a Fractal with Our Ray-Tracing Program
Implementing Fractal Processing
Quaternions and Their Mathematics
History and Definitions of Quaternions
Quaternion Mathematics
Quaternion Mathematics with C++
Overloading of Quaternion Operators
Other Quaternion Functions.
Julia Sets and Dragon Curves in the Quaternions..
The Header File
Input for the Quaternion Program
BACKGROUND
AMB
DIFF
SREFLECT
REFLECT
FILE_NAME
FLIP
LIGHT_PHI
LIGHT_THETA
VIEW_PHI
XRES
YRES
XMAX
XMIN
YMAX
YMIN
ZMAX
ZMIN
QUATERNION
MAX_SIZE
MAX_ITERATIONS
JULIA
DRAGON
Computing the Quaternions
Ray Tracing the Object
Determining the Color of a Pixel
Producing the Color Picture