You are on page 1of 10

Graphics

Mathematics for
Computer Graphics

고려대학교 컴퓨터 그래픽스 연구실

cgvr.korea.ac.kr Graphics Lab @ Korea University


Contents
CGVR

 Complex Numbers
 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  iy


z   x, y 
imaginar
y axis

x  Re z  , y  Im z  y z

 Addition and Subtraction real axis


x
 x1 , y1    x2 , y2    x1  x2 , y1  y2 
 Scalar Multiplication
k  x1 , y1    kx1 , ky1 
 Multiplication
 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 CGVR

 Imaginary Unit: i   0, 1
i 2   0, 1 0, 1    1, 0
i  1
 Complex Conjugate
z  x  iy z  x  iy
 Modulus or absolute value
z  zz  x 2  y 2
 Division
z1 z1 z 2  x1 , y1  x2 ,  y2   x1 x2  y1 y2 x2 y1  x1 y2 
    2 , 
z2 z2 z2 x2  y 2
2 2
 x2  y 2
2
x2  y 2 
2 2

cgvr.korea.ac.kr Graphics Lab @ Korea University


Representation with Polar
Coordinates CGVR

 z  r  cos   i sin   imaginar


y axis
 Euler’s Formula z=(x, y)
r
e i  cos   i sin  θ
z  re i real axis
 Complex Multiplication and Division
i  1  2  z1 r1 i  1  2 
z1 z 2  r1r2 e ,  e
z 2 r2
 nth Roots
    2k     2k 
n
z  r cos
n
  i sin  , k  0, 1, 2, , n  1
  n   n 
cgvr.korea.ac.kr 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   i  a1  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
q1q2   s1s2  v1  v 2 , s1 v 2  s2 v1  v1  v 2 
 Magnitude
2
q  s  vv
2

 Inverse 1
1
q  2
 s, v  qq  q q  1, 0 
1 1

q
cgvr.korea.ac.kr 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 parall
el 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
CGVR

 Definition
 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
 Useful in describing objects
 Disadvantages
 Change the independent variable as derivatives
 Implicit vs. Explicit Equations
x2  y2  r 2 , y   r 2  x2
cgvr.korea.ac.kr Graphics Lab @ Korea University
Parametric Representations
CGVR

 3D Curves with Parameter u


P  u    x u  , y  u  , z  u  
 Ex. x u   r cos 2u  y  u   r sin 2u  z  u   0 0  u  1

 3D Surfaces with Parameter u, v


P u , v    x u , v  , y  u , v  , z  u , v  
 Ex. x u , v   r sin  u  cos 2v 
y  u , v   r sin  u  sin  2v 
z  u , v   r cos u 
0  u, v  1

cgvr.korea.ac.kr Graphics Lab @ Korea University

You might also like