5 views

Original Title: 1 Cartesian Coordinate Systems

Uploaded by Sweta

- Grade 11 University Prep Math Exam
- AGI Data Sheets for Geology in the Field
- An Application of the Imaginary Number "i" Using Coordinate Geometry and Algebra
- MIT Trig
- Emath and Amath Formula
- spm-trial-2010-addmath-qa-Perak(Gerak Gempur)(Set2)
- Mne Monix
- Calculus Review
- Tanjong_Katong_2011 A Maths Prelim P2 (2).doc
- 88573-16427-Maths
- Doc 1104B B.P.S. XI Maths Chapterwise Topicwise Worksheets With Solution 2014 15
- Maths Specialist 3A3B Calc Free Exam 2013
- differentiated lesson exemplar
- Trigonometri
- MHF4U+Exam+Review+Q%26A
- common core sine functions
- mhfexamreview2
- DPP-(4-6)
- 2. Trigonometeric Form of Cn
- Chs 4038 2010 Prelim III p2

You are on page 1of 51

Valve Software University of North

Texas

What Youll See in This

Chapter

This chapter describes the basic concepts of 3D math. It is

divided into five main sections.

Section 1.1 reviews some basic principles of number systems,

and The First Law of Computer Graphics. Since it is so basic, it

wont be covered in these notes.

Section 1.2 introduces 2D Cartesian mathematics, the

mathematics of flat surfaces. We will learn how to describe a

2D cartesian coordinate space and how to locate points using

that space.

In Section 1.3 extends these ideas into three dimensions. We

will learn about left- and right-handed coordinate spaces, and

establish some conventions that we will use later.

Section 1.4 covers some odds and ends of math needed for

the rest of the book.

3D Math Primer for Graphics &

Chapter 1 Notes 2

Game Dev

Word Cloud

Chapter 1 Notes 3

Developers

Introduction and Section 1.1:

1D Mathematics

Chapter 1 Notes 4

Game Dev

Introduction

locations, distances, and angles

precisely and mathematically in 3D

space.

The most frequently used framework

to perform such calculations using a

computer is called the Cartesian

coordinate system.

Chapter 1 Notes 5

Game Dev

Ren Descartes

Cartesian mathematics was invented by (and

is named after) French philosopher, physicist,

physiologist, and mathematician Ren

Descartes, 1596 - 1650.

Descartes is famous not just for inventing

Cartesian mathematics, which at the time was

a stunning unification of algebra and geometry.

He is also well-known for making a pretty good

stab of answering the question How do I know

something is true?, a question that has kept

generations of philosophers happily employed.

3D Math Primer for Graphics &

Chapter 1 Notes 6

Game Dev

Ren Descartes, 1596 -

1650

Chapter 1 Notes 7

Game Dev

1D Mathematics

We assume that you already know about the

natural numbers, the integers, the rational

numbers, and the real numbers.

On a computer you have to make do with

shorts, ints, floats, and doubles. These have

limited precision.

We assume that you have a basic

understanding about how numbers are

represented on a computer.

Remember the First Law of Computer Graphics:

If it looks right, it is right.

3D Math Primer for Graphics &

Chapter 1 Notes 8

Game Dev

Section 1.2:

2D Cartesian Space

Chapter 1 Notes 9

Game Dev

The City of Cartesia

As you can see from the map on the next slide, Center

Street runs east-west through the middle of town.

All other east-west streets are named based on whether

they are north or south of Center Street, and how far

away they are from Center Street. Examples of streets

which run east-west are North 3rd Street and South

15th Street.

The other streets in Cartesia run north-south. Division

Street runs north-south through the middle of town.

All other north-south streets are named based on

whether they are east or west of Division street, and

how far away they are from Division Street. So we have

streets such as East 5th Street and West 22nd Street.

3D Math Primer for Graphics &

Chapter 1 Notes 10

Game Dev

3D Math Primer for Graphics &

Chapter 1 Notes 11

Game Dev

2D Coordinate Spaces

matters are the

numbers.

The abstract

version of this is

called a 2D

Cartesian

coordinate space.

Chapter 1 Notes 12

Game Dev

Origin and Axes

Every 2D Cartesian coordinate space has a special

location, called the origin, which is the center of the

coordinate system. The origin is analogous to the

center of the city in Cartesia.

Every 2D Cartesian coordinate space has two

straight lines that pass through the origin. Each line

is known as an axis and extends infinitely in both

directions.

The two axes are perpendicular to each other.

(Caveat: They don't have to be, but most of the

coordinate systems we will look at will have

perpendicular axes.)

3D Math Primer for Graphics &

Chapter 1 Notes 13

Game Dev

Axes

the horizontal axis is called the x-

axis, with positive x pointing to the

right, and the vertical axis is the y-

axis, with positive y pointing up.

This is the customary orientation for

the axes in a diagram.

Chapter 1 Notes 14

Game Dev

Screen Space

But it doesnt have to be this way. Its only a convention.

In screen space, for example, +y points down.

Screen space is how you measure on a computer screen,

with the origin at the top left corner.

Chapter 1 Notes 15

Game Dev

Axis Orientation

the Cartesian axes.

Chapter 1 Notes 16

Game Dev

Locating Points in 2D

y units up from the origin.

Chapter 1 Notes 17

Game Dev

Axis Equivalence in 2D

by rotating the map around 2 axes

(any 2 will do).

Surprisingly, this is not true of 3D

coordinate space, as we will see

later.

Chapter 1 Notes 18

Game Dev

Examples

Chapter 1 Notes 19

Game Dev

Section 1.3:

3D Cartesian Space

Chapter 1 Notes 20

Game Dev

3D Cartesian Space

Chapter 1 Notes 21

Game Dev

Locating Points in 3D

Point (x,y,z) is

located x units

along the x-axis, y

units along the y-

axis, and z units

along the z-axis

from the origin.

Chapter 1 Notes 22

Game Dev

Axis Equivalence in 3D

axis orientation can be obtained by

rotating the map around 2 axes.

As we said, this is not true of 3D

coordinate space.

Chapter 1 Notes 23

Game Dev

Visualizing 3D Space

axis is horizontal and positive is

right, and that the y-axis is vertical

and positive is up

The z-axis is depth, but should the

positive direction go forwards into

the screen or backwards out from

the screen?

Chapter 1 Notes 24

Game Dev

Left-handed Coordinates

+z goes into

screen

Use your left

hand

Thumb is +x

Index finger is +y

Second finger is

+z

3D Math Primer for Graphics &

Chapter 1 Notes 25

Game Dev

Right-handed Coordinates

+ z goes out

from screen

Use your right

hand

Thumb is +x

Index finger is +y

Second finger is

+z

(Same fingers,

Chapter 1 Notes

Game Dev different hand)

3D Math Primer for Graphics &

26

Changing Conventions

handed coordinate systems, negate

the z.

Graphics books usually use left-

handed.

Linear algebra books usually use

right-handed.

Well use left-handed.

3D Math Primer for Graphics &

Chapter 1 Notes 27

Game Dev

Positive Rotation

coordinate space, and your right

hand for a right-handed coordinate

space.

Point your thumb in the positive

direction of the axis of rotation

(which may not be one of the

principal axes).

Your fingers curl in the direction of

positive rotation.

Chapter 1 Notes

3D Math Primer for Graphics &

Game Dev

28

Positive Rotation

Chapter 1 Notes 29

Game Dev

Our Convention

For the

remainder of

these lecture

notes, as in the

book, we will use

a left-handed

coordinate

system.

Chapter 1 Notes 30

Game Dev

Section 1.4:

Odds and Ends

Chapter 1 Notes 31

Game Dev

Odds and Ends of Math

Used

Summation and product notation:

Chapter 1 Notes 32

Game Dev

Angles

An angle measures an amount of rotation in the plane.

Variables for angles are often given the Greek letter .

The most important units of measure are degrees () and

radians (rad).

Humans usually measure angles using degrees.

One degree measures 1/360th of a revolution, so 360 is a

complete revolution.

Mathematicians, prefer to measure angles in radians, which

is a unit of measure based on the properties of a circle.

When we specify the angle between two rays in radians, we

are actually measuring the length of the intercepted arc of a

unit circle, as shown in the figure on the next slide.

Chapter 1 Notes 33

Game Dev

Radians

Chapter 1 Notes 34

Game Dev

Radians and Degrees

The circumference of a unit circle is 2

radians, with approximately equal to

3.14159265359.

Therefore, 2 radians represents a complete

revolution.

Since 360 = 2 rad, 180 = rad.

To convert an angle from radians to degrees,

we multiply by 180/ 57.29578 and to

convert an angle from degrees to radians,

we multiply by /180 0.01745329.

3D Math Primer for Graphics &

Chapter 1 Notes 35

Game Dev

Trig Functions

Consider the

angle between

the +x axis and

a ray to the

point (x,y) in this

diagram.

Chapter 1 Notes 36

Game Dev

Cosine & Sine

The values of x and y, the coordinates of the

endpoint of the ray, have special properties,

and are so significant mathematically that

they have been assigned special functions,

known as the cosine and sine of the angle.

cos = x

sin = y

You can easily remember which is which

because they are in alphabetical order: x

comes before y, and cos comes before sin.

3D Math Primer for Graphics &

Chapter 1 Notes 37

Game Dev

More Trig Functions

cotangent.

Chapter 1 Notes 38

Game Dev

Back to Sine and Cos

If we form a right triangle using the rotated ray as the

hypotenuse, we see that x and y give the lengths of the

adjacent and opposite legs of the triangle, respectively.

The terms adjacent and opposite are relative to the

angle .

Alphabetical order is again a useful memory aid:

adjacent and opposite are in the same order as the

corresponding cosine and sine.

Let the variables hypotenuse, adjacent, and opposite

stand for the lengths of the hypotenuse, adjacent leg,

and opposite leg, respectively, as shown on the next

slide.

Chapter 1 Notes 39

Game Dev

3D Math Primer for Graphics &

Chapter 1 Notes 40

Game Dev

Primary Trig Functions

Chapter 1 Notes 41

Game Dev

Mnemonics for Trig Functions

Chapter 1 Notes 42

Game Dev

Alternative Forms

Caught another horse

Taking oats away

Caught another hippy

Tripping on acid

Chapter 1 Notes 43

Game Dev

Identities Related to Symmetry

Chapter 1 Notes 44

Game Dev

The Pythagorean Theorem

of the two legs of a right

triangle (those sides that

are adjacent to the right

angle) is equal to the

square of the

hypotenuse (the leg

opposite the right angle).

That is, a2 + b2 = c2.

Chapter 1 Notes 45

Game Dev

Pythagorean Identities

applying the Pythagorean theorem to

the unit circle.

sin2 + cos2 = 1

1 + tan2 = sec2

1 + cot2 = csc2

Chapter 1 Notes 46

Game Dev

Sum & Difference

Identities

Chapter 1 Notes 47

Game Dev

Double Angle Identities

special case where a and b are the

same, we get the following double

angle identities.

Chapter 1 Notes 48

Game Dev

Law of Sines

Chapter 1 Notes 49

Game Dev

Law of Cosines

Chapter 1 Notes 50

Game Dev

That concludes Chapter 1. Next, Chapter

2:

Vectors

Chapter 1 Notes 51

Game Dev

- Grade 11 University Prep Math ExamUploaded byDanaEHorochowski
- AGI Data Sheets for Geology in the FieldUploaded byWagner Cosio Azarte
- An Application of the Imaginary Number "i" Using Coordinate Geometry and AlgebraUploaded byHerb Norman Sr
- MIT TrigUploaded byMaithy Ton
- Emath and Amath FormulaUploaded byveryveryhappyfeet
- spm-trial-2010-addmath-qa-Perak(Gerak Gempur)(Set2)Uploaded byNur Ashikin Ismahun
- Mne MonixUploaded byJoa See
- Calculus ReviewUploaded byJoshua Jones
- Tanjong_Katong_2011 A Maths Prelim P2 (2).docUploaded byHui Xiu
- 88573-16427-MathsUploaded byAbhishek Chaudhary
- Doc 1104B B.P.S. XI Maths Chapterwise Topicwise Worksheets With Solution 2014 15Uploaded byMayur Gupta
- Maths Specialist 3A3B Calc Free Exam 2013Uploaded bygragon.07
- differentiated lesson exemplarUploaded byapi-373598912
- TrigonometriUploaded bySashineka Sumbulingam
- MHF4U+Exam+Review+Q%26AUploaded byManmeetKalsi
- common core sine functionsUploaded byapi-297804475
- mhfexamreview2Uploaded byOksana Mandryk
- DPP-(4-6)Uploaded byRahul Kumar Sharma
- 2. Trigonometeric Form of CnUploaded byKyle Samson
- Chs 4038 2010 Prelim III p2Uploaded bymath3matics3
- 11 finding an angle in a right angled triangleUploaded byapi-299265916
- ch3Uploaded byM
- Add Maths 2004 Suggested SolutionUploaded bySoumyabrata
- 8-Kinematik-Robot.pdfUploaded byAbi Syafiq
- AIAA-2009-6050Uploaded byMohammad Reza Madadi
- Computations on the EllipsoidUploaded byNelia Banda
- Trial SPM MT 2014 Jawapan K2Uploaded byMohd Ellif Sarian
- James Ruse 3 Unit Trial Mathematics 2011Uploaded byAngus
- apu_144336_at_right_angles_november_2014_low_res.pdfUploaded byTanay Gupta
- STPM Trials 2009 Math T Paper 2 (Pahang)Uploaded byJessica Jones

- Chapter One(1)Uploaded bySweta
- Chap 5 ppt(1)(1)Uploaded bySweta
- Acc Injury Prev2Uploaded byMohsen Saidi
- PPEUploaded byAllan Yngente
- WEB Thorax and LungsUploaded bySweta
- Printable Chore Chart for KidsUploaded bySweta
- Continue Carbon LearningUploaded bySweta
- CarbsUploaded bySweta
- GENERAL RULES for Safety in LabUploaded bySweta
- Word Roots Weeks 1-12Uploaded bySweta
- SCI Method TestUploaded bySweta
- The Muscular System Ch 7Uploaded bySweta
- TheNervousSystemCh8 (1)Uploaded bySweta
- Anatomy & Physiology Intro. Powerpoint (Chapter 1)Uploaded bySweta
- Biology Chapter 7 Lecture NotesUploaded bySweta
- Prefixes of Metric SystemUploaded bySweta
- Proteins (PRO)Uploaded bySweta
- Lipid (FATs)Uploaded bySweta
- Nucleic AcidsUploaded bySweta
- What is LifeUploaded bySweta
- Nucleus and Its Function and StructureUploaded bySweta
- NU Adult II Chapter 14 Altered Immune Response & TransplantsUploaded bySweta
- Chp 4 Patient and Caregiver Teaching student.pptxUploaded bySweta
- Telemetry Patient Shift Report (1)Uploaded bySweta
- Light Microscope NotesUploaded bySweta

- Boyce_DE_10e_PPT_ch10_4_FINAL.pptxUploaded byphakphum
- ch6.pdfUploaded byAndrew Borg
- 2009 Em s4exp5na p1Uploaded byshoyukun
- 63 Trigonometric Ratio & Identity Part 2 of 2Uploaded byRahul Sharma
- Primer Trig PhysicsUploaded byjay
- Wind loading on curved circular cylinder structuresUploaded bypodrow
- F. Y. B. Sc. (Mathematics) Question Bank-IIUploaded byAmit Kumar
- JULY_2010Uploaded byMohamad Sabri Abbiey
- Mathematical Circle 3Uploaded byHameer Abbasi
- gcse-maths-h-nc-s1Uploaded bybabatale
- Calculus for AP PhysicsUploaded byTagiadin John
- PLC Structured TextUploaded byralejaga5970
- 05_Properties and Solution of TrianglesUploaded byJose
- -- PAIR OF STRAIGHT LINES.pdfUploaded byNipun Mittal
- 02_3_Product_of_Vectors.pdfUploaded byReddyvari Venugopal
- NC Error PropagationUploaded bySalman Khan
- Random Walks and Heat EquationsUploaded byDialid Santiago
- Model Question Paper (P+C+M)Uploaded byPratheek NB
- Rotating Machinery - Practical Solutions to Unbalance and MisalignmentUploaded byleitor4
- Shinglee_EmathTxt_6thEdtUploaded byMethodology OfStudies
- Alevel C3C4Uploaded bynuddin123
- Control_worked_problems_ch4Uploaded bycivaas
- DataStage FunctionsUploaded byprasanth_irs
- Different Formula for Near Vertical PhotographUploaded byVictoria Jackson
- Revit Basic FormulaUploaded byDadii Cris
- EEET2369 Lecture 1_PresentationUploaded byGeoffrey Scarlett
- ChmUploaded byapi-3827000
- Test 1 AnswerUploaded bydeyaa1000000
- Rumus MatematikaUploaded byRiza Arieyanda
- Cos in RoadUploaded byMhands