Foundations of 3D Computer Graphics 1st Edition Steven J. Gortler
Foundations of 3D Computer Graphics 1st Edition Steven J. Gortler
com
https://ebookgate.com/product/foundations-of-3d-computer-
graphics-1st-edition-steven-j-gortler/
OR CLICK HERE
DOWLOAD NOW
https://ebookgate.com/product/mathematics-for-3d-game-programming-and-
computer-graphics-second-edition-eric-lengyel/
ebookgate.com
https://ebookgate.com/product/mobile-3d-graphics-learning-3d-graphics-
with-the-java-micro-edition-claus-ho%cc%88fele/
ebookgate.com
https://ebookgate.com/product/fundamentals-of-computer-graphics-2nd-
edition-shirley-p/
ebookgate.com
https://ebookgate.com/product/essentials-of-interactive-computer-
graphics-concepts-and-implementation-kelvin-sung/
ebookgate.com
Computer Graphics with OpenGL 4th Edition Donald Hearn
https://ebookgate.com/product/computer-graphics-with-opengl-4th-
edition-donald-hearn/
ebookgate.com
https://ebookgate.com/product/computer-graphics-with-opengl-3rd-
edition-donald-d-hearn/
ebookgate.com
https://ebookgate.com/product/directx-9-graphics-the-definitive-guide-
to-direct-3d-1st-edition-alan-thorn/
ebookgate.com
https://ebookgate.com/product/3d-math-primer-for-graphics-and-game-
development-2nd-edition-fletcher-dunn/
ebookgate.com
https://ebookgate.com/product/3d-nanoelectronic-computer-architecture-
and-implementation-1st-edition-d-crawley/
ebookgate.com
Foundations of 3D Computer Graphics
Steven J. Gortler
Preface ix
I Getting Started 1
1 Introduction 3
1.1 OpenGL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Linear 9
2.1 Geometric Data Types . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Vectors, Coordinate Vectors, and Bases . . . . . . . . . . . . . . . . 11
2.3 Linear Transformations and 3 by 3 Matrices . . . . . . . . . . . . . . 12
2.4 Extra Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.5 Rotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.6 Scales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3 Affine 21
3.1 Points and Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2 Affine transformations and Four by Four Matrices . . . . . . . . . . . 22
3.3 Applying Linear Transformations to Points . . . . . . . . . . . . . . 24
3.4 Translations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.5 Putting Them Together . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.6 Normals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4 Respect 29
iii
CONTENTS CONTENTS
5 Frames In Graphics 35
5.1 World, Object and Eye Frames . . . . . . . . . . . . . . . . . . . . . 35
5.2 Moving Things Around . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.3 Scales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.4 Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
6 Hello World 3D 45
6.1 Coordinates and Matrices . . . . . . . . . . . . . . . . . . . . . . . . 45
6.2 Drawing a Shape . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
6.3 The Vertex Shader . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.4 What Happens Next . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.5 Placing and Moving With Matrices . . . . . . . . . . . . . . . . . . . 53
9 Smooth Interpolation 77
9.1 Cubic Bezier Functions . . . . . . . . . . . . . . . . . . . . . . . . . 78
10 Projection 89
10.1 Pinhole Camera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
10.2 Basic Mathematical Model . . . . . . . . . . . . . . . . . . . . . . . 90
10.3 Variations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
10.4 Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
11 Depth 101
11.1 Visibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
11.2 Basic Mathematical Model . . . . . . . . . . . . . . . . . . . . . . . 102
11.3 Near And Far . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
11.4 Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
14 Materials 127
14.1 Basic Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
16 Sampling 149
16.1 Two Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
16.2 The Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
16.3 The Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
16.4 Alpha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
17 Reconstruction 161
17.1 Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
17.2 Bilinear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
17.3 Basis functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
18 Resampling 167
18.1 Ideal Resampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
18.2 Blow up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
18.3 Mip Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
19 Color 175
19.1 Simple Bio-Physical Model . . . . . . . . . . . . . . . . . . . . . . . 176
19.2 Mathematical Model . . . . . . . . . . . . . . . . . . . . . . . . . . 179
19.3 Color Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
This book has developed out of an introductory computer graphics course I have been
teaching at Harvard since 1996. Over the years I have had the pleasure of teaching
many amazing students. During class, these students have asked many good questions.
In light of these questions, I often realized that some of my explanations in class were
a bit sloppy and that I didn’t fully understand the topic I had just tried to explain. This
would often lead me to rethink the material and change the way I taught it the next
time around. Many of these ideas have found their way into this book. Throughout
the course of the book, I cover mostly standard material, but with an emphasis on
understanding some of the more subtle concepts involved.
In this book, we will introduce the basic algorithmic technology needed to produce
3D computer graphics. We will cover the basic ideas of how 3D shapes are represented
and moved around algorithmically. We will cover how a camera can be algorithmically
modeled turning this 3D data into a 2D image made up of a discrete set of dots or
pixels on a screen. Later in the book, we will also cover some more advanced topics
discussing the basics of color and light representations. We will also briefly introduce
some more advanced topics on light simulation for producing photo-realistic images,
on various ways of dealing with geometric representations and on producing animated
computer graphics.
In this book, we include material that is both above and below the API-hood. Much
of the material (especially early on) is stuff you simply need to know in order to do
3D computer graphics. But we also spend time to explain what is going on inside of
OpenGL. This is necessary to be a highly competent computer graphics programmer.
But also, it is simply fascinating to learn the hows and whys of our amazing computer
graphics computational infrastructure.
We will not cover the hardware and compiler aspects of computer graphics in this
book. We will also not focus on 2D computer graphics or human computer interfaces.
These topics are all interesting in their own rights but are fairly distinct from the algo-
rithmic side of 3D computer graphics.
In this book, we structure our explanations around OpenGL, a real-time “rasterization-
based” rendering environment. We have done this (rather than, say, a “ray-tracing-
based” environment) since so much of computer graphics is done in this setting. Any-
one, for example, who works in 3D video games needs to master this material (and
ix
CHAPTER 0. PREFACE
more). We have chosen the OpenGL API (with the GLSL shading language) in partic-
ular, since it can be run on a wide variety of computing platforms.
This book is intended for upper level CS/math/physics undergraduate students with
at least a year of programming under their belt and at least a rudimentary understanding
of linear algebra.
In the following paragraphs I will describe some of the subtle issues that require some
care to get right and are often not taught clearly. I hope that students will master these
topics from this book.
Appendix A: We try to get up and running as painlessly as possible with a first
OpenGL program. Since we will be using a modern version of OpenGL, there is
thankfully not much API left to teach anymore. All OpenGL needs to do is man-
age the shader programs, vertex buffer objects and textures. We do not teach any of the
deprecated elements of old OpenGL, as they are not used in modern computer graphics
programming.
Chapters 2-4: In computer graphics we need to think about points and vectors
from both a coordinate-free and coordinate-full approach. We need to use coordinates
to obtain a concrete representation ultimately resulting in our rendered images. But
it is often important to represent and transform our points with respect to different
coordinate systems. As such it is important to
• Distinguish between a geometric point, and the coordinates used to represent that
point with respect to some frame.
• Use a notation to keep explicitly keep track of the basis used for a set of coordi-
nates.
• Distinguish in our notation between matrix equations that represent basis changes,
vs. matrix expressions that represent geometric transformations being applied to
points.
This ultimately leads to what we call the left-of rule, which allows us to interpret matrix
expressions and understand with respect to which basis a transformation is acting.
It is our hope that by mastering this explicit notational framework, a student can
easily figure out how to do complicated transformations. This is in contrast to the “try
lots of orderings and inverses of sequences of matrices until the program does the right
thing” approach. One loose inspiration for our approach is the manuscript [16] by Tony
DeRose.
Chapters 5 and 6: We describe an organized framework for dealing with frames in
computer graphics, and how this translates into simple 3D OpenGL code. In particular,
we derive useful ways to move objects around using a “mixed auxiliary frame”. This
allows us to, say, rotate an object correctly about its own center, but in directions that
correspond naturally to those on the screen.
Chapters 7: This is a simple and straightforward description of the quaternion rep-
resentation for rotations. We also derive how to properly combine quaternions and
translation vectors to define a rigid-body transformation data type that multiplies and
inverts just like matrices.
Chapter 8 is a simple and straightforward description of the trackball and arcball
rotation interface. We also show why the trackball interface is mouse-path-invariant.
Chapter 9: We do a quick and dirty introduction to Bezier and Catmull-Rom splines.
Chapters 10-13: In these chapters we describe how camera projection is modeled
using 4-by-4 matrices. We also describe the fixed function operations in OpenGL.
We pay special attention to deriving the correct formulas for interpolating the varying
variables. Some of the background on affine functions and interpolation are relegated
to Appendix B. Many of the subtleties here are described nicely in essays by Jim
Blinn [5]. In these chapters, we do not cover details about clipping or rasterization
algorithms.
Chapter 14 and 15: We give some simple example shaders for diffuse, shiny, and
anisotropic materials. We also point to more advanced real-time rendering techniques
such as multipass rendering and shadow mapping. These sections are admittedly too
brief. Presumably students pursuing more aggressive rendering projects will need to
learn a lot more about the ever-evolving techniques (and tricks) used in modern real-
time rendering.
Chapter 16-18: We cover the basics of why filtering is needed to compute discrete
images, and how basis functions are used to reconstruct continuous ones. In particular,
we show how these two concepts need to be combined to properly do filtering during
texture mapping (a la Paul Heckbert’s MS thesis [28].) We do not delve into the details
of Fourier analysis here as we think it would pull us a bit too far off the main narrative
(and in the end we use box filters anyway).
Chapter 19: We describe the basic theory of human color perception. From a math-
ematical perspective, we attempt to be clear about the very definition of what a color
is, and why such things form a linear space. A related treatment to ours can be found
in Feynman’s Lectures [20]. For many of the technical issues of color computations,
we rely on the Color FAQ of Charles Poynton [58].
Chapter 20: For completeness, we briefly describe ray tracing computations. As
this is not the focus of the course, we only touch on the topic.
Chapter 21: As an introduction to advanced topics in photo-realistic rendering,
we do a careful introduction to the physical units for describing light as well as the
reflection, rendering, and measurement equations. One thing we pay close attention to,
for example, is motivating why reflection is measured in the particular units used. A
good reference on these basics and more is Eric Veach’s PhD Thesis [71].
Chapter 22: We outline some of the ways that surfaces are modeled and represented
in computer graphics. This is a non-technical discussion that only just tries to give a
quick intro to this rich topic. We do go into enough detail to be able to implement
Catmull-Rom subdivision surfaces (assuming you have a mesh data structure handy),
as these are a quick and easy way to represent a broad family of surfaces.
Chapter 23: We outline some of the ways animation is done in computer graphics.
Again, this is a non-technical discussion that tries to give a quick intro to this rich topic.
One nice place to start for this material is Adrien Treuille’s course on its CMU website.
This book covers a bit more than what would be possible to do in a one-semester
course. It does not attempt to be an encyclopedic reference to all of the rich topics in
computer graphics theory and practice. Additionally, this book stays close to material
in wide use today. We do not cover the many current research results and ideas that
may one day become part of standard practice.
Thanks to...
During the development of this book over the last year, I received lots of helpful input
from Hamilton Chong, Guillermo Diez-Canas and Dylan Thurston.
Helpful advice also came from Julie Dorsey, Hugues Hoppe, Zoe Wood, Yuanchen
Zhu and Todd Zickler.
Other comments and assistance came from Gilbert Bernstein, Fredo Durand, Ladislav
Kavan, Michael Kazhdan and Peter-Pike Sloan.
During the development of the course, I was greatly assisted by Xiangfeng Gu,
Danil Kirsanov, Chris Mihelich, Pedro Sander and Abraham Stone.
Finally, over the years, the course has had many talented students acting as teach-
ing assistants. They have of course contributed in many ways to the evolution of this
material. These have included Brad Andalman, Keith Baldwin, Forrester Cole, Ashley
Eden, David Holland, Brad Kittenbrink, Sanjay Mavinkurve, Jay Moorthi, Doug Nac-
hand, Brian Osserman, Ed Park, David Ryu, Razvan Surdulescu and Geetika Tewari.
Getting Started
1
Chapter 1
Introduction
Computer graphics is an amazing technology success story. The basic ideas, represen-
tations, algorithms and hardware approaches were forged in the 1960’s and 1970’s and
developed to maturity in the following two decades. By the mid 90’s computer graph-
ics techniques were reasonably mature, but their impact was still somewhat restricted
to “high end” applications such as scientific visualization on super-computers, and ex-
pensive flight simulators. Its hard to believe now, but many undergraduate CS majors
had no idea what 3D computer graphics even was!
The previous decade has finally seen the mass commodification of graphics. Every
modern PC is capable of producing high quality computer generated images, mostly
in the form of video games and virtual-life environments. The entire animation indus-
try has been transformed from its high end (e.g., Pixar films) down to daily children’s
television. For live-action movies, the field of special effects has been completely rev-
olutionized; viewers nowadays don’t flinch when they see the most amazing computer
generated special effects, it is simply expected.
1.1 OpenGL
OpenGL began as an API that implemented a very specific sequence of operations used
for doing 3D computer graphics. As the underlying hardware became cheaper, more
and more flexibility was put into the hardware and exposed to the user by the OpenGL
API. Over time, it has become feasible to fully control certain portions of the graphics
computation. The user does this by writing small special purpose programs, called
shaders, that are passed to and complied by the API. In OpenGL these shaders are
written in a C-like special purpose language called GLSL. As we will describe below,
the two main programmable portions are controlled by a vertex shader and a fragment
shader. These specific sections of the computation have been made programmable both
because there is great utility in giving the user flexibility in them, but also because this
3
CHAPTER 1. INTRODUCTION
Figure 1.1: A cat head is described by a soup of triangles. Some of the vertices are
highlighted with black dots. From [64], c Eurographics and Blackwell Publishing
Ltd.
computation can be done using single instruction multiple data (SIMD) parallelism.
Data stored with each geometric vertex can be processed independently from the other
vertices. Likewise, computation to determine the color of one screen pixel can be
computed completely independently from the other pixels.
In a current OpenGL program, much (but not all) of the actual 3D graphics is done
by the shaders that you write, and are no longer really part of the OpenGL API itself.
In this sense, OpenGL is more about organizing your data and your shaders, and less
about 3D computer graphics. In the rest of this section, we will give an overview of
the main processing steps done by OpenGL. But we will also give some high level
descriptions of how the various shaders are typically used in these steps to implement
3D computer graphics.
In OpenGL we represent our geometry as a collection of triangles. On the one
hand, triangles are simple enough to be processed very efficiently by OpenGL, while
on the other hand, using collections of many triangles, we can approximate surfaces
with complicated shapes (see Figure 1.1). If our computer graphics program uses a
more abstract geometric representation, it must first be turned into a triangle collection
before OpenGL can draw the geometry.
Briefly stated, the computation in OpenGL determines the screen position for each
vertex of each of the triangles, figures out which screen dots, called pixels, lie within
each triangle, and then performs some computation to determine the desired color of
that pixel. We now walk through these steps in a bit more detail.
Each triangle is made up of 3 vertices. We associate some numerical data with
each vertex. Each such data item is called an attribute. At the very least, we need
to specify the location of the vertex (using 2 numbers for 2D geometry or 3 numbers
for 3D geometry). We can use other attributes to associate other kinds of data with our
Uniform Variables
Vertex Shader
Attributes gl_Position
Varying variables
Vertex buffer Assembler
Figure 1.2: Vertices are stored in a vertex buffer. When a draw call is issued each
of the vertices passes through the vertex shader. On input to the vertex shader, each
vertex (black) has associated attributes. On output, each vertex (cyan) has a value for
gl Position and for its varying variables.
vertices that we will use to determine their ultimate appearances. For example, we may
associate a color (using 3 numbers representing amounts of red, green and blue) with
each vertex. Other attributes might be used to represent relevant material properties
describing, say, how shiny the surface at the vertex is.
Transmitting the vertex data from the CPU to the graphics hardware (the GPU)
is an expensive process, so it is typically done as infrequently as possible. There are
specific API calls to transfer vertex data over to OpenGL which stores this data in a
vertex buffer
Once the vertex data has been given to OpenGL, at any subsequent time we can
send a draw call to OpenGL. This commands OpenGL to walk down the appropriate
vertex buffers and draw each vertex triplet as a triangle.
Once the OpenGL draw call has been issued, each vertex (i.e., all of its attributes)
gets processed independently by your vertex shader (See Figure 1.2). Besides the
attribute data, the shader also has access to things called uniform variables. These are
variables that are set by your program, but you can only set them in between OpenGL
draw calls, and not per vertex.
The vertex shader is your own program, and you can put whatever you want in
it. The most typical use of the vertex shader is to determine the final position of the
vertices on the screen. For example, a vertex can have its own abstract 3D position
stored as an attribute. Meanwhile, a uniform variable can be used to describe a virtual
camera that maps abstract 3D coordinates to the actual 2D screen. We will cover the
details of this kind of computation in Chapters 2- 6 and Chapter 10.
Once the vertex shader has computed the final position of the vertex on the screen, it
assigns this value to the the reserved output variable called gl Position. The x and
y coordinates of this variable are interpreted as positions within the drawing window.
The lower left corner of the window has coordinates (−1, −1), and the upper right
corner has coordinates (1, 1). Coordinates outside of this square represent locations
Rasterizer
Figure 1.3: The data in gl Position is used to place the three vertices of the triangle
on a virtual screen. The rasterizer figures out which pixels (orange) are inside the
triangle and interpolates the varying variables from the vertices to each of these pixels.
Uniform Variables
Fragment Shader
Varying variables Screen color
Frame Buffer
Figure 1.4: Each pixel is passed through the fragment shader which computes the final
color of the pixel (pink). The pixel is then placed in the framebuffer for display.
Figure 1.5: By changing our fragment shader we can simulate light reflecting off of
different kinds of materials.
that represent the position and color of the light sources in the scene. By changing the
program in the fragment shader, we can simulate light bouncing off of different types
of materials, this can create a variety of appearances for some fixed geometry, as shown
in Figure 1.5. We discuss this process in greater detail in Chapter 14.
As part of this color computation, we can also instruct fragment shader to fetch
color data from an auxiliary stored image. Such an image is called a texture and is
pointed to by a uniform variable. Meanwhile, varying variables called texture coordi-
nates tell the fragment shader where to select the appropriate pixels from the texture.
Using this process called texture mapping, one can simulate the “gluing” of a some
part of a texture image onto each triangle. This process can be used to give high visual
complexity to a simple geometric object defined by only a small number of triangles.
See Figure 1.6 for such an example. This is discussed further in Chapter 15.
When colors are drawn to the framebuffer, there is a process called merging which
determines how the “new” color that has just been output from the fragment shader
is mixed in with the “old” color that may already exist in the framebuffer. When z-
buffering is enabled a test is applied to see whether the geometric point just processed
by the fragment shader is closer to, or farther from the viewer, than the point that was
used to set the existing color in the framebuffer. The framebuffer is then updated only if
Figure 1.6: Texture mapping. Left: A simple geometric object described by a small
number of triangles. Middle: An auxiliary image called a texture. Right: Parts of the
texture are glued onto each triangle giving a more complicated appearance. From [65],
c ACM.
the new point is closer. Z-buffering is very useful in creating images of 3D scenes. We
discuss z-buffering in Chapter 11. In addition, OpenGL can also be instructed to blend
the old and new colors together using various ratios. This can be used for example
to model transparent objects. This process is called alpha blending and is discussed
further in Section 16.4. Because this merging step involves reading and writing to
shared memory (the framebuffer), this step has not been made programmable, but is
instead controlled by various API calls.
In Appendix A we walk through an actual code fragment that implements a simple
OpenGL program that performs some simple 2D drawing with texture mapping. The
goal there is not to learn 3D graphics, but to get an understanding of the API itself and
the processing steps used in OpenGL. You will need to go through this Appendix in
detail at some point before you get to Chapter 6.
Exercises
Ex. 1 — To get a feeling for computer graphics of the 1980’s, watch the movie Tron.
Linear
Our first task in learning 3D computer graphics is to understand how to represent points
using coordinates and how to perform useful geometric transformations to these points.
You very likely have seen similar material when studying linear algebra, but in com-
puter graphics, we often simultaneously use a variety of different coordinate systems
and as such we need to pay special attention to the role that these various coordinate
systems play. As a result, our treatment of even this basic material may be a bit different
than that seen in a linear algebra class.
In this chapter, we will begin this task by looking at vectors and linear transforma-
tions. Vectors will be used to represent 3D motion while linear transformations will be
used to apply operations on vectors, such as rotation and scaling. In the following few
chapters we will then investigate affine transformations, which add the ability to trans-
late objects. We will not actually get to the coding process for computer graphics until
Chapter 6. Our approach will be to first carefully understand the appropriate theory,
which will then make it easy to code what we need.
which we call a coordinate vector. The numbers specify the position of the point with
respect to some agreed upon coordinate system. This agreed upon coordinate system
has some agreed upon origin point, and also has three agreed upon directions. If we
were to change the agreed upon coordinate system, then we would need a different set
9
CHAPTER 2. LINEAR
7.3
p̃ −4
v = p̃ − q̃ 12
v
q̃
ft
Figure 2.1: Geometric data types: points are shown as dots, and vectors as arrows.
Vectors connect two dots and do not change when translated. A frame represents a co-
ordinate system, and consists of one origin point and a basis of d vectors. A coordinate
vector is a triple of real numbers.
• A point will be notated as p̃ with a tilde above the letter. This is a geometric
object, not a numerical one.
• A vector will be notated as ~v with an arrow above the letter. This too is a non-
numerical object. In Chapter 3 we will discuss in more detail the difference
between vectors and points. The main difference is that points represent places
while vectors represent the motion needed to move from point to point.
• A coordinate system (which will be a set of abstract vectors, and so again, non-
numeric) will be notated as ~f t with a bold letter, arrow, and superscript “t”. (We
use bold to signify a vertical collection, the superscript “t” makes it a horizontal
collection, and the arrow tells us that it is a collection of vectors, not numbers.)
There are actually two kinds of coordinate systems. A basis is used to describe
vectors, while a frame is used to describe points. We use the same notation for
all coordinate systems and let the context distinguish the type.
Below, we will define all of these object types and see what operations can be done
with them. When thinking about how to manipulate geometry, we will make heavy use
of, and do symbolic computation with, both the numeric (coordinate vectors) and the
non-numeric (vectors and coordinate systems) objects. Only once we establish all of
our necessary conventions in Chapter 5 will we be able to drop the non-numeric objects
and use the the numerical parts of our calculations in our computer code.
Let us start by clearly distinguishing between vectors and coordinate vectors. In this
book, a vector will always be an abstract geometric entity that represents motion be-
tween two points in the world. An example of such a vector would be “one mile east”.
A coordinate vector is a set of real numbers used to specify a vector, once we have
agreed upon a coordinate system.
Formally speaking, a vector space V is some set of elements ~v that satisfy certain
rules. In particular one needs to define an addition operation that takes two vectors and
maps it to a third vector. One also needs to define the operation of multiplying a real
scalar times a vector to get back another vector.
To be a valid vector space, a bunch of other rules must be satisfied, which we will
not dwell on too closely here. For example, the addition operation has to be associative
and commutative. As another example, scalar multiplies must distribute across vector
adds
α(~v + w)
~ = α~v + αw
~
and so on [40].
There are many families of objects which have the structure of a vector space.
But in this book we will be interested in the vector space consisting of actual motions
between actual geometric points. In particular, we will not think of a vector as a set
of 3 numbers.
A coordinate system, or basis, is a small set of vectors that can be used to produce
the entire set of vectors using the vector operations. (More formally, we say that P a set of
vectors ~b1 ...~bn is linearly dependent if there exists scalars α1 ...αn such that i αi~bi =
~0. If a set of vectors is not linearly dependent, then we call them linearly independent.
If ~b1 ...~bn are linearly independent and can generate all of V using addition and scalar
multiplication, then the set ~bi is called a basis of V and we say that n is the dimension
of the basis/space.) For free motions in space, the dimension is 3. We also may refer
to each of the basis vectors as an axis, and in particular we may refer to the first axis as
the x axis, the second as the y axis and the third as the z axis.
We can use a basis as a way to produce any of the vectors in the space. This can be
expressed using a set of unique coordinates ci as follows.
ci~bi
X
~v =
i
The interpretation of the rightmost expression uses the standard rules for matrix-matrix
multiplication from linear algebra. Here each term ci~bi is a real-scalar multiplied by an
abstract vector. We can create a shorthand notation for this and write it as
~v = ~bt c
where ~v is a vector, ~bt is a row of basis vectors and c is a (column) coordinate vector.
We use the notation ~v ⇒ L(~v ) to mean that the vector ~v is transformed to the vector
L(~v ) through L.
The class of linear transformations is exactly the class that can be expressed using
matrices. This is because a linear transformation can be exactly specified by telling us
its effect on the basis vectors. Let us see how this works:
Linearity of the transformation implies the following relationship
ci~bi ) = ci L(~bi )
X X
~v ⇒ L(~v ) = L(
i i
Each of the 3 new vectors L(~bi ) is itself an element of V , it can ultimately be written
as some linear combination of the original basis vectors. For example, we could write
h i M1,1
L(~b1 ) = ~b1 ~b2 ~b3 M2,1
M3,1
for some appropriate set of Mj,1 values. Doing this for all of our basis vectors, we get
h i h i M1,1 M1,2 M1,3
L(~b1 ) L(~b2 ) L(~b3 ) = ~b1 ~b2 ~b3 M2,1 M2,2 M2,3 (2.2)
M3,1 M3,2 M3,3
v
bt
Figure 2.2: A vector undergoes a linear transformation ~v = ~bt c ⇒ ~bt M c. The matrix
M depends on the chosen linear transformation.
h i c1
~b1 ~b2 ~b3 c2
c3
h i M1,1 M1,2 M1,3 c1
⇒ ~b1 ~b2 ~b3 M2,1 M2,2 M2,3 c2
M3,1 M3,2 M3,3 c3
h i h i M1,1 M1,2 M1,3
~b1 ~b2 ~b3 ⇒ ~b1 ~b2 ~b3 M2,1 M2,2 M2,3
M3,1 M3,2 M3,3
or for short
~bt ⇒ ~bt M
c ⇒ Mc
bt
The identity map leaves all vectors unchanged. Its matrix is the identity matrix
1 0 0
I= 0 1 0
0 0 1
Besides being used to describe a transformation (⇒), a matrix can also be used to
describe an equality (=) between a pair of bases or pair of vectors. In particular, above
in Equation (2.2), we saw an expression of the form
~at = ~bt M (2.3)
t
~a M −1
= ~bt (2.4)
This expresses an equality relationship between the named bases ~at and ~bt .
Suppose a vector is expressed in a specific basis using a specific coordinate vector:
~v = ~bt c. Given Equation (2.3), one can write
~v = ~bt c = ~at M −1 c
This is not a transformation (which would use the ⇒ notation), but an equality (us-
ing the = notation). We have simply written the same vector using two bases. The
coordinate vector c represents ~v with respect to ~b while the coordinate vector M −1 c
represents the same ~v with respect to ~a.
~v · w
~
that takes in two vectors and returns a real number. This dot product allows us to define
the squared length (also called squared norm) of a vector
k ~v k2 := ~v · ~v
The dot product is related to the angle θ ∈ [0..π] between two vectors as
~v · w
~
cos(θ) =
k ~v kk w ~ k
~
bt c · ~bt d = ( ~bi ci ) · ( ~bj dj )
X X
i j
ci dj (~bi · ~bj )
XX
=
i j
X
= ci di
i
where in the second line we use the bi-linearity of the dot product and in the third line
we use the orthonormality of the basis.
We say that a 2D orthonormal basis is right handed if the second basis vector can
be obtained from the first by a 90 degree counter clockwise rotation (the order of the
vectors in the basis is clearly important here).
We say that a 3D orthonormal basis is right handed if the three (ordered) basis
vectors are arranged as in Figure 2.4, as opposed to the arrangement of Figure 2.5. In
particular, in a right handed basis, if you take your right hand opened flat, with your
fingers pointing in the direction of the first basis vector, in such a way that you can curl
your fingers so that they point in the direction of the second basis vector, then your
thumb will point in the direction of the third basis vector.
In 3D, we also have a cross product operation takes in two vectors and outputs one
vector defined as
~v × w
~ :=k v k k w k sin(θ) ~n
y
x
z (coming out)
Figure 2.4: A right handed orthonormal coordinate system. The z axis is coming out
of the page. Also shown is the direction of a rotation about the x axis.
y z (going in)
x
Figure 2.5: A left handed orthonormal coordinate system. The z axis is going into the
page.
where ~n is the unit vector that is orthogonal to the plane spanned by ~v and w
~ and such
that [~v , w,
~ ~n] form a right handed basis.
In a right handed orthonormal basis ~bt , it is particularly easy to compute the cross
product of two vectors (~bt c) × (~bt d). In particular, its coordinates with respect to ~bt
can be computed as
c2 d3 − c3 d2
c3 d1 − c1 d3
c1 d2 − c2 d1
2.5 Rotations
The most common linear transformation we will encounter is a rotation. A rotation is
a linear transformation that preserves dot products between vectors and maps a right
handed basis to a right handed basis. So in particular, applying any rotation to a right
handed orthonormal basis always results in another right handed orthonormal basis. In
3D, every rotation fixes an axis of rotation and rotates by some angle about that
axis.
We begin by describing the 2D case. We start with a vector.
i
x
h
~v = ~b1 ~b2
y
x′ = x cos θ − y sin θ
′
y = x sin θ + y cos θ
For the 3D case, let us also assume that we are using a right handed orthonormal
coordinate system. Then, a rotation of a vector by θ degrees around the z axis of the
basis is expressed as:
h i x
~b1 ~b2 ~b3 y
z
h i c −s 0 x
⇒ ~b1 ~b2 ~b3 s c 0 y
0 0 1 z
where, for brevity, we have used the notation c := cos θ, and s := sin θ. As expected,
this transformation leaves vectors on the third axis just where they were. On each fixed
plane where z is held constant this transformation behaves just like the 2D rotation just
described. The rotation direction can be visualized by grabbing the z axis with your
right hand, with the heel of your hand against the z = 0 plane; the forward direction is
that traced out by your fingertips as you close your hand.
Figure 2.6: By setting the rotation amounts on each of the three axes appropriately we
can place the golden disk in any desired orientation.
In some sense, this is all you need to get any 3D rotation. First of all, the compo-
sition of rotations is another rotation. Also, it can be shown that we can achieve any
arbitrary rotations by applying one x, one y, and one z rotation. The angular amounts
of the three rotations are called the xyz-Euler angles. Euler angles can be visualized by
thinking of a set of gimbals, with three movable axes, with three settings to determine
the achieved rotation (see Figure 2.6).
A more direct way to represent an arbitrary rotation, is to pick any unit vector ~k as
the axis of rotation, and directly apply a rotation of θ radians about that axis. Let the
coordinates of ~k be given by the unit coordinate vector [kx , ky , kz ]t . Then this rotation
can be expressed using the matrix
kx2 v + c
kx ky v − kz s kx kz v + ky s
ky kx v + kz s ky2 v + c ky kz v − kx s (2.5)
kz kx v − ky s kz ky v + kx s kz2 v + c
2.6 Scales
In order to model geometric objects, we may find it useful to apply scaling operations
to vectors and bases. To scale any vector by factor of α, we can use
h i x
~b1 ~b2 ~b3 y
z
h i α 0 0 x
⇒ ~b1 ~b2 ~b3 0 α 0 y
0 0 α z
To scale differently along the 3 axis directions we can use the more general form
h i x
~b1 ~b2 ~b3 y
z
h i α 0 0 x
⇒ ~b1 ~b2 ~b3 0 β 0 y
0 0 γ z
This kind of operation is useful, for example, to model an ellipsoid given that we
already know how to model a sphere.
Exercises
Ex. 3 — Which of the following are valid expressions in our notation, and if valid,
what is the resulting type? ~bt M , cM , M −1 c, ~bt N M −1 c?
Ex. 4 — Given that ~at = ~bt M , what are the coordinates of the vector ~bt N c with
respect to the basis ~at ?
Ex. 5 — Let ~0 be the zero vector. For any linear transformation L, what is L(~0)?
Ex. 6 — Let T (~v ) be the transformation that adds a specific non-zero constant vector
~k to ~v : T (~v ) = ~v + ~k. Is T a linear transformation?
Affine
p̃ − q̃ = ~v
Conversely if we start with a point, and move by some vector, we should get to another
point
q̃ + ~v = p̃
21
CHAPTER 3. AFFINE
sense to translate points (this notion did not make sense for vectors). To represent
translations, we need to develop the notion of an affine transform. To accomplish
this, we use 4 by 4 matrices. These matrices are not only convenient for dealing with
affine transformations here, but will also be helpful in describing the camera projection
operation later on (See Chapter 10).
3.1.1 Frames
In an affine space, we describe any point p̃ by first starting from some origin point õ,
and then adding to it a linear combination of vectors. These vectors are expressed using
coordinates ci and a basis of vectors.
c1
c2
h i
ci~bi ~t
X
p̃ = õ + = ~b1 ~b2 ~b3
c3 = f c
õ
i
1
is called an affine frame; it is like a basis, but it is made up of three vectors and a single
point.
In order to specify a point using a frame, we use a coordinate 4-vector with four
entries, with the last entry always being a one. To express a vector using an affine
frame, we use a coordinate vector with a 0 as the fourth coordinate (i.e., it is simply a
sum of the basis vectors). The use of coordinate 4-vectors to represent our geometry
(as well as 4-by-4 matrices) will also come in handy in Chapter 10 when we model the
behavior of a pinhole camera.
c1
c2
h i
~b1 ~b2 ~b3 õ
c3
1
a b c d c1
h i e f g h c2
~b1 ~b2 ~b3
⇒ õ
i j
k l c3
0 0 0 1 1
or for short
~f t c ⇒ ~f t Ac
We can verify that the second line of the above describes a valid point, since the
multiplication of
′
x a b c d x
y′ e f g h y
′ =
z i j k l z
1 0 0 0 1 1
gives us a coordinate 4-vector with a 1 as the fourth entry. Alternatively, we can see
that the multiplication of
a b c d
~b′ ~b′ ~b′ õ′ = ~b1 ~b2 ~b3 õ e f g h
h i h i
1 2 3 i j k l
0 0 0 1
where 0õ is defined to be ~0, gives a valid frame made up of three vectors and a point.
Also note that if the last row of the matrix were not [0, 0, 0, 1] it would generally
give us an invalid result.
Similar to the case of linear transform, we can apply an affine transformation to a
frame as
a b c d
h i h i e f g h
~b1 ~b2 ~b3 õ ⇒ ~b1 ~b2 ~b3 õ
i j k l
0 0 0 1
or for short
~f t ⇒ ~f t A
p̃
v
ft
c1
h i c
~b1 ~b2 ~b3 2
õ
c3
1
a b c 0 c1
e f g 0 c2
h i
~b1 ~b2 ~b3
⇒ õ
i j
k 0 c3
0 0 0 1 1
This has the same effect on the ci as it did with linear transformations. If we think
of the point p̃ as being offset from the origin õ by a vector ~v , we see that this has the
same effect as applying the linear transform to the offset vector. So, for example, if
the 3 by 3 matrix is a rotation matrix, this transformation will rotate the point about
the origin (see Figure 3.1). As we will see below in Chapter 4, when applying a linear
transformation to a point, the position of the frame’s origin plays an important role.
We use the following shorthand for describing a 4 by 4 matrix that just applies a
linear transform.
l 0
L=
0 1
3.4 Translations
It is very useful to be able to apply a translation transformation to points. Such transfor-
mations are not linear (See Exercise 6). The main new power of the affine transforma-
tion over the linear transformations is its ability to express translations. In particular, if
we apply the transformation
c1
~b1 ~b2 ~b3 õ c2
h i
c3
1
1 0 0 tx c1
~b1 ~b2 ~b3 õ 0 1 0 ty c2
h i
⇒ 0 0 1 tz c 3
0 0 0 1 1
c1 ⇒ c 1 + tx
c2 ⇒ c 2 + ty
c3 ⇒ c 3 + tz
a b c d 1 0 0 d a b c 0
e f g h 0 1 0 h e f g 0
=
i j k l 0 0 1 l h i j 0
0 0 0 1 0 0 0 1 0 0 0 1
Figure 3.2: Left: Shape in blue with normals shown in black. Middle: Shape is shrunk
in the y direction and the (un-normalized) normals are stretched in the y direction.
Right: Normals are re-normalized to give correct unit normals of squashed shape.
or in shorthand
l t i t l 0
= (3.1)
0 1 0 1 0 1
A = TL (3.2)
Note that since matrix multiplication is not commutative, the order of the multipli-
cation T L matters. An affine matrix can also be factored as A = LT ′ with a different
translation matrix T ′ , but we will not make use of this form.
If L, the linear part of A, is a rotation, we write this as
A = TR (3.3)
In this case we call the A matrix a rigid body matrix, and its transform, a rigid body
transform, or RBT. A rigid body transform preserves dot products between vectors,
handedness of a basis, and distance between points.
3.6 Normals
In computer graphics, we often use the normals of surfaces to determine how a surface
point should be shaded. So we need to understand how the normals of a surface trans-
form when the surface points undergo an affine transformation described by a matrix
A.
One might guess that we could just multiply the normal’s coordinates by A. For
example, if we rotated our geometry, the normals would rotate in exactly the same
way. But using A is, in fact not always correct. For example in Figure 3.2, we squash a
sphere along the y axis. In this case, the actual normals transform by stretching along
the y axis instead of squashing. Here we derive the correct transformation that applies
in all cases.
Let us define the normal to a smooth surface at a point to be a vector that is orthog-
onal to the tangent plane of the surface at that point. The tangent plane is a plane of
vectors that are defined by subtracting (infinitesimally) nearby surface points, and so
we have
~n · (p˜1 − p˜2 ) = 0
for the normal ~n and two very close points p˜1 and p˜2 on a surface. In some fixed
orthonormal coordinate system, this can be expressed as
x1 x0
y1 y0
nx ny nz ∗ z1 − z0 = 0
(3.4)
1 1
We use a ’∗’ in the forth slot since it is multiplied by 0 and thus does not matter.
Suppose we transform all of our points by applying an affine transformation using
an affine matrix A. What vector remains orthogonal to any tangent vector? Let us
rewrite Equation (3.4) as
x1 x0
−1 y1 y0
nx ny nz ∗ A z1 − z0
(A ) = 0
1 1
x1′ x0′
y1′ y0′
nx′ ny ′ nz ′ ∗
z1′ − z0′ = 0
1 1
and we see that [nx′ , ny ′ , nz ′ ]t are the coordinates (up to scale) of the normal of the
transformed geometry.
Note that since we don’t care about the ’∗’ value, we don’t care about the fourth
column of A−1 . Meanwhile, because A is an affine matrix, so is A−1 and thus the
fourth row of the remaining three columns are all zeros and can safely be ignored.
Thus, using the shorthand
l t
A=
0 1
we see that
nx′ ny ′ nz ′ l−1
= nx ny nz
nx′
nx
ny ′ = l−t ny
nz ′ nz
where l−t is the inverse transpose (equiv. transposed inverse) 3 by 3 matrix. Note
that if l is a rotation matrix, the matrix is orthonormal and thus its inverse transpose
is in fact the same as l. In this case a normal’s coordinates behave just like a point’s
coordinates. For other linear transforms though, the normals behave differently. (See
Figure 3.2.) Also note that the translational part of A has no effect on the normals.
Exercises
Ex. 7 — I claim that the following operationP is a well defined operation on points:
α1 p̃1 + α2 p̃2 for real values αi , as long as 1 = i αi . Show that this can be interpreted
using the operations on points and vectors described at the beginning of Section 3.1.
Respect
0 0 0 1
Now lets fix a frame ~f t . Using this basis, the point can be expressed using some
appropriate coordinate vector as p̃ = ~f t c. If we now use the matrix to transform
the point, as described in Chapter 3, we get ~f t c ⇒ ~f t Sc. In this case the effect of the
matrix is to transform the point by a scale factor of two from the origin of ~f t , in the
direction of the first (x) axis of ~f t .
Suppose we instead pick some other frame ~at , and suppose that this frame is related
to the original one by the matrix equation ~at = ~f t A. We can express the original point
in the new frame with a new coordinate vector p̃ = ~f t c = ~at d, where d = A−1 c.
Now if we use S to perform a transformation on the point represented with respect
to ~at , we get ~at d ⇒ ~at Sd. In this case we have scaled the same point p̃, but this time
we have scaled it from the origin of ~at in direction of the first (x) axis of ~at . This is
a different transformation (see Figure 4.1). Figure 4.2 shows the same dependence on
29
CHAPTER 4. RESPECT
Figure 4.1: The scaling matrix S is used to scale the point p̃ with respect to two different
frames. This results in two different answers.
p̃ = ~f t c ⇒ ~f t Sc
~f t ⇒ ~f t S
There are many times when we wish to transform a frame ~f t in some specific way
represented by a matrix M , with respect to some auxiliary frame ~at . For example, we
Figure 4.2: The rotation matrix R is used to rotate the point p̃ with respect to two
different frames. This results in two different answers.
may be using some frame to model the planet Earth, and we now wish the Earth to
rotate around the Sun’s frame.
This is easy to do as long as we know the matrix relating ~f t and ~at . For example
we may know that
~at = ~f t A
~f t (4.1)
= ~at A−1 (4.2)
⇒ ~at M A−1 (4.3)
= ~f t AM A−1 (4.4)
In the first line, we rewrite the frame ~f t using ~at . In the second line we transform the
frame system using the “left of” rule; we transform our frame using M with respect to
~at . In the final line, we simply rewrite the expression to remove the auxiliary frame.
rotation matrix has the effect of rotating by θ degrees about the frame’s origin. (See
figure 4.3).
We will now interpret the following transformation
~f t ⇒ ~f t T R
We do this by breaking up the transformation into two steps. In the first step
~f t ⇒ ~f t T = f~′ t
This is interpreted as: ~f t is transformed by T with respect to ~f t and we call the resulting
frame ~f ′t .
In the second step,
~f t T ⇒ ~f t T R
or equivalently
t t
f~′ ⇒ f~′ R
This is interpreted as: ~f ′t is transformed by R with respect to ~f ′t .
We can also interpret the composed transformations in another valid way. This is
done by applying the rotation and translation in the other order. In the first step
~f t ⇒ ~f t R = ~f ◦t
~f t is transformed by R with respect to ~f t and we call the resulting frame ~f ◦t . In the
second step,
~f t R ⇒ ~f t T R
~f ◦t is transformed by T with respect to ~f t .
These are just two different interpretations of the same final composed transforma-
tions. 1) Translate with respect to ~f t then rotate with respect to the intermediate frame.
2) Rotate respect to ~f t then translate with respect to the original frame ~f t . At times
it will be more convenient to use the first interpretation, and at other times it may be
more convenient to use the second one.
These types of interpretations are often summarized as follows: If we read transfor-
mations from left to right, then each transform is done with respect to a newly created
“local” frame. If we read the transformations from right left, then each transform is
done with respect to the original “global” frame.
Exercises
Ex. 8 — Using the definitions of Section 4.2, draw two different sketches illustrating
the transformation: ~f t ⇒ ~f t RT (Compare to Figure 4.3).
f◦t f◦t
ft ft
(c) Global rotation (d) Global translation
Ex. 10 — Given the two orthonormal frames ~at and ~bt shown below
bt
d4
d3
d2
at θ
d1
with distances given by the positive quantities di . What are the matrices R and T such
that ~bt = ~at T R? What are the matrices R and T such that ~bt = ~at RT ? (Note: do
this without using trigonometric terms in the matrix T .)
bt
θ
d d
φ
at φ ct
~
Suppose that b = ~a N and ~ct = ~at M . Express the matrix M using only the symbols
t t
N and θ.
Frames In Graphics
Now that we have covered the basics of points and matrix transformations, we can
describe how they are typically used in computer graphics. We will then discuss various
modeling manipulation and imaging operations.
~ot = w
~ tO
In our computer program, we will store the matrix O, with the understanding that it
35
CHAPTER 5. FRAMES IN GRAPHICS
z x
Figure 5.1: The world frame is in red, the objects frame is in green and the eye frame
is in blue. The eye is looking down its negative z-axis towards the object.
relates the world frame to object’s coordinate system using the equation above. To
move the frame ~ot , we change the matrix O.
In the real world, when we want to create a 2D picture of a 3D environment, we
place a camera somewhere in the scene. The position of each object in the picture
is based on its 3D relationship to the camera, i.e., its coordinates with respect to an
appropriate basis. In computer graphics we achieve this by having a right handed
orthonormal frame ~et , called the eye frame. We interpret the eye as looking down its
negative z axis and making a picture (see Figure 5.1). The eye frame is related by some
(rigid body) 4-by-4 matrix E
~et = w
~ tE
~ t Oc = ~et E −1 Oc
p̃ = ~ot c = w
we call c its object coordinates, Oc its world coordinates and E −1 Oc its eye coor-
dinates. We use an “o” subscript for object coordinates, a “w” subscript for world
And yet these too shall pass and fade and flee,
And in their death shall be as vile as we,
Nor much shall profit with their perfect powers
To have lived a so much sweeter life than ours,
When at the last, with all their bliss gone by,
Like us those glorious creatures come to die,
With far worse woe, far more rebellious strife
Those mighty spirits drink the dregs of life.
It will be observed that Myers, like Swinburne, handled the old heroic couplet in
a masterly manner, undreamt of by Pope, Dryden, and their generation.
God’s works—paint any one, and count it crime
To let a truth slip. Don’t object, “His works
Are here already; nature is complete:
Suppose you reproduce her (which you can’t)
There’s no advantage! You must beat her then.”
For, don’t you mark? we’re made so that we love
First when we see them painted, things we have passed
Perhaps a hundred times nor cared to see;
And so they are better, painted—better to us
Which is the same thing. Art was given for that;
God uses us to help each other so,
Lending our minds out.
This letter is reproduced in the Life and Letters, but evidently Francis Darwin did
not know that the “German youth” to whom he says it was written was Baron
Ferdinand von Müller, K.C.M.G. (1825-1896), then fifty-three years of age! Von
Müller was director of the Melbourne Botanical Gardens from 1857 to 1873, and
died in Melbourne in 1896. He did important work in Australian botany.
As regards Darwin’s letter, it seems to me that a sufficient reason why a great
and lovable man, who was at first a convinced believer in the immortality of the
soul, became an agnostic is given in the next quotation. The higher aesthetic part
of his brain had become atrophied.
Darwin himself thought that he had not given sufficient consideration to
religious questions and was exceedingly anxious that his own agnostic views
should not influence others,
I have said that in one respect my mind has changed during the
last twenty or thirty years. Up to the age of thirty, or beyond it,
poetry of many kinds, such as the works of Milton, Gray, Byron,
Wordsworth, Coleridge, and Shelley, gave me great pleasure, and
even as a school-boy I took intense delight in Shakespeare,
especially in the historical plays. I have also said that formerly
pictures gave me considerable, and music very great delight. But
now for many years I cannot endure to read a line of poetry: I have
tried lately to read Shakespeare and found it so intolerably dull that
it nauseates me. I have also almost lost my taste for pictures or
music.... My mind seems to have become a kind of machine for
grinding general laws out of large collections of facts, but why this
should have caused the atrophy of that (aesthetic) part of the brain
alone, on which the higher tastes depend, I cannot conceive.... The
loss of these tastes is a loss of happiness, and may possibly be
injurious to the intellect, and more probably to the moral character,
by enfeebling the emotional part of our nature.
Charles Darwin.
This is from autobiographical notes made by Darwin for his children, and not
intended for publication.
Vincent O’Sullivan.
The iliac passion, now known as ileus, is a severe colic due to intestinal
obstruction.
It seems strange that so eminent a man should have believed in these absurd
prescriptions, but as a matter of fact the book generally is much more sane and
sound than one would expect from the habits and state of knowledge of the time.
For example, in his rules of health Wesley strongly advises the practice of cold
bathing, cleanliness, open-air exercise, moderation of food, etc. Also these
prescriptions are chosen for their absurdity—in each case other more sensible
remedies are offered. But Wesley in his preface says that he has omitted
altogether from his book Cinchona bark, because it is “extremely dangerous.” This
means that in regard to ague he omitted the only efficient remedy—which was
much more unfortunate than his prescribing cobweb pills.
This book went to thirty-six editions between 1747 and 1840.
“When shall our prayers end?”
I tell thee, priest, when shoemakers make shoes,
That are well sewed, with never a stitch amiss,
And use no craft in uttering of the same;
When tinkers make no more holes than they found,
When thatchers think their wages worth their work,
When Davie Diker digs and dallies not,
When horsecorsers beguile no friends with jades,
When printers pass no errors in their books,
When pewterers infect no tin with lead,
When silver sticks not on the Teller’s fingers,
When sycophants can find no place in Court, ...
When Laïs lives not like a lady’s peer
Nor useth art in dyeing of her hair....
George Eliot would not know the preceding poem by Campion, whose lyrics had
been forgotten until A. H. Bullen revived them in 1889; and most probably also
she did not know Lovelace’s poem, as it is not one of the two or three lyrics by
which alone he is remembered.
W. S. Landor.
“IMBUTA”
The new wine, the new wine,
It tasteth like the old,
The heart is all athirst again,
The drops are all of gold;
We thought the cup was broken,
And we thought the tale was told,
But the new wine, the new wine,
It tasteth like the old!
G. J. Whyte-Melville.
The title evidently refers to Horace Ep. 1, 2, 69, 70, Quo semel est Imbuta
recens servabit odorem testa diu. “The scent which once has flavoured the fresh
jar will be preserved in it for many a day.” Moore no doubt had the same passage
in his mind when, speaking of the memories of past joys, he wrote:
You may break, you may ruin the vase if you will,
But the scent of the roses will hang round it still.
So Whyte-Melville says that when love is poured again into the heart of a man
who has lost his first love, “The new wine, the new wine, It tasteth like the old.”
W. S. Landor.
The Toucan has an enormous bill, makes a noise like a puppy dog,
and lays his eggs in hollow trees. How astonishing are the freaks
and fancies of nature! To what purpose, we say, is a bird placed in
the woods of Cayenne with a bill a yard long, making a noise like a
puppy dog, and laying eggs in hollow trees? The Toucans, to be
sure, might retort, to what purpose were gentlemen in Bond Street
created? To what purpose were certain foolish prating Members of
Parliament created?—pestering the House of Commons with their
ignorance and folly, and impeding the business of the country?
There is no end of such questions. So we will not enter into the
metaphysics of the Toucan.
Sydney Smith (Review of “Waterton’s Travels in South America”).
Charles Tennyson, a brother of Lord Tennyson and author with him of Poems by
Two Brothers, took the name of Turner.
O may I join the choir invisible
Of those immortal dead who live again
In minds made better by their presence: live
In pulses stirred to generosity,
In deeds of daring rectitude, in scorn
For miserable aims that end with self,
In thoughts sublime that pierce the night like stars,
And with their mild persistence urge man’s search
To vaster issues.
So to live is heaven:
To make undying music in the world....
This is life to come,
Which martyr’d men have made more glorious
For us who strive to follow. May I reach
That purest heaven, be to other souls
The cup of strength in some great agony,
Enkindle generous ardour, feed pure love,
Beget the smiles that have no cruelty—
Be the sweet presence of a good diffused,
And in diffusion ever more intense,
So shall I join the choir invisible
Whose music is the gladness of the world.
George Eliot.
There is an infinite pathos in these lines. Having lost her faith in a future life,
George Eliot tries to find consolation in the thought that, when she has passed
into nothingness—when she “joins the choir invisible”—she will have done
something to ennoble the minds of those who come after her. But why should
generation after generation of insect-lives waste themselves in raising and
purifying the minds of the generations that follow, if all in turn pass into
nothingness? The higher and purer men became, the more they would love their
fellow-beings and the more they would shudder at the insensate pain and cruelty
in the world—the physical torture they themselves endure, and the mental torture
both of losing for ever those they love and of seeing the sufferings of others. One
should act in conformity with one’s belief. Instead of thus adding greater pain and
sorrow to each succeeding generation, the effort should be to coarsen and
brutalize our natures, so that love, duty, and moral aspiration shall disappear, and
we shall cease to be saddened by the appalling cruelty of our existence. Our lives
should, in fact, correspond with the brutal, ugly and stupid scheme of the
universe.
This is the direct answer to George Eliot, allowing her very important
assumption that we have a duty towards others, including those who come after
us. But this assumption is logically unwarranted, if at the end of our brief years we
pass into nothingness and have no further concern with any living being. This
brings us to a familiar train of argument. Why should we be irresistibly impelled to
sacrifice ourselves for the good of others? And, apart from altruism, why should
we develop our own higher attributes—why seek to ennoble our own selves, since
those selves disappear? Why fill with jewels the hollow log that is to be thrown on
the fire? Why are we swayed by a sense of honour, a desire for justice, a love of
purity and truth and beauty, a craving for affection, a thirst for knowledge, which
persist up to the very gates of death? To take an illustration of Edward Caird’s, is
not the path of life which is so traversed like the path of a star to the astronomer,
which enables him to prophesy its future course—beyond the end which hides it
from our eyes? Otherwise, to use another simile, it is as though Pheidias spent his
life sculpturing in snow.
(This does not mean, as the sceptic usually sneers, that the virtuous man
merely desires a reward for his virtuous conduct. It is an inquiry why he is virtuous
—what is a sane view of the scheme of the universe.)
In forming the conclusion that there was no possible future for man, George
Eliot and an immense number of other thinkers of her time made also the vast
assumption that there was nothing left to discover. Blanco White’s sonnet alone
might have taught them the folly of such premature judgments. Or we may take
an illustration, used by F. W. H. Myers, namely, the discovery that, far beyond the
red and the violet of the spectrum or the rainbow, extend rays that have been
(and will for ever be) invisible to our eyes. Since George Eliot’s time the Society for
Psychical Research has during the last thirty-five years accumulated unanswerable
evidence of survival after death.
Why are we weigh’d upon with heaviness,
And utterly consumed with sharp distress,
While all things else have rest from weariness?
All things have rest: why should we toil alone,
We only toil, who are the first of things,
And make perpetual moan,
Still from one sorrow to another thrown:
Nor ever fold our wings,
And cease from wanderings,
Nor steep our brows in slumber’s holy balm;
Nor harken what the inner spirit sings,
“There is no joy but calm!”
Why should we only toil, the roof and crown of things?...
W. S. Landor
LOVE-SWEETNESS
D. G. Rossetti.
Jesus saith, Wherever there are two, they are not without God;
and wherever there is one alone, I say, I am with him. Raise the
stone and there thou shalt find me; cleave the wood and there am I.
(Logia of Jesus).
This is one of the Logia or Sayings of Jesus written on papyrus in the third
century and discovered in Egypt by Grenfell and Hunt in 1897. The italics, of
course, are mine.
The first of all Gospels is this, that a Lie cannot endure for ever.
There are quarrels in which even Satan, bringing help, were not
unwelcome; even Satan, fighting stiffly, might cover himself with
glory—of a temporary nature.
Thou art bound hastily for the City of Nowhere; and wilt arrive!
Carlyle (French Revolution).
It is interesting to learn from a correspondent of The Spectator (Feb. 17, 1917)
that Carlyle wrote two verses which he combined with Shakespeare’s “Fear no
more the heat o’ the sun” (Cymbeline iv, 2) to make a requiem, of which he was
very fond:
F. W. Bourdillon.
But to come again unto Apelles, this was his manner and custom
besides, which he perpetually observed, that no day went over his
head, but what businesse soever he had otherwise to call him away,
he would make one draught or other (and never misse) for to
exercise his hand and keepe it in use, inasmuch as from him grew
the proverbe, Nulla dies sine linea, i.e. Be alwaies doing somewhat,
though you doe but draw a line. His order was when he had finished
a piece of work or painted table, and layd it out of his hand, to set it
forth in some open gallerie or thorowfare, to be seen of folke that
passed by, and himselfe would lie close behind it to hearken what
faults were found therewith; preferring the judgment of the common
people before his owne, and imagining they would spy more
narrowly, and censure his doings sooner than himselfe: and as the
tale is told, it fell out upon a time, that a shoomaker as he went by
seemed to controlle his workmanship about the shoo or pantofle
that he had made to a picture, and namely, that there was one
latchet fewer than there should be: Apelles acknowledging that the
man said true indeed, mended that fault by the next morning, and
set forth his table as his manner was. The same shoomaker
comming again the morrow after, and finding the want supplied
which he noted the day before, took some pride unto himselfe, that
his former admonition had sped so well, and was so bold as to cavil
at somewhat about the leg. Apelles could not endure that, but
putting forth his head from behind the painted table, and scorning
thus to be checked and reproved, Sirrha (quoth hee) remember you
are but a shoomaker, and therefore meddle no higher I advise you,
than with shoos. Which words also of his came afterwards to be a
common proverbe, Ne sutor ultra crepidam.
Pliny (Natural History).
Apelles, the greatest painter of antiquity. The two proverbs mean: “No day
without a line,” “A cobbler should stick to his last.” Pantofle, sandal; latchet, the
thong fastening the sandal; painted table, panel picture; controlle, find fault with.
The best of us are but poor wretches just saved from shipwreck:
can we feel anything but awe and pity when we see a fellow-
passenger swallowed by the waves?
George Eliot (Janet’s Repentance).
The barge she sat in, like a burnished throne,
Burn’d on the water: the poop was beaten gold;
Purple the sails, and so perfumed that
The winds were love-sick with them; the oars were silver,
Which to the tune of flutes kept stroke. She did lie
In her pavilion: on each side her
Stood pretty dimpled boys, like smiling Cupids,
With divers-coloured fans....
Her gentlewomen, like the Nereïdes,
So many mermaids tended her. At the helm
A seeming mermaid steers: the silken tackle
Swell with the touches of those flower-soft hands.
This and the next three quotations are word-pictures (see p. 85).
ON THE NONPAREIL
Naught but himself can be his parallel.
ebookgate.com