3ds max, 393, 414, 691 conventions, 28 aabb, 304–311 closest

18
Index 3DS Max , 393, 414, 691 conventions, 28 AABB, 304–311 closest point, 720 computing, 306 intersection with plane, 725 intersection with sphere, 731 representing, 305 transforming, 308–311 vs. bounding sphere, 307 absolute measurements, 41 absolute position, 39 acceleration, 513–530 angular, see angular acceleration constant, 516–530 derivative, 516 due to gravity, 564 is due to force, 555 of curve, 651 active transformation, 94, 137 Adams, Douglass, xiii addition of vectors, see vector, addition additive identity, 38 additive inverse, 43 addressing mode (texture mapping), 395 adjacent triangle leg, 23 adjoint, see classical adjoint Adobe Photoshop, see Photoshop advertising, 88, 363 aerospace conventions, 28 terminology, 234 affine transformation, 91, 137, 156, 181 airplane security, 75 Airplane!, 77 Aitken’s algorithm, 656–659, 670, 711 Aitken, Alexander, 656 Aldrin, Buzz, 745 algorithm as definition, 335 aliasing of Euler angles, 237 of exponential map, 245 of polar coordinates, 194–198 of quaternion, 249 of spherical coordinates, 207–210 alpha blending, 441, 456 alpha test, 441, 456 altitude, 205 altitude of triangle, 318 Alvarado, Texas, 201 ambient light, 398, 406 amplitude, 574 analysis, 494 anamorphic stretching, 364, 367 angle in standard position, 22 measuring in 2D, 21 measuring in 3D with dot product, 65 units, 21 angle-preserving transformation, 157 angular acceleration, 604, 609, 613 angular displacement, 218 angular frequency, 544, 574 undamped, 577 angular impulse, 610 angular momentum, 608, 610, 613–615 in 3D, 615 spin vs. orbital, 615 angular velocity, 241, 604 and exponential map, 245, 548 integration of, 636 spin, see spin angular velocity spin vs. orbital, 604, 615 vs. linear velocity, 548 Animal Farm, 81 anisotropic reflection, 410 anticommutative cross product, 67 antiderivative, 535 apex, 523, 527 Arcesilaus, 70 807

Upload: phungtu

Post on 31-Dec-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 3DS Max, 393, 414, 691 conventions, 28 AABB, 304–311 closest

Index

3DS Max , 393, 414, 691conventions, 28

AABB, 304–311closest point, 720computing, 306intersection with plane, 725intersection with sphere, 731representing, 305transforming, 308–311vs. bounding sphere, 307

absolute measurements, 41absolute position, 39acceleration, 513–530

angular, see angular accelerationconstant, 516–530derivative, 516due to gravity, 564is due to force, 555of curve, 651

active transformation, 94, 137Adams, Douglass, xiiiaddition

of vectors, see vector, additionadditive identity, 38additive inverse, 43addressing mode (texture mapping), 395adjacent triangle leg, 23adjoint, see classical adjointAdobe Photoshop, see Photoshopadvertising, 88, 363aerospace

conventions, 28terminology, 234

affine transformation, 91, 137, 156, 181airplane security, 75Airplane!, 77Aitken’s algorithm, 656–659, 670, 711Aitken, Alexander, 656Aldrin, Buzz, 745algorithm as definition, 335aliasing

of Euler angles, 237of exponential map, 245of polar coordinates, 194–198of quaternion, 249of spherical coordinates, 207–210

alpha blending, 441, 456alpha test, 441, 456altitude, 205altitude of triangle, 318Alvarado, Texas, 201ambient light, 398, 406amplitude, 574analysis, 494anamorphic stretching, 364, 367angle

in standard position, 22measuring in 2D, 21measuring in 3D with dot product,

65units, 21

angle-preserving transformation, 157angular acceleration, 604, 609, 613angular displacement, 218angular frequency, 544, 574

undamped, 577angular impulse, 610angular momentum, 608, 610, 613–615

in 3D, 615spin vs. orbital, 615

angular velocity, 241, 604and exponential map, 245, 548integration of, 636spin, see spin angular velocityspin vs. orbital, 604, 615vs. linear velocity, 548

Animal Farm, 81anisotropic reflection, 410anticommutative

cross product, 67antiderivative, 535apex, 523, 527Arcesilaus, 70

807

Page 2: 3DS Max, 393, 414, 691 conventions, 28 AABB, 304–311 closest

808 Index

Archimedes, 81area

and integral, 518, 530, 534measuring with cross product, 67of circle, 304of parallelogram, 67, 318of triangle, 318

Aristarchus, 80Aristotelian dynamics, 555Aristotle, 80array

compared to vector, 32array of structures (AOS), 449articulated model, 107aspect ratio

of display device, 363of pixel, see pixel, aspect ratioof render window, 367

associativecross product isn’t, 67dot product is, 59matrix multiplication is, 120quaternion multiplication is, 252vector laws, 70

astronomical unit, 483atan2, 200, 212, 279atlas, 423attenuation, light, see light attenuationattitude, 220, 232authors, xvii

ignorance, 247fallibility, xxignorance, 483, 621, 639laziness, 491, 659, 695, 696stunt, 479

Autodesk 3DS Max , see 3DS Maxaverage velocity, 486–490axis

of coordinate space, 7of rotation, 16, 139, 546, 589, 604z, 13

axis-angle (orientation), 244–246, see alsoexponential map

azimuth, 205, 232

Babylonians, 21back buffer, 445backface culling, 440, 453–455ball-and-socket joint, 626bank, 218, 229barycentric coordinates

Bernstein basis, 675, 679calculating, 324–329conversion to Cartesian, 323

degrees of freedom, 321, 322Hermite basis, 668intro using triangles, 321normalization constraint, 321polynomial interpolation, 664ray-triangle intersection, 737use in interpolation, 324

base of triangle, 318basis polynomial, 660

Hermite, see Hermite basisLagrange, see Lagrange polynomialsvs. basis vector, 662

basis vectorsdefine coordinate frame, 97–106for bump mapping, 100, 432–438orthogonal, 105orthonormal, 105rank of, 102span of, 101transformation of, 125vs. basis polynomials, 662

beardeveloper-eating, 215

Bernstein basis, 675, 677–682best fit plane, 314Bezier curve, 670–685

and Hermite form, 683degree elevation, 690subdivision, 688–690

Bezier spline, 694–697Bezier, Pierre, 670bias (TCB spline), 710billboard, 390binding pose, 428binomial coefficients, 678binormal vector, 100, 433bitmap, 345Blinn specular model, 402–404Blinn-Phong, 352, 396–411

equation, 407Gouraud shading, 412HLSL example, 459limitations, 409–411multiple lights, 408

blossoming, 690body space, see object spacebogey, 201bone, see skeletal animationbone space, 429bounding box, 303–311

axially aligned, see AABBoriented, see OBB

Page 3: 3DS Max, 393, 414, 691 conventions, 28 AABB, 304–311 closest

Index 809

bounding sphere, 303calculating, 307vs. AABB, 307

BRDF, 350–353, 396accounting for color, 351accounting for shininess, 351Blinn-Phong, see Blinn-Phongdiffuse reflector, 406in the rendering equation, 360normalization constraint, 352

Broom Bridge, 267buffer (rendering), 444bugs, xxBullet Physics, 621, 639bump mapping, 431–438, see also normal

mappingcomputing basis vectors, 435–438HLSL example, 469mirrored texture maps, 437tangent space, 432–435vertex format, 448

Burleson, Texas, 201

Cn continuity, see parametric continuitycalculus

derivative, see derivativeintegral, see integralprior knowledge of, xviiiwhat’s left out, 480

Calvin and Hobbes, xxiCambridge, MA, 83camera space, 83–84, 370, 451canonical coordinates

Euler angles, 238polar, 196spherical, 208

canonical view volume, 371Captain Oveur, 77Car Talk, 83Cardinal spline, 711Cartesia, city of, 6, 80, 82Cartesian coordinates

2D, 5–113D, 12–19

Catmull, Edwin, 704Catmull-Rom spline, 703–705Cayley-Klein parameters, 236Celsius, 41center of gravity, 586, see also center of

massof triangle, 330

center of mass, 586–589calculating, 587

measuring experimentally, 586of dynamics body, 623

center of mass coordinates, 86, 636center of projection, 183centigrade, 41centrifugal force, 546

Earth’s rotation, 564centripetal acceleration, 544, 551

gravity, 564centroid, of triangle, 330Cg (shading language), 457chain rule (differentiation), 511–513Chebyshev norm, 74Chicago, IL, 81circle, 303–304

closest point, 719inscribed in triangle, 330through three points, 332unit circle, see unit circle

circular motion, 542–5492D, 542–5463D, 546–549

circumcenter of triangle, 331circumference, 304circumradius of triangle, 332Citroen, 671clamp addressing mode, 395, 421classical adjoint, 169classical dynamics, see Newtonian

dynamicsclip matrix, 189, 371–378

projection, 371–378zoom, 375–378

clip planeview frustum, 364

clip space, 93, 371–378, 440, 451clipping, 440, 451–453closed intervals, see interval notationclosest point

on AABB, 720on circle, 719on line, 717on plane, 719on ray, 718

closest point tests, 717–720coefficient of friction, 567coefficient of restitution, 597, 618cofactor, 164collision, 590–601

elastic, see elastic collisionelastic vs. inelastic, 591inelastic, see inelastic collision

collision detection, 563, 594, 627collision geometry, 623, 625

Page 4: 3DS Max, 393, 414, 691 conventions, 28 AABB, 304–311 closest

810 Index

collision law, see Newton’s collision lawcollision response, 563, 593–601, 618–621color, 353–354color blindness, 353Columbus, Christopher, 82, 216commutative

cross product isn’t, 67matrix multiplication isn’t, 120quaternion multiplication isn’t, 252vector laws, 70

complex exponentials, 551complex number

basic laws, 265in exponent, 551quaternion, 264

complex polygon, 333compound interest, 511concatenation

of exponential map rotations, 246of quaternion rotations, 253of rotation matrices, 226of transformations, 153

concave polygon, 334condition number, 169conic section, 295conical joint, 626conical spot light, 415conjugate

of complex number, 266of quaternion, 250

conservation of momentum, 584–585angular, 614in collision, 591, 596

constant color, 458constant curve, 650constant rule (differentiation), 504constraint (physics), 625–627constraint force mixing (CFM), 627constructive solid geometry (CSG), 381contact constraint, 626, 627contact force, 563, 607, see also normal

forcecontinuity (spline), 697–702

geometric, see geometric continuityparametric, see parametric

continuitycontinuity (TCB spline), 707continuous vs. discrete, 3, 481contravariant vector, 391control point (curve)

vs. knot, 654, 670control system

first-order, 580second-order, 578

convex hull, 664, 680convex polygon, 334cookie, 416coordinate space

axes, 7bone, see bone spacecamera, see camera spaceclip, see clip spacecommonly used, 81–86defined by basis vectors, 97–106establishing, 7handedness, see handednesshierarchy, 106–108left- vs. right-handed, see

handednessobect, see object spaceorigin, 7screen, see screen spacespecifying, 96–97tangent, see tangent spacetransformation, see transformationupright, see upright spaceused in graphics, 369–381why multiple, 80–81world, see world space

coordinatesCartesian, see Cartesian coordinatespolar, see polar coordinates

Copernicus, Nicolaus, 80, 191cosecant, 23cosine

definition using unit circle, 22derivative, 510related to dot product, 64Taylor series, 508

cotangent (trigonometric function), 23Coulomb friction, see frictionCoulomb’s law of friction, 570Coulomb, Charles-Augustin, 567counting numbers, see numbers, naturalcouple, 610covariant vector, 391critical damping, 578cross product, 66–70

angular velocity, 547area of triangle, 321formula, 66hand rule, 69magnitude related to area, 67quaternion, 251

CRT, 346crunch time, 215cubic mapping, 393cubic polynomial curve, 648

Page 5: 3DS Max, 393, 414, 691 conventions, 28 AABB, 304–311 closest

Index 811

cucoloris, 416culling, see backface cullingcurvature, 653curve fitting, see polynomial interpolationcylindrical coordinates, 203–204cylindrical mapping, 393

Dallas, Texas, 201damped oscillation, 576

critically damped, 578overdamped, 578underdamped, 577

damping, 566, 576damping ratio, 577da Vinci, Leonardo , 10de Casteljau algorithm, 671–676

subdivision, 688–690de Casteljau, Paul, 671de La Rochefoucauld, Francois, xiiidecal shading, 457decibels, 42declination, 207deferred rendering, 348definite integral, 530

and antiderivative, 536vs. indefinite integral, 539

degree elevation, 690degree of polynomial, 647degrees, 194

converting to radians, 22Denton, TX, 81depth buffer, 347, 441, 445

values in, 365, 377, 379depth test, 441, 456derivative, 490, 494

and integral, 535definition, 498examples, 496–497graph of, 500laws, 504–508notation, 503–504of acceleration, 516of altitude, 496of Bezier curve, 682–685of composite function, 512of constant, 504of exponential function, 511of Hermite curve, 665of monomial curve, 651of polynomial, 506–507of position, 495of rotating frame, 637of sine and cosine, 510

of sum, 505of velocity, 513

derived quantities, 484Descartes, Rene, 1, 207, 490destination fragment, 348detaching faces, 390determinant, 161–168, 268

2 × 2, 1623 × 3, 1634 × 4, 165arbitrary size, 164geometric interpretation, 167identities, 165

diagonal matrix, 115diameter, 304differential equation, 572

second-order, 577diffuse color, 405, 439diffuse map, 412, 439diffuse reflection, 398, 404–407, see also

Lambert’s lawBRDF, 406

dimensional analysis, 486, 581diminishing returns, 497Dirac delta, 358, 416, 601–602Dire Straits, 425direction cosines matrix, 224–225direction vs. orientation, 218directional light, 416DirectX, 124, 343, 396, 409, 414, 475

clip matrix, 375screen space conventions, 378UV conventions, 393

discrete vs. continuous, 3, 481displacement

in particular direction, 62is a vector quantity, 35vs. distance, 35, 488

displacmentbetween points, 50

display deviceaspect ratio, 363resolutions, 363RGB color space, 354widescreen, 363

distancebetween point and plane, 316between two points, 55is a scalar quantity, 35signed, see signed distancevs. displacement, 35

divide and conquer, 656, 660Doctor Who, xvDoom 3 engine, 418

Page 6: 3DS Max, 393, 414, 691 conventions, 28 AABB, 304–311 closest

812 Index

Doom-style light, see volumetric lightdot notation, 504dot product, 56–66, 104

and magnitude formula, 62as projection, 58formula, 57matrix notation, 57polygon convexity test, 335quaternion, 255related to cosine, 64sign of, 65

double, 4double angle identities (trig), 26double buffering, 445driving force, 575, 579dry friction, see frictiondual vector, 392Dunn, Riley, xiiidynamic intersection test, 721dynamics, 479–551

vs. kinematics, 483dynamics body, 622–625Dyslexia, city of, 80

Eagles, 531earmuffs, 589edge of triangle mesh, 382edge vector (triangle), 317eggrolls, 481Einstein, Albert, 190elastic collision, 591elastic limit, 571elevation, 232Elmo’s World, 96Emerson, Ralph Waldo, 643emissive surface, 350, 398, 407energy, 480, 532

radiant, see radient energyengineer vs. mathematician, 502errata, xxerror (control system), 579error reduction parameter (ERP), 627Euclidian norm, 74Euler angles, 206, 229–243

advantages, 236–237aliasing, 237and spherical coordinates, 232canonical set, 238, 278conventions, 232–236converting to matrix, 275–278converting to quaternion, 287–288definition, 229disadvantages, 237–242from matrix, 278–281

from quaternion, 288–291interpolating, 239–242joint, 626proper, 235symmetric, 235vs. fixed-axis, 233

Euler axis, 246Euler integration, 557, 579, 632–639Euler’s formula, 551, 784Euler’s identity, 784Euler’s rotation theorem, 244, 245, 255Euler, Leonard, 229, 244exponential function

derivative, 511quaternion, 256Taylor series, 510

exponential map, 244–246, 548aliasing, 245and angular velocity, 245and quaternion logarithm, 256vector addition, 246

exponentiation of quaternion, 257exterior angle at polygon vertex, 335extrinsic rotations, 233eye space, see camera space

fable, 486face of triangle mesh, 382factorial (!), 509, 679Fahrenheit, Gabriel, 41fake spot light, 421falloff angle (spot light), 415falloff distance, see light attenuation,

linearfalloff map, 419falloff radius, see light attenuation, linearfanning of polygon, 338far clip plane, 364Feldman, Michael, 30Fermat, Pierre, 490Ferris Bueller’s Day Off , 537The Feynman Lectures on Physics, 551Feynman, Richard, 551field of view, 365–368, 374, see also zoom

orthographic projection, 368fighter pilot, 201filter, 581first law of computer graphics, 5first law of video game physics, 565first-order control system (lag), 580fixed-axis rotations, 233, 276, 287fixed-function pipeline, 414, 416, 422, 450“fixin’ ”, 201flat shading, 411

Page 7: 3DS Max, 393, 414, 691 conventions, 28 AABB, 304–311 closest

Index 813

float, 4floating point numbers, 4flux density, 355focal distance, see focal lengthfocal length, 372footnotes, xvii, 486force, 554, see also Newton’s laws

acts on two bodies, 560acts over time, 556and torque, 610causes acceleration, 555derivative of momentum, 583friction, see frictiongravity, see gravityimpulsive, see impulsespring, see springunits, 556

fortnight, 483forward rendering, 348, 456Foucault’s pendulum, 560fractions, 196frame buffer, 345, 441, 444Fred Brooks, 621, 627free fall, 516, 527free-body diagram, 557frequency, 484

of harmonic oscillator, 574, 575of light, 353

Fresnel reflectance, 410friction, 567–571

common sense, 555damping, 576kinetic, 567, 570static, 567

front buffer, 445frustum, see view frustumfun vs. realism, 566function, 494functional form (curve), 647fundamental theorem of calculus, 536–540furlong, 491

G (gravitational constant), 564G-buffer, 348Galapagos Islands, 589Galen, 41Galileo, 43game loop, 628Gauss, Karl Friedrich, 29Gaussian elimination, 170, 660geocentric universe, 80geometric continuity, 700–701geometric optics, 346Gimbal lock, 206, 208, 238, 241, 247, 280

global illumination, 361global parameter (curve), 692global space, see world spaceglobal support, 680, 691gloss map, 401glossiness, see specular exponentGLSL, 457gobo, 381, 401, 416, 419goniophotometer, 353Gouraud shading, 387, 411–413, 451

Blinn-Phong, 412HLSL example, 466

Gram-Schmidt orthogonalization, 175, seeorthogonalizing a matrix

graphics pipeline, see real-time renderingpipeline

gravitational constant, 564gravity, 484, 516, 527, 546, 563–567

fiddling with, 565on Earth, 564universal, 563video game, 564

Greenwich, England, 82grid lines, 11, 193, 215guard band, 452

h vector (lighting), see halfway vectorhalf Lambert, 408half-open intervals, see interval notationhalfway vector, 403, 450Hamilton product, 252Hamilton, William, 267Hamlet , 828handedness, 15–18

axis of rotation, 139, 547, 604cross product, 69polar coordinates, 204, 229

happiness vs. salary, 497hare, see tortoise and hareharmonic oscillator, 573, see also spring

damped, see damped oscillationfrequency, 574, 575kinematics equations, 575

Havok, 621head of vector, 35heading, 207, 229

vs. yaw, 234heading-pitch-bank, 229Hedberg, Mitch, 294height map, 431height of triangle, 318Heisenberg, 482heliocentric universe, 80Helmholtz reciprocity, 352

Page 8: 3DS Max, 393, 414, 691 conventions, 28 AABB, 304–311 closest

814 Index

Hermite basis, 668Hermite curve, 665–670

and Bezier curve, 683Hermite spline, 694–697Hermite, Charles, 665Heron’s formula, 318herring sandwich, xiii, 86, 425, 558

microwavable, 88projectile, 711

Hertz (Hz), 485hierarchy of coordinate spaces, 106–108hinge joint, 626Hitchhiker’s Guide to the Galaxy, xiiihither clip plane, see near clip planeHLSL, 343

examples, 457–474vs. Cg and GLSL, 457

hole (polygon), 333Holmes, Oliver Wendell, 136, 161home pose, 428homogenous coordinates, 176–183

used by clip matrix, 371Hooke’s law, 571Horatio, 828hotspot (specular), 400hotspot falloff (spot light), 418human vs. mathematician, 21Hutchins, Robert Maynard, 343hypersphere, 260hypotenuse, 23

id Tech 4 , 418id Tech 5 , 432ideal gas law, 496identities

trigonometry, see trigonometry,identities

vector algebra, 70identity matrix, 116identity quaternion, 249ignorance, of authors, see authors,

ignoranceill conditioned matrix, 169ill-formed matrix, 227, 278imaginary number, see complex numberimplicit form, 295

2D line, 300circle and sphere, 303curve, 647plane, see plane equation

impulse, 502, 590angular, see angular impulsein collision response, 595

impulsive force, see impulse

impulsive torque, see angular impulseincenter of triangle, 330indefinite integral

as antiderivative, 539vs. definite integral, 539

indexed triangle mesh, 382–386, see alsotriangle mesh

inelastic collision, 591–593inertia, 484, 554inertia tensor, 616–618, see also moment

of inertiaof dynamics body, 622

inertial reference frame, 558inertial space, 86infinitesimal, 498infinitesimal rotation, 246infinity norm, 74inner product, see dot productinstantaneous velocity, 490–503

approximating, 491definition, 494tangent line, 492

int, 4integers, 3integral, 530–540

and area, 518, 530, 534antiderivative, 535definite, see definite integraldefinite vs. indefinite, 539definition, 531examples, 532indefinite, see indefinite integral

integral equation, 361integrand, 531integration

Euler, see Euler integrationnumerical, see numerical integrationof rotation, 636physics simulation, 632

integration by parts, 535intensity of light, see radiometryinterior angle

at polygon vertex, 335at triangle vertex, 317

International Space Station, 551, 640Internet, assumed availability of, 486, 551,

617interpolation

of Euler angles, 239–242of exponential map, 245of lighting values, 411of quaternions, see slerpof texture mapping coordinates, 394

Page 9: 3DS Max, 393, 414, 691 conventions, 28 AABB, 304–311 closest

Index 815

of vertex normals, see per-pixelshading

polynomial, see polynomialinterpolation

rasterization, 456using barycentric coordinates, 324

intersectionof AABB and plane, 725of AABB and sphere, 731of plane and sphere, 732of ray and plane, 724of ray and sphere, 727of ray and triangle, 734of three planes, 726of two 2D lines, 721of two 3D rays, 722of two spheres, 729

intersection test, 717, 720–743static vs. dynamic, 721

interval notation, 20–21intrinsic rotations, 233inverse of matrix, 168–171, 226

definition and identities, 169–171geometric interpretation, 171

inverse of quaternion, 251inverse transpose of matrix, 392invertible matrix, 168invertible transformation, 156irradiance, 355isotropic reflection, 410

Jacobian matrix, 631Jell-O, 194jerk, 516job interview

AABB intersection, 737BRDF vectors, 399projectile motion, 521vector reflection, 400

joint (physics), 622, 625–627jokes

in footnotes, xviitake up space, 486that aren’t funny, xv

joule (J), 354, 532vs. Newton meter, 609

jumping (game mechanic), 565

Kelvin, 42key (spline), 693kinematically controlled object, 598, 623kinematics, 486–491, 513–530

circular motion, 542–549of harmonic oscillator, 572–578

projectile motion, 516–530rotational, 603–606vs. dynamics, 483

kinetic friction, see friction, kineticknot, 693–694

vs. control point, 654, 670knot vector, 654, 660, 662Knuth, Donald, 84Kochanek-Bartels spline, see TCB spline

l vector (lighting), 399, 450La Grange (song), 661La Grange, TX, 661lag (control system), 580Lagrange basis, 659–664, 670Lagrange’s notation, 503Lagrange, Joseph Louis, 661Lagrangian dynamics, 480, 639Lambert factor, 386, 406

in rendering equation, 361Lambert’s law, 356, 405Lao Tzu, 217latitude, 81, 205launch angle, 528launch speed, 528Laura Croft, 425law of cosines, 27, 318law of sines, 26, 318law of universal gravitation, 563LCD monitor, 346left hand rule, 15, see also handednessLeibniz notation, 498, 512Leibniz, Gottfried, 490, 531Lemony Snicket, 715length

fundamental quantity, 483lerp (linear interpolation), 239, 259level of detail, 440lever arm, 571, 608, 615Lewin, Walter, 573, 639libido, 487Lie algebra, 244, 246lies

commision, 481during introductions, 502omission, 479

light attenuation, 417–418in rendering equation, 417linear, 414, 418realistic inverse-squared, 417via falloff map, 422

light diffuse color, 405light intensity, see radiometrylight probes, 424

Page 10: 3DS Max, 393, 414, 691 conventions, 28 AABB, 304–311 closest

816 Index

light source, 414–424attenuation, see light attenuationDirac delta, 358, 416directional, see directional lightDoom-style, see volumetric lightomni, see point lightpoint, see point lightspot, see spot lightvolumetric, see volumetric light

light specular color, 401lighting model, 396, see also BRDFlightmap, 423limit, 493limiting value, 493limits of integration, 531, 539line, 297–303, see also ray

closest point, 717infinite 2D, 300–302intersection in 2D, 721

line segment, 297linear algebra, 104, 130

vs. this book, 34, 659linear complimentary problem (LCP), 632linear curve, 650linear independence, 102linear interpolation, 653

in Aitken’s algorithm, 657in the de Casteljau algorithm, 672

linear operator, see also lineartransformation

derivative is, 505–506linear transformation, 124, 137

definition, 155doesn’t translate the origin, 156, 178

linear velocity, see velocityvs. angular velocity, 548

Linnaeus, Carolus, 41local parameter (curve), 692local space, see object spacelocal support, 680, 691logarithm of quaternion, 256longitude, 81, 205Lord of the Rings, 566loudness, 42LU decomposition, 660

Maclaurin series, 509Madonna, 410Magliozzi, Tom and Ray, 83magnitude

of cross product, 67of quaternion, 250

Major-General Stanley, 716manifold, 247

marching cubes algorithm, 296marginal utility, 497Mars Climate Orbiter, 194mass, 484

in Newton’s laws, 554of dynamics body, 622

mass element, 587, 613, 617material, 396, 439

ambient color, 406diffuse color, see diffuse coloremissive color, 407specular color, see specular color

mathematicianvs. engineer, 502vs. human, 21

MathWorld, Wolfram, xviiMatisse, Henri, 713matrix

clip, see clip matrixdeterminant, see determinantdiagonal, 115inverse transpose, 392multiplication, see matrix

multiplicationmultiplication by scalar, 117notation, 114projection, see clip matrixrank, see basis vectorsspan, see basis vectorstranspose, 116

The Matrix (movie), 113matrix chain problem, 121matrix creep, 175, 227matrix form (orientation), 220–229

advantages, 225code interface, 222conventions, 220converting to Euler angles, 278–281converting to quaternion, 284–287disadvantages, 226from Euler angles, 275–278from quaternion, 281–284

matrix multiplicationgeometric interpretation, 124linear algebra rules, 118–123

matrix notation for curve, 649, 667, 674,676

Maya, 428mechanics

dynamics, see dynamicskinematics, see kinematicsvs. physics, 479

median of triangle, 330MegaTexturing, 432

Page 11: 3DS Max, 393, 414, 691 conventions, 28 AABB, 304–311 closest

Index 817

Mencken, H. L., 799metaballs, 296, 381metalness, 409metamer, 353Mines of Moria, 566minor of matrix, 164mirror addressing mode, 395mirrored texture maps, 437mistakes, xxMIT OpenCourseWare

linear algebra, 132physics, 573, 639scientific computing, 640

Miyamoto, Shigeru, 343model space, 370, 451, see also object

spacemodel transform, 153, 276, 370, 451moment of inertia, 611, 613

3D, see inertia tensormomentum, 581–585

angular, see angular momentumconservation of, see conservation of

momentumdefinitions, 581in collisions, see collisionintegral of force, 583linear vs. angular, 613units, 581

money can’t buy happiness, 497Money for Nothing, 425monitor, see display devicemonomial form (curve), 648

endpoints, 650subdivision, 687

Monte Carlo integration, see numericalintegration

Monty Python, 490moon, 589Moore’s law, 88Morpheus, 113motor, 626, 627multiplicative identity

identity matrix, 116identity quaternion, 249

Mythbusters, 592

n vector (lighting), 399NASA, 194, 785natural numbers, see numbers, naturalnear clip plane, 364

reason for, 377negation

of quaternion, see quaternion,negation

of vector, see vector, negationNewton (N) (unit of force), 485, 532, 556Newton meter (unit of torque), 609Newton’s collision law, 597, 618, 630Newton’s laws, 554–562, see also force

and momentum, 584conservation of momentum, 584rotational analog, 613, 617

Newton, Isaac, 482, 490, 504, 553, 554degree of cleverness, 558

Newtonian dynamics, see also Newton’slaws

vs. Lagrangian, 480Nintendo Wii, see Wiinonuniform knot vector, 654norm (of vector), 74normal, see also unit vector

in triangle mesh, 386is dual vector, 392of plane, 312of triangle, 317surface, see surface normalterminology, 53transforming, 391, 427

normal force, 563, 569, see also contactforce

normal map, 431normalization constraint

of barycentric coordinates, 321of BRDF, 352

normalized device coordinates, 378normalized quaternion, 250normalized vector, see unit vectorNorth Pole, 589NTSC television standard, 484null space, 157numbers

computer representation, 4–5floating point, see floating point

numbersintegers, see integersnatural, 2rational, 3real, 3

numerical differentiation, 498numerical integration, 416, 532, 557, 624,

633, see also Euler integrationin graphics, 357, 360

nutation, 236

O’Rourke, P. J., 805OBB (oriented bounding box), 304Obi-Wan Kenobi, 553object space, 83, 218, 369

Page 12: 3DS Max, 393, 414, 691 conventions, 28 AABB, 304–311 closest

818 Index

odometer, 534, 537Old Man Murray, 622omni light, see point lightopacity, 456, 458Open Dynamics Engine, 621, 627, 632,

639open intervals, see interval notationOpenCourseWare, see MIT

OpenCourseWareOpenGL, 83, 124, 343, 378, 396, 409, 414,

475clip matrix, 376screen space conventions, 378UV conventions, 393

opposite triangle leg, 23orbital angular momentum, see angular

momentumorbital angular velocity, see angular

velocityorbital motion, see circular motionorientation

in 3D, 217–291vs. direction, rotation, angular

displacement, 218origin, 7orthogonal basis vectors, 105orthogonal matrix, 158, 171–176

geometric interpretation, 172math definition, 171

orthogonalizing a matrix, 175–176, 227,436

orthographic projection, 144, 148–150clip matrix, 374, 376viewing in 3D, 368vs. perspective projection, 368zoom, 369

orthonormal basis, 105, 158, 174orthonormal basis vectors, 436orthonormal matrix, 392Orwell, George, 81oscillation, see harmonic oscillatoroverdamping, 578

page flipping, 445parabolic motion, see projectile motionparallel axis theorem, 618parallel light, 416parallel projection, see orthographic

projectionparallel vector using dot product, 63parallelepiped, 168parallelogram, 318

area of, 67parameterization (curve), 652, 687, 692

parametric continuity, 698–700parametric curve, 646–647parametric form, 296

ray, 299particle, 562Particle Man, 295Pascal (unit of pressure), 486, 549Pascal’s triangle, 678Pascal, Blaise, 490, 678passive transformation, 94, 137PD controller, 579penalty method, 629per-face shading, 411per-pixel shading, 387, 411

HLSL example, 459per-vertex shading, see Gouraud shadingperimeter of triangle, 318perpendicular bisector, 301perpendicular vector using dot product,

63perspective foreshortening, 185perspective projection, 183–189

clip matrix, 371, 375vs. orthographic projection, 368

petunias, xiii, 567, 569–571phantom point, 711phase offset, 575PhD adviser, 490, 661, 678philosophy, 1Phong exponent, see specular exponentPhong shading, see per-pixel shadingPhong specular model, 399–404photometry, 356Photoshop, 432, 491, 691, 695, 700physics

dynamics, see dynamicskinematics, see kinematicsvs. mechanics, 479what’s left out, 479

physics engine, 621, 628, 639PhysX, 621Pi (π), 21, 198

continuous vs. discrete, 4pick-up line, cheesy, 564PID controller, 579pinhole camera, 185pipeline, see real-time rendering pipelineThe Pirates of Penzance, 716pitch, 207, 229, 232pivoting, 165Pixar Animation Studios, 704pixel, 345

aspect ratio, 363–364, 367coordinates of, 346

Page 13: 3DS Max, 393, 414, 691 conventions, 28 AABB, 304–311 closest

Index 819

not a rectangle of color, 346square pixels, 363

pixel shader, 440, 442, 456HLSL examples, 457–474

planar mapping, 393, 435plane, 311–317

best fit, 314closest point, 719defined by three points, 313distance to point, 316front and back side, 313implicit form, see plane equationintersection in 3D, 726intersection with AABB, 725intersection with ray, 724intersection with sphere, 732normal, 312

plane equation, 312–313backface culling, 455from three points, 313geometric interpretation, 312

PlayStation 2, 425, 443point

locating in 2D, 10locating in 3D, 14vs. vector, 39–41

point at infinity, 177, 180point light, 414point of concavity, 334point velocity, 548point vs. vector, 177, 219polar axis, 192polar coordinates, 191–213

2D, 192–2013D, 203–2133D cylindrical, see cylindrical

coordinates3D spherical, see spherical

coordinatesconverting to/from Cartesian,

198–201vector, 213why bother using, 201

pole, 192polygon, 332–339

convex vs. concave, 334–338fanning, 338hole, 333self-intersecting, 334simple vs. complex, 333–334triangulation, 338

polygon mesh, 381, see also triangle meshpolynomial curve, 647–649

polynomial interpolation, 653–665position

of vector, 35relative vs. absolute, 35, 82

power, 354, 532radiant, see radiant flux

power form (curve), see monomial form(curve)

power rule (differentiation), 507pre-lit vertices, 448precession, 236prerequisites, xviiipresenting the back buffer, 445prime notation, 503Principia, 553, 563prismatic joint, 626product notation, 20product rule, 535projected area, 356projected light map, 416projectile motion, 516, 520–530, 559projection

matrix, see clip matrixorthographic, see orthographic

projectionperspective, see perspective

projectionto screen space, 83using dot product, 58

proofs, see stickler alertproper Euler angles, 235proper transformation, 158Pythagorean identities, 25Pythagorean theorem, 25, 199

quadratic equation, xviii, 521, 551quantization, 273quantum mechanics, 554quaternion, 246–273

“difference”, 254advantages, 263aliasing, 249as complex number, 264–271conjugate, 250converting to Euler angles, 288–291converting to matrix, 281–284derivative, 637disadvantages, 263dot product, 255exponential function, 256exponentiation, 257from Euler angles, 287–288from matrix, 284–287geometric interpretation, 248–249

Page 14: 3DS Max, 393, 414, 691 conventions, 28 AABB, 304–311 closest

820 Index

identity, 249interpolation, see slerpinverse, 251logarithm, 256lore, 267magnitude, 250multiplication, 251multiplication by scalar, 256negation, 249notation, 247–248slerp, see slerp

r vector (lighting), 399radiance, 356radians, 194, 545

converting to degrees, 22radiant emittance, 355radiant energy, 354radiant exitance, 355radiant flux, 354radiant power, see radiant fluxradiometry, 354–358radiosity (unit of flux density), 355radiosity techniques, 423radius vector of AABB, 306rank

and barycentric coordinates, 322of basis vectors, 102

rasterization, 347, 440, 455–456rational curve, 648rational numbers, see numbers, rationalray, 297–303

3D intersection, 722as curve, 650closest point, 718intersection with plane, 724intersection with sphere, 727intersection with triangle, 734parametric form, 299

raytracing, 346real numbers, see numbers, realReal-Time Rendering (book), 438, 475,

717, 737real-time rendering pipeline, 438–456realism vs. fun, 566rectangular spot light, 416recurrence relation, 657, 673reference frame, 558reflectance model, see BRDFreflection (transformation), 144, 151–152reflection vector, 399reflex vertex, 335regular partition, 531relative displacement, 219

relative measurements, 41relative position, 35, 39relativity, 554Renault, 670, 671render context, 446render target, 363rendering algorithm, 346rendering equation, 359–362

light attenuation, 417shadows, 410

Renderman, 457repeat addressing mode, 395resolution

of display device, 363of render window, 367

rest length of spring, 571retroreflection, 410RGB color space, 353–354, 398Riemann integral, 519, 531rigging, 425, 429right hand rule, 16, see also handednessrigid body, 562rigid body transformation, 158Rodrigues vector, 236roll, 232roll-pitch-yaw, 233Ross, Diana, 160rotation

about arbitrary axis, 141–144about cardinal axis, 139–141in 2D, 138in 3D, 217–291integration of, 636vs. orientation, 218

rotation matrix, see also matrix formconverting to Euler angles, 278–281converting to quaternion, 284–287derivative, 637from Euler angles, 275–278from quaternion, 281–284

rotation vector, 246, see also exponentialmap

rotational inertia, see inertia tensor,moment of inertia

Runge phenomenon, 691Runge-Kutta integration, 634

Sand-Reckoner, 81scalar vs. vector, 32scale (transformation), 144–148

along cardinal axis, 144–146arbitrary direction, 146–148nonuniform, 144

scientific computing, 640

Page 15: 3DS Max, 393, 414, 691 conventions, 28 AABB, 304–311 closest

Index 821

scissoring, 452, 455scratch direction, 410screen space, 9, 83, 93, 378–379, 440seam edge, 333Sears Tower, see Willis Towersecant, 23second-order system, see damped

oscillationself-illuminated surface, see emissive

surfaceself-intersecting polygon, 334semiperimeter, 319sequential impulse method, 630set point (control system), 579sewing machine, 533sexagesimal number system, 21shader constant, 446, 459shadows, 410, 424Shapes (poem), 341shearing, 152–153, 179Sherlock Holmes, 1shininess, see specular exponentshort, 4SI system, 354, 485, 532, 556, 609sigma notation, see summation notationsigned area, 319, 328signed displacement, 36signed distance, 11, 192, 301, 316silliness of authors, xviiSilverstein, Shel, 341simple harmonic motion, see harmonic

oscillatorsimple polygon, 333simulation, 621sine

definition using unit circle, 22derivative, 510Taylor series, 508

singular matrix, 157, 168sinusoidal, 575size vector of AABB, 305skeletal animation, 424–431, 447

HLSL example, 472joint, 626vertex format, 449

skew box, 127, 167skinning, 425, see also skeletal animationslerp, 255, 259–263

example code, 262formal definition, 260practical definition, 261

slider joint, 626sliver triangle, 338slope and velocity, 488

slope-intercept form, 300smoothstep, 669, 712SO(3), 244solid angle, 355source fragment, 347Space Quest , xvspace station, see International Space

Stationspan

of basis polynomials, 662of basis vectors, 101

specular color, 401specular exponent, 400specular map, 401specular reflection, 398–404speed, see also velocity

and average velocity, 486is a scalar quantity, 35vs. velocity, 35, 488

speedometer, 533sphere, 303–304

intersection in 3D, 729intersection with AABB, 731intersection with plane, 732intersection with ray, 727

spherical coordinates, 204–213and Euler angles, 232converting to/from Cartesian,

211–213traditional conventions, 204video game conventions, 206–207

spherical harmonics, 423spherical light, see point lightspherical linear interpolation, see slerpspherical mapping, 393Spielberg, Steven, 478spin (angle), 236spin angular momentum, see angular

momentumspin angular velocity, 549, see also

angular momentumspline, 690–711

Bezier, 694–697continuity, see continuityHermite, 694–697knot, 693–694notation, 692–693

spot light, 415spring, 571–581, see also harmonic

oscillatorpenalty method, 629restorative force, 571

spring constant, 572spring-damper, see damped oscillation

Page 16: 3DS Max, 393, 414, 691 conventions, 28 AABB, 304–311 closest

822 Index

square matrix, 115square pixels, 363standard lighting model, see Blinn-Phongstandard position (of angle), 22state variables (physics engine), 621–627static friction, see friction, staticstatic intersection test, 721steradian (sr), 356stickler alert

4 × 3 matrix, 181derivative at discontinuity, 502group theory, 38integrability requirements, 519limit, 494limits and derivatives, 502norms, 51points vs. vectors, 40, 668proofs omitted, xvii, 504Riemann integral, 531Taylor series, 509

stiffness, spring, 572Strang, Gilbert, 132structure of arrays (SOA), 449styrofoam, 566subdivision (curve), 685–690

Bezier form, 688–690monomial form, 687–688

subsurface scattering, 352sum and difference (trig) identities, 26sum rule (differentiation), 505–506summation notation, 20Super WHY!, 137SuperBall, 596support, 680, 691surface area of sphere, 304surface normal, 53, 386–393, 399, see also

normalin collision, 594in rendering equation, 386

surface-local space, see tangent spacesuspension (vehicle), 579, 580Sutherland-Hodgman algorithm, 451symmetric Euler angles, 235

Taco Bell, 40tail of vector, 35Tait-Bryan angles, 235tangent

of curve, 652, 700, see also velocity,curve

of spline, 695tangent (trigonometric function), 23tangent basis, see tangent space

tangent line and instantaneous velocity,492

tangent space, 100, 381, 432–435tangent vector (bump mapping), 100, 432Tarantino, Quentin, 75Taxicab norm, 74Taylor series, 508–511, 551, 634

exponential function, 510sine and cosine, 508

TCB spline, 705–710television, see display devicetemperature, 41tension (TCB spline), 705ternary operator, 259texel, 393texture map, 439texture mapping, 393–395texture-mapping coordinates, see UV

coordinatesThe Print Shop, 621They Might Be Giants, 295tilt, 232time, 483time-to-parameter function, 692, 697Titanic, 659Tomb Raider , 425torque, 549, 571, 609, 613

2D, 6093D, 615and force, 610impulsive, see angular impulse

tortoise and hare, 486, 495transformation, 86–108

active vs. passive, 87–96, 137computing using basis vectors,

97–106model, see model transformview, see view transform

transforming normals, 391translation matrix, 178transposition, of matrix, 116triangle, 317–332

area, 318–321barycentric space, 321–324intersection with ray, 734normal, 317notation, 317plane containing, 317special points, 329–332

triangle mesh, 381–386indexed, 382

triangle rule of vector addition, 49triangle soup, 625triangulation of polygon, 338

Page 17: 3DS Max, 393, 414, 691 conventions, 28 AABB, 304–311 closest

Index 823

trigonometry, 22–27identities, 24–27

trip odometer, 537triple product, 163truth, philosophy of, 1turning an edge, 391Twain, Mark, xviitwist, 218, 232typeface conventions, 33

undamped angular frequency, 577underdamping, 577uniform circular motion, see circular

motionuniform knot vector, 654unit circle, 22unit conversion, 486unit quaternion, 250unit vector, 53–55, see also normalUnited States, 81universal gravitation, 563universal joint, 626universal space, see world spaceUnreal engine, 381upright space, 84–86, 218

defense of, 108–109Upside Down, 160user constraint (physics), 625–627UV coordinates, 393, 447

v vector (lighting), 399valence, 382, 385Vandermonde matrix, 660vector

addition, 47–50and Cartesian Coordinates, 36as matrix, 116as sequence of displacements, 37, 49,

75cross product, see cross productdimension, 32direction, 34dot product, see dot productexamples, 36geometric definition, 34in polar form, 213magnitude, 34, 51–53, 74mathematical definition, 32multiplication by scalar, 45–47negation, 43–45normalized, see unit vectornotation, 32row vs. column, 32, 116, 117,

123–124

subtraction, see vector, additionvs. point, 39–41vs. scalar, 32

Vector (container class), 32velocity

angular, see angular velocityangular vs. linear, 548average, see average velocityconstant, 516derivative, 513derivative of position, 495instantaneous, see instantaneous

velocityis a vector quantity, 35of curve, 651–653, see also velocity,

curveof spline, 702–711relative, 43vs. speed, 35

velocity-based simulation, 631vertex

common graphics formats, 448of polygon, 332of triangle, 317of triangle mesh, 382pre-lit, 448rendering data, 446skinned, 425, 447, 449valence of, see valence

vertex normal, 386, 447calculating, 387interpolating, see per-pixel shading

vertex shader, 440, 442, 450–451HLSL examples, 457–474

vertex shading, see Gouraud shadingview frustum, 364–365, 374

clip planes, 375field of view, 367

view space, see camera spaceview transform, 153, 276, 370, 451visible surface determination, 346volume (loudness), 42volume of sphere, 304volumetric light, 418–422, 451vomit comet, 785von Braun, Werner, 601

w-buffering, 379Walt Disney Animation Studios, 704Waring, Edward, 661watt (W), 354, 532Watterson, Bill, xxiwavelength of light, 353weight, 484

Page 18: 3DS Max, 393, 414, 691 conventions, 28 AABB, 304–311 closest

824 Index

West, Mae, 645Whaddya know?, 30widescreen monitors, 363wiggles, 648, 691Wii, 374, 387, 397, 412, 414, 422, 476Wikipedia, xvii, 232, 551, 578, 617, 790Willis Tower, 514, 516, 521Willy Wonka, xiwindow, rendering, 362

aspect ratio, 367resolution, 367

winged-edge model, 386Wolfram MathWorld, xviiwork (physical quantity), 480world space, 81–82, 451wrap addressing mode, 395wrapPi, 241

“y’all”, 201y-intercept, 300yaw, 232

vs. heading, 234yaw-pitch-roll, 232, 233yellow fever, 31Yoda, 479, 560yon clip plane, see far clip plane

z-axis, 13Z-fold paper, 621zenith, 205zero gravity, 640, 785zero vector, 38zoom, 365, 374, see also field of view

orthographic projection, 369ZZ Top, 661

What is it ye would see?If aught of woe or wonder, cease your search.

— Horatio in Hamlet, Act V, scene II