Vous êtes sur la page 1sur 10

Graphics

Mathematics for
Computer Graphics

cgvr.korea.ac.kr

Graphics Lab @ Korea University

Contents

Complex Numbers

CGVR

Pure imaginary number


Complex conjugate
Representation with polar coordinates

Quaternions

Definition
Addition, scalar multiplication, multiplication, division,
and inverse
3D Rotations

Nonparametric Representations
Parametric Representations
cgvr.korea.ac.kr

Graphics Lab @ Korea University

Complex Numbers

CGVR

Real Part + Imaginary Part:

z x, y
x Re z ,

y Imz

Addition and Subtraction

Scalar Multiplication

Multiplication

z x iy

imaginary
axis

x1 , y1 x2 , y2 x1 x2 , y1 y2

real axis

k x1 , y1 kx1 , ky1

x1 , y1 x2 , y2 x1 x2 y1 y2 , x1 y2 x2 y1

cgvr.korea.ac.kr

Graphics Lab @ Korea University

Pure Imaginary Number &


Complex Conjugate

Imaginary Unit: i 0, 1

i 2 0, 10, 1 1, 0
i 1
Complex Conjugate

z x iy

CGVR

z x iy

Modulus or absolute value

z zz x 2 y 2

Division
z1 z1 z2 x1 , y1 x2 , y2 x1 x2 y1 y2 x2 y1 x1 y2

2
,
2
2
2
2
2
z2 z2 z2
x2 y2
x2 y2
x2 y2

cgvr.korea.ac.kr

Graphics Lab @ Korea University

Representation with Polar


Coordinates

z r cos i sin
Eulers Formula
ei cos i sin
z re i

CGVR

imaginary
axis

z=(x, y)

real axis

Complex Multiplication and Division


z1 r1 i 1 2
i 1 2
z1 z 2 r1r2 e
,
e
z 2 r2
nth Roots
2k
2k
n
n
z r cos

cgvr.korea.ac.kr

i sin

, k 0, 1, 2, , n 1

Graphics Lab @ Korea University

Quaternions

CGVR

One Real Part + Three Imaginary Part

q s ia jb kc
Properties: i 2 j 2 k 2 1
ij ji k

jk kj i
ki ik j

Addition and Scalar Multiplication

q1 q2 s1 s2 ia1 a2 j b1 b2 k c1 c2
dq1 s1d ia1d jb1d kc1d

cgvr.korea.ac.kr

Graphics Lab @ Korea University

Ordered-Pair Notation

CGVR

Scalar s + Vector v = (a, b, c)

q s, v
Addition: q1 q2 s1 s2 , v1 v 2

Multiplication

Magnitude

q1q2 s1s2 v1 v 2 , s1 v 2 s2 v1 v1 v 2

q s vv

Inverse

q
cgvr.korea.ac.kr

s, v

qq 1 q 1q 1, 0
Graphics Lab @ Korea University

3D Rotation

CGVR

For a 3D Point (, , )
A unit quaternion q w, x, y, z its conjugate
q w, x, y, z

q 0, , , q 0, , ,
Rotating (, , ) by angle 2 about the axis
parallel to (a, b, c)

For q cos , sin a, b, c


Rq is a 3D Rotation about (a, b, c) by 2

Rq p q p q
cgvr.korea.ac.kr

Graphics Lab @ Korea University

Nonparametric Representations

Definition

Useful in describing objects

Disadvantages

Object descriptions directly in terms of the


coordinates of the reference frame
Ex. implicit expression: f x, y, z 0
Ex. explicit Expression: z f x, y

Advantages

CGVR

Change the independent variable as derivatives

Implicit vs. Explicit Equations


x2 y 2 r 2 , y r 2 x2

cgvr.korea.ac.kr

Graphics Lab @ Korea University

Parametric Representations

3D Curves with Parameter u

CGVR

Pu xu , yu , z u
Ex. xu r cos2u yu r sin 2u z u 0 0 u 1

3D Surfaces with Parameter u, v

Pu, v xu, v , yu, v , z u, v

Ex. xu, v r sin u cos2v

y u, v r sin u sin 2v
z u, v r cosu
0 u, v 1

cgvr.korea.ac.kr

Graphics Lab @ Korea University

Vous aimerez peut-être aussi