Game Development Reference

In-Depth Information

1

i

−

1

.

x

=

r

−

L r

i

i

ik

k

L

ii

k

=

1

The solution to a linear system

Ux

=

r
, where
U
is an
nn

×

upper triangular ma-

trix, can be found by backward substitution:

1

n

.

x

=

r

−

Ur

i

i

ik

k

U

ii

ki

=+

1

A matrix
M
can be decomposed into the product
LU
, where
L
is lower triangular

and
U
is upper triangular, using Doolittle's method. The linear system

Mxr

=

then becomes

L Ux r
, which can be solved in two stages by first using for-

ward substitution to solve

(

)
=

Lyr
and then backward substitution to solve

=

Ux

=

y
.

Eigenvalues and Eigenvectors

The eigenvalues and eigenvectors of a 3

symmetric matrix
M
can be numeri-

cally calculated by applying the Jacobi method to diagonalize
M
. When
M
is

transformed by one of the rotation matrices

×

3

()

pq

given by Equation (16.39), the

R

new entries of
M
are given by

′
=

M

M

ii

ii

′

M

=

cM

−

sM

if

i

≠

p

and

i

≠

q

;

ip pi

,

ip

iq

MsMcM

′

=

+

iq qi

,

ip

iq

′

M

=−

MtM

pp

pp

pq

′

M

=+

MtM

qq

qq

pq

′

M

=

0,

pq qp

,

where
t

=

sc

.

Ordinary Differential Equations

The first-order ordinary differential equation

()

(

)

′

xf

=

xy

,

can be approximat-

y

ed using Euler's method as follows.

(

)

y

=+

y f

xy

,

i

1

i

i

i

+

The improved Euler's method, also known as Heun's method, uses the step

formula

Search Nedrilad ::

Custom Search