SlideShare a Scribd company logo
1 of 51
Beginning Direct3D Game Programming:
Mathematics Primer
jintaeks@gmail.com
Division of Digital Contents, DongSeo University.
March 2016
2D Rotation
Goal: We want to get the rotated point of (x,y)
about theta(θ), (x',y').
2
Assumption: We just know the four fundamental rules of
arithmetic.
Domain and codomain
 In mathematics, the codomain or target set of a function is
the set Y into which all of the output of the function is
constrained to fall. It is the set Y in the notation y=f(x).
 A function f from X to Y. The large blue oval is Y which is the
codomain of f . The smaller oval inside Y is the image of f
3
Exponentiation
 Exponentiation is
a mathematical operation,
written as bn, involving two
numbers, the base b and
the exponent n.
 When n is a positive integer,
exponentiation corresponds to
repeated multiplication of the
base: that is, bn is the product of
multiplying n bases:
4
Factorial
 In mathematics, the factorial of a non-negative integer n,
denoted by n!, is the product of all positive integers less than
or equal to n.
5
Square Root
 In mathematics, a square root of a number a is a
number y such that y2 = a, in other words, a
number y whose square(the result of multiplying the number
by itself, or y × y) is a.
 For example, 4 and −4 are square roots of 16 because 42 =
(−4)2 = 16.
6
16 = 4
2
Cubic Root
 A Root is a general notation for all degrees.
 In case of square root, we can omit superscript 2.
7
27 = 3
3
16 = 4
2
Inverse function
 In mathematics, an inverse
function is a function that "reverses"
another function. That is, if f is a
function mapping x to y, then the
inverse function of f maps y back to x.
8
9
Pythagoras' theorem
 In mathematics, the Pythagorean theorem, also known
as Pythagoras' theorem, is a fundamental relation
in Euclidean geometry among the three sides of a right
triangle.
a2+b2=c2
10
proof
11
a2+b2=c2
 If the length of both a and b are known, then c can be
calculated as:
12
Summation Notation: Sigma(∑)
 In mathematics, summation (symbol: ∑) is the addition of
a sequence of numbers; the result is their sum or total.
13
14
Practice
 Write a function that calculate below equation.
15
Cartesian coordinate system
 A Cartesian coordinate system is a coordinate system that
specifies each point uniquely in a plane by a pair
of numerical coordinates, which are the signed distances to
the point from two fixed perpendicular directed lines,
measured in the same unit of length.
16
• The invention of Cartesian coordinates in
the 17th century by René
Descartes (Latinized name: Cartesius)
revolutionized mathematics.
Cartesian coordinate system
 Each reference line is called
a coordinate axis or just axis of the
system, and the point where they
meet is its origin, usually at ordered
pair (0, 0).
 The coordinates can also be defined
as the positions of the perpendicular
projections of the point onto the two
axes, expressed as signed distances
from the origin.
17
 Illustration of a Cartesian
coordinate plane. Four points are
marked and labeled with their
coordinates: (2,3) in green, (−3,1)
in red, (−1.5,−2.5) in blue, and the
origin (0,0) in purple.
18
 Cartesian coordinate system with a
circle of radius 2 centered at the
origin marked in red. The equation
of a circle is (x− a)2 +
(y − b)2 = r2 where a and b are the
coordinates of the
center (a, b) and r is the radius.
Three dimensions
 Choosing a Cartesian
coordinate system for a
three-dimensional space
means choosing an
ordered triplet of lines
(axes) that are pair-wise
perpendicular, have a
single unit of length for
all three axes and have an
orientation for each axis.
19
Notations and conventions
 The Cartesian coordinates of a point are usually written in
parentheses and separated by commas, as in (10, 5) or(3, 5, 7).
 The origin is often labelled with the capital letter O.
 In analytic geometry, unknown or generic coordinates are
often denoted by the letters (x, y) in the plane, and (x, y, z) in
three-dimensional space.
20
Quadrants
 The axes of a two-dimensional
Cartesian system divide the
plane into four infinite regions,
called quadrants, each
bounded by two half-axes.
 These are often numbered
from 1st to 4th and denoted
by Roman numerals: I (where
the signs of the two
coordinates are +,+), II (−,+), III
(−,−), and IV (+,−).
21
Cartesian formulae for the plane: distance
 The Euclidean distance between two points of the plane with
Cartesian coordinates (x1,y1) and (x2,y2) is like below:
 In three-dimensional space, the distance between
points (x1,y1,z1) and (x2,y2,z2) is
22
Translation and Rotation
 Translating a set of points of the plane, preserving the
distances and directions between them, is equivalent to
adding a fixed pair of numbers (a, b) to the Cartesian
coordinates of every point in the set.
 To rotate a figure counterclockwise around the origin by some
angle is equivalent to replacing every point with coordinates
(x,y) by the point with coordinates (x',y'), where
23
Affine Transformation
 Another way to represent coordinate transformations in
Cartesian coordinates is through affine transformations.
 In affine transformations an extra dimension is added and all
points are given a value of 1 for this extra dimension.
 The advantage of doing this is that point translations can be
specified in the final column of matrix A. In this way, all of the
euclidean transformations become transactable as matrix
point multiplications.
 The affine transformation is given by:
24
Orientation and handedness
 Once the x- and y-axes are specified, they determine
the line along which the z-axis should lie, but there are two
possible directions on this line.
 The two possible coordinate systems which result are called
'right-handed' and 'left-handed'.
25
• The left-handed orientation is shown on the left, and the
right-handed on the right.
26
 The right-handed Cartesian
coordinate system indicating the
coordinate planes.
• Unity 3D game engine uses
LHS.
Write a program that draws f(x)=x2
void OnDraw( HDC hdc ) {
SelectObject( hdc, GetStockObject( DC_PEN ) );
SetDCPenColor( hdc, RGB( 255, 0, 0 ) );
MoveToEx( hdc, 0, 0, NULL );
LineTo( hdc, 100, 50 );
}
27
 Use Win32 Gdi application on Windows7.
 We assume origin is located at (200,200) in the screen
coordinates.
 Draw the x-axis with a red line.
 Draw the y-axis with a blue line.
 20 pixel corresponds to 1 unit(real number).
28
Pi(π)
 The number π is a mathematical constant, the ratio of
a circle's circumference to its diameter, commonly
approximated as 3.14159.
 It has been represented by the Greek letter "π" since the mid-
18th century, though it is also sometimes spelled out as "pi"
(/paɪ/).
29
 π is commonly defined as the ratio of
a circle's circumference C to its diameter d:
30
Radian
 The radian is the standard unit of angular measure, used in
many areas of mathematics. An angle's measurement in
radians is numerically equal to the length of a corresponding
arc of a unit circle; one radian is just under 57.3 degrees.
31
Computing Pi
 Monte Carlo methods, which evaluate the results of multiple
random trials, can be used to create approximations of π.
 Draw a circle inscribed in a square, and randomly place dots
in the square. The ratio of dots inside the circle to the total
number of dots will approximately equal π/4.
32
Practice
 Write a program that approximately calculate the Pi.
33
Trigonometric functions
 In mathematics, the trigonometric functions (also called
the circular functions) are functions of an angle.
 They relate the angles of a triangle to the lengths of its sides.
34
Tangent line, secant line and chord
35
36
Do you know the difference between
angle, degree and radian?
37
38
39
40
41
Pythagorean trigonometric identity
42
How to implement trigonometric functions?
 Taylor polynomial
43
 The sine function (blue) is closely approximated by its Taylor
polynomial of degree 7 (pink) for a full cycle centered on the
origin.
44
Practice
 Write a my own Sine function. Use Taylor series formula.
 Use for-loop to implement Taylor series and tune proper
iteration count.
45
sum and difference formula
46
proof: Let's watch the video.
47
Inverse of trigonometric functions
48
2D Rotation: Do you remember the first question?
49
Practice
 Write a function gets a rotated position of (x,y) about theta.
50
References
 https://en.wikipedia.org/wiki/Pythagorean_theorem
 https://en.wikipedia.org/wiki/Trigonometric_functions
 https://www.youtube.com/watch?v=zcEMKv5yIYs
– The derivation of the Sum Identities for Cosine.
51

More Related Content

What's hot

April 15, 2015
April 15, 2015April 15, 2015
April 15, 2015khyps13
 
Soal Olimpiade
Soal OlimpiadeSoal Olimpiade
Soal Olimpiadedinakudus
 
Math unit38 vectors
Math unit38 vectorsMath unit38 vectors
Math unit38 vectorseLearningJa
 
coordinate Geometry straight line
coordinate Geometry   straight linecoordinate Geometry   straight line
coordinate Geometry straight lineSahilPuri14
 
Coordinate geometry
Coordinate geometryCoordinate geometry
Coordinate geometryCarl Davis
 
Finding Area of a Composite Figure (Presentation)
Finding Area of a Composite Figure (Presentation)Finding Area of a Composite Figure (Presentation)
Finding Area of a Composite Figure (Presentation)CRISALDO CORDURA
 
THREE DIMENSIONAL GEOMETRY
THREE DIMENSIONAL GEOMETRYTHREE DIMENSIONAL GEOMETRY
THREE DIMENSIONAL GEOMETRYUrmila Bhardwaj
 
presentation on co-ordinate geometery
presentation on co-ordinate geometerypresentation on co-ordinate geometery
presentation on co-ordinate geometeryFutureX1
 
Analytic geometry lecture1
Analytic geometry lecture1Analytic geometry lecture1
Analytic geometry lecture1admercano101
 
3D Coordinate Geometry
3D Coordinate Geometry 3D Coordinate Geometry
3D Coordinate Geometry ParasKulhari
 

What's hot (19)

Algebra booklet
Algebra bookletAlgebra booklet
Algebra booklet
 
Maths IB Important
Maths IB ImportantMaths IB Important
Maths IB Important
 
Straight lines
Straight linesStraight lines
Straight lines
 
April 15, 2015
April 15, 2015April 15, 2015
April 15, 2015
 
Coordinate geometry
Coordinate geometryCoordinate geometry
Coordinate geometry
 
Soal Olimpiade
Soal OlimpiadeSoal Olimpiade
Soal Olimpiade
 
Math unit38 vectors
Math unit38 vectorsMath unit38 vectors
Math unit38 vectors
 
Planar graph
Planar graphPlanar graph
Planar graph
 
coordinate Geometry straight line
coordinate Geometry   straight linecoordinate Geometry   straight line
coordinate Geometry straight line
 
Coordinate geometry
Coordinate geometryCoordinate geometry
Coordinate geometry
 
Finding Area of a Composite Figure (Presentation)
Finding Area of a Composite Figure (Presentation)Finding Area of a Composite Figure (Presentation)
Finding Area of a Composite Figure (Presentation)
 
THREE DIMENSIONAL GEOMETRY
THREE DIMENSIONAL GEOMETRYTHREE DIMENSIONAL GEOMETRY
THREE DIMENSIONAL GEOMETRY
 
presentation on co-ordinate geometery
presentation on co-ordinate geometerypresentation on co-ordinate geometery
presentation on co-ordinate geometery
 
Analytic geometry lecture1
Analytic geometry lecture1Analytic geometry lecture1
Analytic geometry lecture1
 
Math14 lesson 5
Math14 lesson 5Math14 lesson 5
Math14 lesson 5
 
Lecture co1 math 21-1
Lecture co1 math 21-1Lecture co1 math 21-1
Lecture co1 math 21-1
 
Math14 lesson 1
Math14 lesson 1Math14 lesson 1
Math14 lesson 1
 
Vectors
VectorsVectors
Vectors
 
3D Coordinate Geometry
3D Coordinate Geometry 3D Coordinate Geometry
3D Coordinate Geometry
 

Viewers also liked

Bioteknologia
BioteknologiaBioteknologia
Bioteknologiaiazpiro1
 
GuíA Guadalinex2
GuíA Guadalinex2GuíA Guadalinex2
GuíA Guadalinex2magonal2
 
Apresentação sobre os blogs moçambicanos para a conferência do cea
Apresentação sobre os blogs moçambicanos para a conferência do ceaApresentação sobre os blogs moçambicanos para a conferência do cea
Apresentação sobre os blogs moçambicanos para a conferência do ceaNyikiwa
 
گلستان ابوالحسن1
گلستان ابوالحسن1گلستان ابوالحسن1
گلستان ابوالحسن1guest3ba11f
 
Beginning direct3d gameprogrammingmath02_logarithm_20160324_jintaeks
Beginning direct3d gameprogrammingmath02_logarithm_20160324_jintaeksBeginning direct3d gameprogrammingmath02_logarithm_20160324_jintaeks
Beginning direct3d gameprogrammingmath02_logarithm_20160324_jintaeksJinTaek Seo
 
Gas Natural Vehicular: un combustible econòmic, sostenible i tecnològicament ...
Gas Natural Vehicular: un combustible econòmic, sostenible i tecnològicament ...Gas Natural Vehicular: un combustible econòmic, sostenible i tecnològicament ...
Gas Natural Vehicular: un combustible econòmic, sostenible i tecnològicament ...AMTU
 
Sociala medier -Internetstrategidagen 11 mars
Sociala medier -Internetstrategidagen 11 marsSociala medier -Internetstrategidagen 11 mars
Sociala medier -Internetstrategidagen 11 marsTherese Mannheimer
 
Tijs michiel verwest
Tijs michiel verwestTijs michiel verwest
Tijs michiel verwestmontse81
 
Cara menghaspus section break
Cara menghaspus section breakCara menghaspus section break
Cara menghaspus section breakmbak_aul
 
LIO-Discussiedocument_Continous_Assurance
LIO-Discussiedocument_Continous_AssuranceLIO-Discussiedocument_Continous_Assurance
LIO-Discussiedocument_Continous_AssuranceElly Stroo Cloeck
 
E 12 bsp1779_pankajkumarvisualcv
E 12 bsp1779_pankajkumarvisualcvE 12 bsp1779_pankajkumarvisualcv
E 12 bsp1779_pankajkumarvisualcvPankaj Kumar
 
Diversity Executive_The 4 Stages_1-2.2010
Diversity Executive_The 4 Stages_1-2.2010Diversity Executive_The 4 Stages_1-2.2010
Diversity Executive_The 4 Stages_1-2.2010Helene Lollis
 

Viewers also liked (20)

Portfolio 4por4 - Web & Image Solutions
Portfolio 4por4 - Web & Image SolutionsPortfolio 4por4 - Web & Image Solutions
Portfolio 4por4 - Web & Image Solutions
 
Presentacion Postgradoen Accesibilidad y Diseño para Todos
Presentacion Postgradoen Accesibilidad y Diseño para TodosPresentacion Postgradoen Accesibilidad y Diseño para Todos
Presentacion Postgradoen Accesibilidad y Diseño para Todos
 
Copy Rights
Copy RightsCopy Rights
Copy Rights
 
Ufficio Virtuale Padova
Ufficio Virtuale PadovaUfficio Virtuale Padova
Ufficio Virtuale Padova
 
Bioteknologia
BioteknologiaBioteknologia
Bioteknologia
 
Sant cugat
Sant cugatSant cugat
Sant cugat
 
Pruebaslide
PruebaslidePruebaslide
Pruebaslide
 
GuíA Guadalinex2
GuíA Guadalinex2GuíA Guadalinex2
GuíA Guadalinex2
 
Matthew Richie
Matthew RichieMatthew Richie
Matthew Richie
 
Apresentação sobre os blogs moçambicanos para a conferência do cea
Apresentação sobre os blogs moçambicanos para a conferência do ceaApresentação sobre os blogs moçambicanos para a conferência do cea
Apresentação sobre os blogs moçambicanos para a conferência do cea
 
گلستان ابوالحسن1
گلستان ابوالحسن1گلستان ابوالحسن1
گلستان ابوالحسن1
 
Beginning direct3d gameprogrammingmath02_logarithm_20160324_jintaeks
Beginning direct3d gameprogrammingmath02_logarithm_20160324_jintaeksBeginning direct3d gameprogrammingmath02_logarithm_20160324_jintaeks
Beginning direct3d gameprogrammingmath02_logarithm_20160324_jintaeks
 
Gas Natural Vehicular: un combustible econòmic, sostenible i tecnològicament ...
Gas Natural Vehicular: un combustible econòmic, sostenible i tecnològicament ...Gas Natural Vehicular: un combustible econòmic, sostenible i tecnològicament ...
Gas Natural Vehicular: un combustible econòmic, sostenible i tecnològicament ...
 
Il Trovatore.Giuseppe Verdi.Tr
Il Trovatore.Giuseppe Verdi.TrIl Trovatore.Giuseppe Verdi.Tr
Il Trovatore.Giuseppe Verdi.Tr
 
Sociala medier -Internetstrategidagen 11 mars
Sociala medier -Internetstrategidagen 11 marsSociala medier -Internetstrategidagen 11 mars
Sociala medier -Internetstrategidagen 11 mars
 
Tijs michiel verwest
Tijs michiel verwestTijs michiel verwest
Tijs michiel verwest
 
Cara menghaspus section break
Cara menghaspus section breakCara menghaspus section break
Cara menghaspus section break
 
LIO-Discussiedocument_Continous_Assurance
LIO-Discussiedocument_Continous_AssuranceLIO-Discussiedocument_Continous_Assurance
LIO-Discussiedocument_Continous_Assurance
 
E 12 bsp1779_pankajkumarvisualcv
E 12 bsp1779_pankajkumarvisualcvE 12 bsp1779_pankajkumarvisualcv
E 12 bsp1779_pankajkumarvisualcv
 
Diversity Executive_The 4 Stages_1-2.2010
Diversity Executive_The 4 Stages_1-2.2010Diversity Executive_The 4 Stages_1-2.2010
Diversity Executive_The 4 Stages_1-2.2010
 

Similar to Beginning direct3d gameprogrammingmath01_primer_20160324_jintaeks

Beginning direct3d gameprogrammingmath06_transformations_20161019_jintaeks
Beginning direct3d gameprogrammingmath06_transformations_20161019_jintaeksBeginning direct3d gameprogrammingmath06_transformations_20161019_jintaeks
Beginning direct3d gameprogrammingmath06_transformations_20161019_jintaeksJinTaek Seo
 
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeks
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeksBeginning direct3d gameprogrammingmath03_vectors_20160328_jintaeks
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeksJinTaek Seo
 
History,applications,algebra and mathematical form of plane in mathematics (p...
History,applications,algebra and mathematical form of plane in mathematics (p...History,applications,algebra and mathematical form of plane in mathematics (p...
History,applications,algebra and mathematical form of plane in mathematics (p...guesta62dea
 
Class 10 mathematics compendium
Class 10 mathematics compendiumClass 10 mathematics compendium
Class 10 mathematics compendiumAPEX INSTITUTE
 
Copyright © Cengage Learning. All rights reserved. ‹#›.docx
Copyright © Cengage Learning. All rights reserved. ‹#›.docxCopyright © Cengage Learning. All rights reserved. ‹#›.docx
Copyright © Cengage Learning. All rights reserved. ‹#›.docxbobbywlane695641
 
EMT_2A_cylindrical coordinates.pptx
EMT_2A_cylindrical coordinates.pptxEMT_2A_cylindrical coordinates.pptx
EMT_2A_cylindrical coordinates.pptx5610UmarIqbal
 
Coordinate geometry 9 grade
Coordinate geometry 9 gradeCoordinate geometry 9 grade
Coordinate geometry 9 gradeSiddu Lingesh
 
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeksBeginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeksJinTaek Seo
 
Computer Graphics & linear Algebra
Computer Graphics & linear Algebra Computer Graphics & linear Algebra
Computer Graphics & linear Algebra Xad Kuain
 
Lecture 07 graphing linear equations
Lecture 07 graphing linear equationsLecture 07 graphing linear equations
Lecture 07 graphing linear equationsHazel Joy Chong
 
Coordinate System.pptx
Coordinate System.pptxCoordinate System.pptx
Coordinate System.pptxKeizylleCajeme
 
Coordinate System.pptx
Coordinate System.pptxCoordinate System.pptx
Coordinate System.pptxKeizylleCajeme
 
Multiple integral(tripple integral)
Multiple integral(tripple integral)Multiple integral(tripple integral)
Multiple integral(tripple integral)jigar sable
 

Similar to Beginning direct3d gameprogrammingmath01_primer_20160324_jintaeks (20)

Beginning direct3d gameprogrammingmath06_transformations_20161019_jintaeks
Beginning direct3d gameprogrammingmath06_transformations_20161019_jintaeksBeginning direct3d gameprogrammingmath06_transformations_20161019_jintaeks
Beginning direct3d gameprogrammingmath06_transformations_20161019_jintaeks
 
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeks
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeksBeginning direct3d gameprogrammingmath03_vectors_20160328_jintaeks
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeks
 
History,applications,algebra and mathematical form of plane in mathematics (p...
History,applications,algebra and mathematical form of plane in mathematics (p...History,applications,algebra and mathematical form of plane in mathematics (p...
History,applications,algebra and mathematical form of plane in mathematics (p...
 
Co-ordinate Geometry.pptx
Co-ordinate Geometry.pptxCo-ordinate Geometry.pptx
Co-ordinate Geometry.pptx
 
Plano numerico
Plano numericoPlano numerico
Plano numerico
 
Class 10 mathematics compendium
Class 10 mathematics compendiumClass 10 mathematics compendium
Class 10 mathematics compendium
 
Copyright © Cengage Learning. All rights reserved. ‹#›.docx
Copyright © Cengage Learning. All rights reserved. ‹#›.docxCopyright © Cengage Learning. All rights reserved. ‹#›.docx
Copyright © Cengage Learning. All rights reserved. ‹#›.docx
 
EMT_2A_cylindrical coordinates.pptx
EMT_2A_cylindrical coordinates.pptxEMT_2A_cylindrical coordinates.pptx
EMT_2A_cylindrical coordinates.pptx
 
Coordinate geometry 9 grade
Coordinate geometry 9 gradeCoordinate geometry 9 grade
Coordinate geometry 9 grade
 
Math Analysis I
Math Analysis I Math Analysis I
Math Analysis I
 
Geometric model & curve
Geometric model & curveGeometric model & curve
Geometric model & curve
 
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeksBeginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
 
Computer Graphics & linear Algebra
Computer Graphics & linear Algebra Computer Graphics & linear Algebra
Computer Graphics & linear Algebra
 
Lecture 07 graphing linear equations
Lecture 07 graphing linear equationsLecture 07 graphing linear equations
Lecture 07 graphing linear equations
 
Coordinate System.pptx
Coordinate System.pptxCoordinate System.pptx
Coordinate System.pptx
 
Coordinate System.pptx
Coordinate System.pptxCoordinate System.pptx
Coordinate System.pptx
 
Analytic geometry basic concepts
Analytic geometry basic conceptsAnalytic geometry basic concepts
Analytic geometry basic concepts
 
Multiple integral(tripple integral)
Multiple integral(tripple integral)Multiple integral(tripple integral)
Multiple integral(tripple integral)
 
triple integrals.pdf
triple integrals.pdftriple integrals.pdf
triple integrals.pdf
 
Math project
Math projectMath project
Math project
 

More from JinTaek Seo

Neural network 20161210_jintaekseo
Neural network 20161210_jintaekseoNeural network 20161210_jintaekseo
Neural network 20161210_jintaekseoJinTaek Seo
 
05 heap 20161110_jintaeks
05 heap 20161110_jintaeks05 heap 20161110_jintaeks
05 heap 20161110_jintaeksJinTaek Seo
 
02 linked list_20160217_jintaekseo
02 linked list_20160217_jintaekseo02 linked list_20160217_jintaekseo
02 linked list_20160217_jintaekseoJinTaek Seo
 
Hermite spline english_20161201_jintaeks
Hermite spline english_20161201_jintaeksHermite spline english_20161201_jintaeks
Hermite spline english_20161201_jintaeksJinTaek Seo
 
01 stack 20160908_jintaek_seo
01 stack 20160908_jintaek_seo01 stack 20160908_jintaek_seo
01 stack 20160908_jintaek_seoJinTaek Seo
 
03 fsm how_toimplementai_state_20161006_jintaeks
03 fsm how_toimplementai_state_20161006_jintaeks03 fsm how_toimplementai_state_20161006_jintaeks
03 fsm how_toimplementai_state_20161006_jintaeksJinTaek Seo
 
Beginning direct3d gameprogramming10_shaderdetail_20160506_jintaeks
Beginning direct3d gameprogramming10_shaderdetail_20160506_jintaeksBeginning direct3d gameprogramming10_shaderdetail_20160506_jintaeks
Beginning direct3d gameprogramming10_shaderdetail_20160506_jintaeksJinTaek Seo
 
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeksBeginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeksJinTaek Seo
 
Beginning direct3d gameprogramming08_usingtextures_20160428_jintaeks
Beginning direct3d gameprogramming08_usingtextures_20160428_jintaeksBeginning direct3d gameprogramming08_usingtextures_20160428_jintaeks
Beginning direct3d gameprogramming08_usingtextures_20160428_jintaeksJinTaek Seo
 
Beginning direct3d gameprogramming07_lightsandmaterials_20161117_jintaeks
Beginning direct3d gameprogramming07_lightsandmaterials_20161117_jintaeksBeginning direct3d gameprogramming07_lightsandmaterials_20161117_jintaeks
Beginning direct3d gameprogramming07_lightsandmaterials_20161117_jintaeksJinTaek Seo
 
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeksBeginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeksJinTaek Seo
 
Beginning direct3d gameprogramming05_thebasics_20160421_jintaeks
Beginning direct3d gameprogramming05_thebasics_20160421_jintaeksBeginning direct3d gameprogramming05_thebasics_20160421_jintaeks
Beginning direct3d gameprogramming05_thebasics_20160421_jintaeksJinTaek Seo
 
Beginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeks
Beginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeksBeginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeks
Beginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeksJinTaek Seo
 
Beginning direct3d gameprogramming02_overviewofhalandcom_20160408_jintaeks
Beginning direct3d gameprogramming02_overviewofhalandcom_20160408_jintaeksBeginning direct3d gameprogramming02_overviewofhalandcom_20160408_jintaeks
Beginning direct3d gameprogramming02_overviewofhalandcom_20160408_jintaeksJinTaek Seo
 
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...JinTaek Seo
 
Beginning direct3d gameprogramming01_20161102_jintaeks
Beginning direct3d gameprogramming01_20161102_jintaeksBeginning direct3d gameprogramming01_20161102_jintaeks
Beginning direct3d gameprogramming01_20161102_jintaeksJinTaek Seo
 
Beginning direct3d gameprogramming03_programmingconventions_20160414_jintaeks
Beginning direct3d gameprogramming03_programmingconventions_20160414_jintaeksBeginning direct3d gameprogramming03_programmingconventions_20160414_jintaeks
Beginning direct3d gameprogramming03_programmingconventions_20160414_jintaeksJinTaek Seo
 
Beginning direct3d gameprogrammingmath04_calculus_20160324_jintaeks
Beginning direct3d gameprogrammingmath04_calculus_20160324_jintaeksBeginning direct3d gameprogrammingmath04_calculus_20160324_jintaeks
Beginning direct3d gameprogrammingmath04_calculus_20160324_jintaeksJinTaek Seo
 
Beginning direct3d gameprogrammingcpp02_20160324_jintaeks
Beginning direct3d gameprogrammingcpp02_20160324_jintaeksBeginning direct3d gameprogrammingcpp02_20160324_jintaeks
Beginning direct3d gameprogrammingcpp02_20160324_jintaeksJinTaek Seo
 
Boost pp 20091102_서진택
Boost pp 20091102_서진택Boost pp 20091102_서진택
Boost pp 20091102_서진택JinTaek Seo
 

More from JinTaek Seo (20)

Neural network 20161210_jintaekseo
Neural network 20161210_jintaekseoNeural network 20161210_jintaekseo
Neural network 20161210_jintaekseo
 
05 heap 20161110_jintaeks
05 heap 20161110_jintaeks05 heap 20161110_jintaeks
05 heap 20161110_jintaeks
 
02 linked list_20160217_jintaekseo
02 linked list_20160217_jintaekseo02 linked list_20160217_jintaekseo
02 linked list_20160217_jintaekseo
 
Hermite spline english_20161201_jintaeks
Hermite spline english_20161201_jintaeksHermite spline english_20161201_jintaeks
Hermite spline english_20161201_jintaeks
 
01 stack 20160908_jintaek_seo
01 stack 20160908_jintaek_seo01 stack 20160908_jintaek_seo
01 stack 20160908_jintaek_seo
 
03 fsm how_toimplementai_state_20161006_jintaeks
03 fsm how_toimplementai_state_20161006_jintaeks03 fsm how_toimplementai_state_20161006_jintaeks
03 fsm how_toimplementai_state_20161006_jintaeks
 
Beginning direct3d gameprogramming10_shaderdetail_20160506_jintaeks
Beginning direct3d gameprogramming10_shaderdetail_20160506_jintaeksBeginning direct3d gameprogramming10_shaderdetail_20160506_jintaeks
Beginning direct3d gameprogramming10_shaderdetail_20160506_jintaeks
 
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeksBeginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
 
Beginning direct3d gameprogramming08_usingtextures_20160428_jintaeks
Beginning direct3d gameprogramming08_usingtextures_20160428_jintaeksBeginning direct3d gameprogramming08_usingtextures_20160428_jintaeks
Beginning direct3d gameprogramming08_usingtextures_20160428_jintaeks
 
Beginning direct3d gameprogramming07_lightsandmaterials_20161117_jintaeks
Beginning direct3d gameprogramming07_lightsandmaterials_20161117_jintaeksBeginning direct3d gameprogramming07_lightsandmaterials_20161117_jintaeks
Beginning direct3d gameprogramming07_lightsandmaterials_20161117_jintaeks
 
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeksBeginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
 
Beginning direct3d gameprogramming05_thebasics_20160421_jintaeks
Beginning direct3d gameprogramming05_thebasics_20160421_jintaeksBeginning direct3d gameprogramming05_thebasics_20160421_jintaeks
Beginning direct3d gameprogramming05_thebasics_20160421_jintaeks
 
Beginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeks
Beginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeksBeginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeks
Beginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeks
 
Beginning direct3d gameprogramming02_overviewofhalandcom_20160408_jintaeks
Beginning direct3d gameprogramming02_overviewofhalandcom_20160408_jintaeksBeginning direct3d gameprogramming02_overviewofhalandcom_20160408_jintaeks
Beginning direct3d gameprogramming02_overviewofhalandcom_20160408_jintaeks
 
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
 
Beginning direct3d gameprogramming01_20161102_jintaeks
Beginning direct3d gameprogramming01_20161102_jintaeksBeginning direct3d gameprogramming01_20161102_jintaeks
Beginning direct3d gameprogramming01_20161102_jintaeks
 
Beginning direct3d gameprogramming03_programmingconventions_20160414_jintaeks
Beginning direct3d gameprogramming03_programmingconventions_20160414_jintaeksBeginning direct3d gameprogramming03_programmingconventions_20160414_jintaeks
Beginning direct3d gameprogramming03_programmingconventions_20160414_jintaeks
 
Beginning direct3d gameprogrammingmath04_calculus_20160324_jintaeks
Beginning direct3d gameprogrammingmath04_calculus_20160324_jintaeksBeginning direct3d gameprogrammingmath04_calculus_20160324_jintaeks
Beginning direct3d gameprogrammingmath04_calculus_20160324_jintaeks
 
Beginning direct3d gameprogrammingcpp02_20160324_jintaeks
Beginning direct3d gameprogrammingcpp02_20160324_jintaeksBeginning direct3d gameprogrammingcpp02_20160324_jintaeks
Beginning direct3d gameprogrammingcpp02_20160324_jintaeks
 
Boost pp 20091102_서진택
Boost pp 20091102_서진택Boost pp 20091102_서진택
Boost pp 20091102_서진택
 

Recently uploaded

Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
An introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxAn introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxPurva Nikam
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 

Recently uploaded (20)

Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
An introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxAn introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptx
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 

Beginning direct3d gameprogrammingmath01_primer_20160324_jintaeks

  • 1. Beginning Direct3D Game Programming: Mathematics Primer jintaeks@gmail.com Division of Digital Contents, DongSeo University. March 2016
  • 2. 2D Rotation Goal: We want to get the rotated point of (x,y) about theta(θ), (x',y'). 2 Assumption: We just know the four fundamental rules of arithmetic.
  • 3. Domain and codomain  In mathematics, the codomain or target set of a function is the set Y into which all of the output of the function is constrained to fall. It is the set Y in the notation y=f(x).  A function f from X to Y. The large blue oval is Y which is the codomain of f . The smaller oval inside Y is the image of f 3
  • 4. Exponentiation  Exponentiation is a mathematical operation, written as bn, involving two numbers, the base b and the exponent n.  When n is a positive integer, exponentiation corresponds to repeated multiplication of the base: that is, bn is the product of multiplying n bases: 4
  • 5. Factorial  In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. 5
  • 6. Square Root  In mathematics, a square root of a number a is a number y such that y2 = a, in other words, a number y whose square(the result of multiplying the number by itself, or y × y) is a.  For example, 4 and −4 are square roots of 16 because 42 = (−4)2 = 16. 6 16 = 4 2
  • 7. Cubic Root  A Root is a general notation for all degrees.  In case of square root, we can omit superscript 2. 7 27 = 3 3 16 = 4 2
  • 8. Inverse function  In mathematics, an inverse function is a function that "reverses" another function. That is, if f is a function mapping x to y, then the inverse function of f maps y back to x. 8
  • 9. 9
  • 10. Pythagoras' theorem  In mathematics, the Pythagorean theorem, also known as Pythagoras' theorem, is a fundamental relation in Euclidean geometry among the three sides of a right triangle. a2+b2=c2 10
  • 12. a2+b2=c2  If the length of both a and b are known, then c can be calculated as: 12
  • 13. Summation Notation: Sigma(∑)  In mathematics, summation (symbol: ∑) is the addition of a sequence of numbers; the result is their sum or total. 13
  • 14. 14
  • 15. Practice  Write a function that calculate below equation. 15
  • 16. Cartesian coordinate system  A Cartesian coordinate system is a coordinate system that specifies each point uniquely in a plane by a pair of numerical coordinates, which are the signed distances to the point from two fixed perpendicular directed lines, measured in the same unit of length. 16 • The invention of Cartesian coordinates in the 17th century by René Descartes (Latinized name: Cartesius) revolutionized mathematics.
  • 17. Cartesian coordinate system  Each reference line is called a coordinate axis or just axis of the system, and the point where they meet is its origin, usually at ordered pair (0, 0).  The coordinates can also be defined as the positions of the perpendicular projections of the point onto the two axes, expressed as signed distances from the origin. 17
  • 18.  Illustration of a Cartesian coordinate plane. Four points are marked and labeled with their coordinates: (2,3) in green, (−3,1) in red, (−1.5,−2.5) in blue, and the origin (0,0) in purple. 18  Cartesian coordinate system with a circle of radius 2 centered at the origin marked in red. The equation of a circle is (x− a)2 + (y − b)2 = r2 where a and b are the coordinates of the center (a, b) and r is the radius.
  • 19. Three dimensions  Choosing a Cartesian coordinate system for a three-dimensional space means choosing an ordered triplet of lines (axes) that are pair-wise perpendicular, have a single unit of length for all three axes and have an orientation for each axis. 19
  • 20. Notations and conventions  The Cartesian coordinates of a point are usually written in parentheses and separated by commas, as in (10, 5) or(3, 5, 7).  The origin is often labelled with the capital letter O.  In analytic geometry, unknown or generic coordinates are often denoted by the letters (x, y) in the plane, and (x, y, z) in three-dimensional space. 20
  • 21. Quadrants  The axes of a two-dimensional Cartesian system divide the plane into four infinite regions, called quadrants, each bounded by two half-axes.  These are often numbered from 1st to 4th and denoted by Roman numerals: I (where the signs of the two coordinates are +,+), II (−,+), III (−,−), and IV (+,−). 21
  • 22. Cartesian formulae for the plane: distance  The Euclidean distance between two points of the plane with Cartesian coordinates (x1,y1) and (x2,y2) is like below:  In three-dimensional space, the distance between points (x1,y1,z1) and (x2,y2,z2) is 22
  • 23. Translation and Rotation  Translating a set of points of the plane, preserving the distances and directions between them, is equivalent to adding a fixed pair of numbers (a, b) to the Cartesian coordinates of every point in the set.  To rotate a figure counterclockwise around the origin by some angle is equivalent to replacing every point with coordinates (x,y) by the point with coordinates (x',y'), where 23
  • 24. Affine Transformation  Another way to represent coordinate transformations in Cartesian coordinates is through affine transformations.  In affine transformations an extra dimension is added and all points are given a value of 1 for this extra dimension.  The advantage of doing this is that point translations can be specified in the final column of matrix A. In this way, all of the euclidean transformations become transactable as matrix point multiplications.  The affine transformation is given by: 24
  • 25. Orientation and handedness  Once the x- and y-axes are specified, they determine the line along which the z-axis should lie, but there are two possible directions on this line.  The two possible coordinate systems which result are called 'right-handed' and 'left-handed'. 25 • The left-handed orientation is shown on the left, and the right-handed on the right.
  • 26. 26  The right-handed Cartesian coordinate system indicating the coordinate planes. • Unity 3D game engine uses LHS.
  • 27. Write a program that draws f(x)=x2 void OnDraw( HDC hdc ) { SelectObject( hdc, GetStockObject( DC_PEN ) ); SetDCPenColor( hdc, RGB( 255, 0, 0 ) ); MoveToEx( hdc, 0, 0, NULL ); LineTo( hdc, 100, 50 ); } 27  Use Win32 Gdi application on Windows7.  We assume origin is located at (200,200) in the screen coordinates.  Draw the x-axis with a red line.  Draw the y-axis with a blue line.  20 pixel corresponds to 1 unit(real number).
  • 28. 28
  • 29. Pi(π)  The number π is a mathematical constant, the ratio of a circle's circumference to its diameter, commonly approximated as 3.14159.  It has been represented by the Greek letter "π" since the mid- 18th century, though it is also sometimes spelled out as "pi" (/paɪ/). 29
  • 30.  π is commonly defined as the ratio of a circle's circumference C to its diameter d: 30
  • 31. Radian  The radian is the standard unit of angular measure, used in many areas of mathematics. An angle's measurement in radians is numerically equal to the length of a corresponding arc of a unit circle; one radian is just under 57.3 degrees. 31
  • 32. Computing Pi  Monte Carlo methods, which evaluate the results of multiple random trials, can be used to create approximations of π.  Draw a circle inscribed in a square, and randomly place dots in the square. The ratio of dots inside the circle to the total number of dots will approximately equal π/4. 32
  • 33. Practice  Write a program that approximately calculate the Pi. 33
  • 34. Trigonometric functions  In mathematics, the trigonometric functions (also called the circular functions) are functions of an angle.  They relate the angles of a triangle to the lengths of its sides. 34
  • 35. Tangent line, secant line and chord 35
  • 36. 36 Do you know the difference between angle, degree and radian?
  • 37. 37
  • 38. 38
  • 39. 39
  • 40. 40
  • 41. 41
  • 43. How to implement trigonometric functions?  Taylor polynomial 43
  • 44.  The sine function (blue) is closely approximated by its Taylor polynomial of degree 7 (pink) for a full cycle centered on the origin. 44
  • 45. Practice  Write a my own Sine function. Use Taylor series formula.  Use for-loop to implement Taylor series and tune proper iteration count. 45
  • 46. sum and difference formula 46
  • 47. proof: Let's watch the video. 47
  • 48. Inverse of trigonometric functions 48
  • 49. 2D Rotation: Do you remember the first question? 49
  • 50. Practice  Write a function gets a rotated position of (x,y) about theta. 50
  • 51. References  https://en.wikipedia.org/wiki/Pythagorean_theorem  https://en.wikipedia.org/wiki/Trigonometric_functions  https://www.youtube.com/watch?v=zcEMKv5yIYs – The derivation of the Sum Identities for Cosine. 51