Mathematics (from Greek μάθημα máthēma, “knowledge, study, learning”) is the study of topics such as quantity (numbers), structure, space, and change. There is a range of views among mathematicians and philosophers as to the exact scope and definition of mathematics
Classification with mixtures of curved Mahalanobis metricsFrank Nielsen
Presentation at ICIP 2016.
Slide 4, there is a typo, replace absolute value by parenthesis. The cross-ratio can be negative and we use the principal complex logarithm
Computational Information Geometry: A quick review (ICMS)Frank Nielsen
From the workshop
Computational information geometry for image and signal processing
Sep 21, 2015 - Sep 25, 2015
ICMS, 15 South College Street, Edinburgh
http://www.icms.org.uk/workshop.php?id=343
Classification with mixtures of curved Mahalanobis metricsFrank Nielsen
Presentation at ICIP 2016.
Slide 4, there is a typo, replace absolute value by parenthesis. The cross-ratio can be negative and we use the principal complex logarithm
Computational Information Geometry: A quick review (ICMS)Frank Nielsen
From the workshop
Computational information geometry for image and signal processing
Sep 21, 2015 - Sep 25, 2015
ICMS, 15 South College Street, Edinburgh
http://www.icms.org.uk/workshop.php?id=343
http://www.juanitamcdowell.com | This represents a portion of the Millennial Marketing and Social Media presentation created for a non-profit organization.
Mathematics (from Greek μάθημα máthēma, “knowledge, study, learning”) is the study of topics such as quantity (numbers), structure, space, and change. There is a range of views among mathematicians and philosophers as to the exact scope and definition of mathematics
Mathematics (from Greek μάθημα máthēma, “knowledge, study, learning”) is the study of topics such as quantity (numbers), structure, space, and change. There is a range of views among mathematicians and philosophers as to the exact scope and definition of mathematics
Mathematics (from Greek μάθημα máthēma, “knowledge, study, learning”) is the study of topics such as quantity (numbers), structure, space, and change. There is a range of views among mathematicians and philosophers as to the exact scope and definition of mathematics
This presentation is about electromagnetic fields, history of this theory and personalities contributing to this theory. Applications of electromagnetism. Vector Analysis and coordinate systems.
This first lecture describes what EMT is. Its history of evolution. Main personalities how discovered theories relating to this theory. Applications of EMT . Scalars and vectors and there algebra. Coordinate systems. Field, Coulombs law and electric field intensity.volume charge distribution, electric flux density, gauss's law and divergence
➽=ALL False flag-War Machine-War profiteering-Energy (oil/Gas) Iraq, Iran,…oil and gas
USA invades other countries just to own their natural resources and to place them in the hands of American corporations. Facebook doesn’t call that terrorism. They call it democracy. BBC, CNN, FOX NEWS, FR 24, ITV/CH 4, SKY, EURO NEWS, ITV trash Sun paper,… Facebook all are protector and preserver of the propaganda classifying IR Iran as a dangerous terrorist organization. But FB, BBC, CNN, FOX NEWS, FR 24, ITV/CH 4-SKY, EURO NEWS, ITV do know well, that USA is the biggest terrorist country in the world.
‘terrorism’ the unlawful use of violence and intimidation, especially against civilians, in the pursuit of political aims.
"the fight against terrorism" is the fight against the unlawful use of violence and intimidation and carpet bombing.
Ever since the beginning of the 19th century, the West has been sucking on the jugular vein of the Moslem body politic like a veritable vampire whose thirst for Moslem blood is never sated and who refused to let go. Since 1979, Iran, which has always played the role of the intellectual leader of the Islamic world, has risen up to put a stop to this outrage against God’s law and will, and against all decency.
MY NEWS PUNCH DR F DEJAHANG 28/12/2019
PART 1 (IN TOTAL 12 PARTS)
NEWS YOU WON’T FIND ON BBC-CNN-FOX NEWS, FR 24, EURO NEWS, ITV…
ALL In My Documents: https://www.edocr.com/user/drdejahang02
Also in https://www.edocr.com/v/jqmplrpj/drdejahang02/LINKS-08-12-2019-PROJECT-ONE Click on Social Websites of mine >60
Articles for Political Science, Mathematics and Productivity the Student Room BSc, MSc & PhD Project Mangers etc
PPTs in SLIDESHARE International Studies Research Degrees (MPhilPhD) ➽➜R⇢➤=RESEARCH ➽=ALL
PPTs https://www.slideshare.net/DrFereidounDejahang/16-fd-my-news-punch-rev-16122019
MY NEWS PUNCH 16-12-2019
NEWS YOU WON’T FIND ON BBC-CNN-FOX NEWS, FRNACE 24, EURO NEWS
Articles for Political Science, Mathematics and Productivity the Student Room BSc, MSc & PhD Project Mangers etc
PPTs in SLIDESHARE International Studies Research Degrees (MPhilPhD)
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
2. MatricesMatrices
VectorsVectors
Fixed-point Real NumbersFixed-point Real Numbers
Triangle MathematicsTriangle Mathematics
Intersection IssuesIntersection Issues
Euler AnglesEuler Angles
Angular DisplacementAngular Displacement
QuaternionQuaternion
Differential Equation BasicsDifferential Equation Basics
2
Essential Mathematics for Game DevelopmentEssential Mathematics for Game Development
3. Matrix basicsMatrix basics
– DefinitionDefinition
– TransposeTranspose
– AdditionAddition
3
MatricesMatrices
A = (aij) =
a11 .. a1n
. .
. .
am1 .. amn
C = A T
cij = aji
C = A + B cij = aij + bij
4. – Scalar-matrix multiplicationScalar-matrix multiplication
– Matrix-matrix multiplicationMatrix-matrix multiplication
4
C = αA cij = αaij
C = A B cij = Σaikbkj
k = 1
r
cij = row x column
5. Transformations inTransformations in MatrixMatrix formform
– A point or a vector is a row matrix (de facto convention)A point or a vector is a row matrix (de facto convention)
5
V = [x y z]
– Using matrix notation, a pointUsing matrix notation, a point VV is transformed underis transformed under
translation, scaling and rotation as :translation, scaling and rotation as :
V’ = V + D
V’ = VS
V’ = VR
where D is a translation vector and
S and R are scaling and rotation matrices
6. 6
– To make translation be a linear transformation, weTo make translation be a linear transformation, we
introduce theintroduce the homogeneous coordinate systemhomogeneous coordinate system
V (x, y, z, w)
where w is always 1
– Translation TransformationTranslation Transformation
x’ = x + Tx
y’ = y + Ty
z’ = z + Tz
V’ = VT
[x’
y’
z’
1] = [x y z 1]
= [x y z 1] T
1 0 0 0
0 1 0 0
0 0 1 0
Tx Ty Tz 1
7. 7
– Scaling TransformationScaling Transformation
x’ = xSx
y’ = ySy
z’ = zSz
V’ = VS
[x’
y’
z’
1] = [x y z 1]
= [x y z 1] S
Sx 0 0 0
0 Sy 0 0
0 0 Sz 0
0 0 0 1
Here Sx, Sy and Sz are scaling factors.
9. 9
– Net Transformation matrixNet Transformation matrix
– Matrix multiplication areMatrix multiplication are not commutativenot commutative
[x’
y’
z’
1] = [x y z 1] M1
and
[x” y” z” 1] = [x’ y’ z’ 1] M2
then the transformation matrices can be concatenated
M3 = M1 M2
and
[x” y” z” 1] = [x y z 1] M3
M1 M2 = M2 M1
10. A vector is an entity that possessesA vector is an entity that possesses magnitudemagnitude
andand directiondirection..
A 3D vector is a triple :A 3D vector is a triple :
– VV = (v= (v11, v, v22, v, v33)), where each component, where each component vvii is a scalar.is a scalar.
A ray (directed line segment), that possessesA ray (directed line segment), that possesses
positionposition,, magnitudemagnitude andand directiondirection..
10
VectorsVectors
(x1,y1,z1)
(x2,y2,z2)
V = (x2-x1, y2-y1, z2-z1)
11. Addition of vectorsAddition of vectors
Length of vectorsLength of vectors
11
X = V + W
= (x1, y1, z1)
= (v1 + w1, v2 + w2, v3 + w3)
V
W
V + W
V
W
V + W
|V| = (v1
2
+ v2
2
+ v3
2
)1/2
U = V / |V|
12. Cross product of vectorsCross product of vectors
– DefinitionDefinition
– ApplicationApplication
» A normal vector to a polygon is calculated from 3 (non-collinear)A normal vector to a polygon is calculated from 3 (non-collinear)
vertices of the polygon.vertices of the polygon.
12
X = V X W
= (v2w3-v3w2)i + (v3w1-v1w3)j + (v1w2-v2w1)k
where i, j and k are standard unit vectors :
i = (1, 0, 0), j = (0, 1, 0), k = (0, 0, 1)
Np
V2
V1
polygon defined by 4 points
Np = V1 X V2
13. »Normal vector transformationNormal vector transformation
13
N(X) = detJ J-1T
N(x)
where X = F(x)
J the Jacobian matrix, Ji(x) =
δF(x)
δxi
"Global and Local Deformations of Solid Primitives"
Alan H. Barr
Computer Graphics Volume 18, Number 3 July 1984
14. Normal vector transformation:Normal vector transformation:
ExampleExample
Given plan: S = S(x, 0, z), x in [0, 1], z in [0, 1]
Transform the plane to the curved surface of a half cylinder:
x’ = r – r cos (x/r)
y’ = r sin (x /r)
z’ = z
where r is the radius of the cylinder and r = 1/π. 14
15. Dot product of vectorsDot product of vectors
– DefinitionDefinition
– ApplicationApplication
15
|X| = V . W
= v1w1 + v2w2 + v3w3
θ
V
W
cosθ =
V . W
|V||W|
16. Fixed Point Arithmetics : N bits (signed) IntegerFixed Point Arithmetics : N bits (signed) Integer
– Example : N = 16 gives range –32768Example : N = 16 gives range –32768 ≤≤ aaii ≤≤ 3276732767
– We can use fixed scale to get the decimalsWe can use fixed scale to get the decimals
16
Fixed Point Arithmetics (1/2)Fixed Point Arithmetics (1/2)
a = ai / 28
1 1 1
8 integer bits
8 fractional bits
ai = 315, a = 1.2305
17. Multiplication then Requires RescalingMultiplication then Requires Rescaling
Addition just Like NormalAddition just Like Normal
17
Fixed Point Arithmetics (2/2)Fixed Point Arithmetics (2/2)
e = a.
c = ai / 28 .
ci / 28
⇒ ei = (ai
.
ci) / 28
e = a+c = ai / 28
+ ci / 28
⇒ ei = ai + ci
18. Compression for Floating-point Real NumbersCompression for Floating-point Real Numbers
– 4 bytes reduced to 2 bytes4 bytes reduced to 2 bytes
– Lost some accuracy but affordableLost some accuracy but affordable
– Network data transferNetwork data transfer
Software 3D RenderingSoftware 3D Rendering
18
Fixed Point Arithmetics - ApplicationFixed Point Arithmetics - Application
19. 19
h
ha
hb
hc
Aa
Ac
Ab
h = ha + hb + hc
where A = Aa + Ab + Ac
If (Aa < 0 || Ab < 0 || Ac < 0) then
the point is outside the triangle
“Triangular Coordinates”
Aa Ab Ac
A A A
p
(xa,ya,za)
(xb,yb,zb)
(xc,yc,zc)
Triangular CoordinatesTriangular Coordinates
20. 20
Area of a triangle in 2D
xa ya
A = ½ xb yb
xc yc
xa ya
= ½ (xa*yb + xb*yc + xc*ya – xb*ya – xc*yb – xa*yc)
Triangle Area – 2DTriangle Area – 2D
(xa,ya,za)
(xb,yb,zb)
(xc,yc,zc)
21. 21
Area of a triangle in 3D
Triangle Area – 3DTriangle Area – 3D
(x0,y0,z0)
(x1,y1,z1)
(x2,y2,z2)
u
v
u = p1 – p0
v = p2 – p0
area = ½ |u x v |
How to use triangular coordinates to determine the
location of a point? Area is always positive!
p1
p0
p2
22. Terrain FollowingTerrain Following
Hit TestHit Test
Ray CastRay Cast
Collision DetectionCollision Detection
22
Triangular Coordinate System - ApplicationTriangular Coordinate System - Application
23. Ray CastRay Cast
Containment TestContainment Test
23
IntersectionIntersection
24. 24
Ray Cast – The RayRay Cast – The Ray
x = x0 + (x1 – x0) t
y = y0 + (y1 – y0) t, t = 0,
z = z0 + (z1 – z0) t
{
Shoot a ray to calculate the intersection betweenShoot a ray to calculate the intersection between
the ray and modelsthe ray and models
Use a parametric equation to represent a rayUse a parametric equation to represent a ray
8
The ray emits from (xThe ray emits from (x00,y,y00,z,z00))
Only the tOnly the t ≥≥ 0 is the answer candidate0 is the answer candidate
The smallest positive t is the answerThe smallest positive t is the answer
25. 25
Ray Cast – The PlaneRay Cast – The Plane
Each triangle in the Models has its plane equationEach triangle in the Models has its plane equation
UseUse ax + by + cz + d = 0ax + by + cz + d = 0 as the plane equationas the plane equation
(a, b, c)(a, b, c) is the plane normal vectoris the plane normal vector
|d||d| is the distance of the plane to originis the distance of the plane to origin
Substitute the ray equation into the planeSubstitute the ray equation into the plane
equationequation
Solve theSolve the tt to Find the Intersectto Find the Intersect
Check whether or not the intersect point insiderCheck whether or not the intersect point insider
the trianglethe triangle
26. 26
Intersection = 1, inside
Intersection = 2, outside
Intersection = 0, outside
Trick : Parametric equation for a ray which is parallel to the x-axis
x = x0 + t
y = y0 , t = 0,
{
8
(x0, y0)
2D Containment Test2D Containment Test
“if the No. of intersection is odd, the point is inside,
otherwise, it is outside”
27. 27
3D Containment Test3D Containment Test
“if the No. of intersection is odd, the point is inside,
otherwise, is outside”
Same as the 2D containment testSame as the 2D containment test
28. Rotation vs OrientationRotation vs Orientation
28
Orientation: relative to a referenceOrientation: relative to a reference
alignmentalignment
Rotation:Rotation:
change object from one orientation tochange object from one orientation to
anotheranother
Represent an orientation as a rotationRepresent an orientation as a rotation
from the reference alignmentfrom the reference alignment
29. 29
A rotation is described as a sequence of rotationsA rotation is described as a sequence of rotations
about three mutually orthogonal coordinates axesabout three mutually orthogonal coordinates axes
fixed in space (e.g.fixed in space (e.g. world coordinate systemworld coordinate system))
– X-roll, Y-roll, Z-rollX-roll, Y-roll, Z-roll
There are 6 possible ways to define a rotationThere are 6 possible ways to define a rotation
– 3!3!
R(θ1, θ2, θ3) represents an x-roll, followed by y-roll, followed by z-roll
R(θ1, θ2, θ3) = c2c3 c2s3 -s2 0
s1s2c3-c1s3 s1s2s3+c1c3 s1c2 0
c1s2c3+s1s3 c1s2s3-s1c3 c1c2 0
0 0 0 1
where si = sinθi and ci = cosθi
Euler AnglesEuler Angles
Left hand system
30. 30
Interpolation happening on each angleInterpolation happening on each angle
Multiple routes for interpolationMultiple routes for interpolation
More keys for constraintsMore keys for constraints
Can lead to gimbal lockCan lead to gimbal lock
z
x
y
R
z
x
y
R
Euler Angles & InterpolationEuler Angles & Interpolation
31. 31
RR((θθ,, nn),), nn is the rotation axisis the rotation axis
n
r Rr
θ
n
r
rv
rh
V
θ
rv
V
Rrv
rh = (n.
r)n
rv = r - (n.
r)n , rotate into position Rrv
V = nxrv = nxr
Rrv = (cosθ)rv + (sinθ)V
->
Rr = Rrh + Rrv
= rh + (cosθ)rv + (sinθ)V
= (n.
r)n + (cosθ) (r - (n.
r)n) + (sinθ) nxr
= (cosθ)r + (1-cosθ) n (n.
r) + (sinθ) nxr
Angular DisplacementAngular Displacement
32. 32
Sir William Hamilton (1843)Sir William Hamilton (1843)
From Complex numbers (a +From Complex numbers (a + iib),b), ii 22
= -1= -1
16,October, 1843,16,October, 1843, Broome BridgeBroome Bridge inin DublinDublin
11 realreal + 3+ 3 imaginaryimaginary = 1= 1 quaternionquaternion
qq = a + b= a + bii + c+ cjj + d+ dkk
ii22
== jj22
== kk22
= -1= -1
ijij == kk && jiji = -= -kk, cyclic permutation, cyclic permutation ii--jj--kk--ii
qq = (= (ss,, vv), where (), where (ss,, vv) =) = ss ++ vvxxii ++ vvyyjj ++ vvzzkk
QuaternionQuaternion
33. 33
q1 = (s1, v1) and q2 = (s2, v2)
q3 = q1q2 = (s1s2 - v1
.
v2 , s1v2 + s2v1 + v1xv2)
Conjugate of q = (s, v), q = (s, -v)
qq = s2
+ |v|2
= |q|2
A unit quaternion q = (s, v), where qq = 1
A pure quaternion p = (0, v)
Noncommutative
Quaternion AlgebraQuaternion Algebra
34. 34
Take a pure quaternion p = (0, r)
and a unit quaternion q = (s, v) where qq = 1
and define Rq(p) = qpq-1
where q-1
= q for a unit quaternion
Rq(p) = (0, (s2
- v.
v)r + 2v(v.
r) + 2svxr)
Let q = (cosθ, sinθ n), |n| = 1
Rq(p) = (0, (cos2
θ - sin2
θ)r + 2sin2
θ n(n.
r) + 2cosθsinθ nxr)
= (0, cos2θr + (1 - cos2θ)n(n.
r) + sin2θ nxr)
Conclusion :
The act of rotating a vector r by an angular displacement (θ, n)
is the same as taking this displacement, ‘lifting’ it into
quaternion space, by using a unit quaternion (cos(θ/2),
sin(θ/2)n)
Quaternion VS Angular DisplacementQuaternion VS Angular Displacement
36. 36
M0 M1 M2 0
M3 M4 M5 0
M6 M7 M8 0
0 0 0 1
float tr, s;
tr = m[0] + m[4] + m[8];
if (tr > 0.0f) {
s = (float) sqrt(tr + 1.0f);
q->w = s/2.0f;
s = 0.5f/s;
q->x = (m[7] - m[5])*s;
q->y = (m[2] - m[6])*s;
q->z = (m[3] - m[1])*s;
}
else {
float qq[4];
int i, j, k;
int nxt[3] = {1, 2, 0};
i = 0;
if (m[4] > m[0]) i = 1;
if (m[8] > m[i*3+i]) i = 2;
j = nxt[i]; k = nxt[j];
s = (float) sqrt((m[i*3+i] - (m[j*3+j] + m[k*3+k])) + 1.0f);
qq[i] = s*0.5f;
if (s != 0.0f) s = 0.5f/s;
qq[3] = (m[j+k*3] - m[k+j*3])*s;
qq[j] = (m[i+j*3] + m[j+i*3])*s;
qq[k] = (m[i+k*3] + m[k+i*3])*s;
q->w = qq[3];
q->x = qq[0];
q->y = qq[1];
q->z = qq[2];
}
Conversion: Matrix to QuaternionConversion: Matrix to Quaternion
http://en.wikipedia.org/wiki/Conversi
on_between_quaternions_and_Euler_a
ngles
37. 37
Spherical linear interpolation,Spherical linear interpolation, slerpslerp
A
B
P
φ
t
slerp(q1, q2, t) = q1 + q2
sin((1 - t)φ)
sinφ sinφ
sin(tφ)
Quaternion InterpolationQuaternion Interpolation
39. 39
An ODEAn ODE
Vector fieldVector field
SolutionsSolutions
– Symbolic solutionSymbolic solution
– Numerical solutionNumerical solution
x = f (x, t)
where f is a known function
x is the state of the system, x is the x’s time derivative
x & x are vectors
x(t0) = x0, initial condition
.
Start here Follow the vectors …
Initial Value ProblemsInitial Value Problems
.
.
40. 40
A numerical solutionA numerical solution
– A simplification fromA simplification from Tayler seriesTayler series
Discrete time steps starting with initial valueDiscrete time steps starting with initial value
Simple but not accurateSimple but not accurate
– Bigger steps, bigger errorsBigger steps, bigger errors
– Step error: OStep error: O((h22
)) errorserrors
– Total error: O(h)Total error: O(h)
Can be unstableCan be unstable
Not efficientNot efficient
x(t + h) = x(t) + h f(x, t)
Euler’s MethodEuler’s Method
41. 41
Concept : x(t0 + h) = x(t0) + h x(t0) + h2
/2 x(t0) + O(h3
)
Result : x(t0 + h) = x(t0) + h[ f (x0 + h/2 f(x0 , t0), t0 +h/2) ]
Method : a. Compute an Euler step
∆x = h f(x0 , t0)
b. Evaluate f at the midpoint
fmid = f ( x0+∆x/2, t0 +h/2 )
c. Take a step using the midpoint
x( t+ h) = x(t) + h fmid
. ..
a
b
c
Error term
The Midpoint MethodThe Midpoint Method
42. 42
Midpoint =Midpoint = Runge-KuttaRunge-Kutta method of order 2method of order 2
Runge-KuttaRunge-Kutta method of order 4method of order 4
– Step error: OStep error: O(h(h55
))
– Total error: O(hTotal error: O(h44
))
k1 = h f(x0, t0)
k2 = h f(x0 + k1/2, t0 + h/2)
k3 = h f(x0 + k2/2, t0 + h/2)
k4 = h f(x0 + k3, t0 + h)
x(t0+h) = x0 + 1/6 k1 + 1/3 k2 + 1/3 k3 + 1/6 k4
TheThe Runge-KuttaRunge-Kutta MethodMethod
43. DynamicsDynamics
– Particle systemParticle system
Game FX SystemGame FX System
43
Initial Value Problems - ApplicationInitial Value Problems - Application
http://upload.wikimedia.org/wikipedia/en/4/44/Strand_Emitter.jpg