SlideShare uma empresa Scribd logo
1 de 47
Baixar para ler offline
Vectors & Geometric
                 Transformations
                            Chen Jing-Fung (2006/11/17)
                             Assistant Research Fellow,
                                Digital Media Center,
                          National Taiwan Normal University



                                       Video Processing Lab
                                             臺灣師範大學數位媒體中心視訊處理研究室

                                           National Taiwan Normal University
Ch5: Computer Graphics with OpenGL 3th, Hearn Baker
3D Graphics
• Goal
  – Using mathematical method produce 2D images
    which is described 3D
• Problems
  – Modeling (environment)
     • Construct a scene
     • Hierarchical description of a complex object (several
       parts composed) -> simpler parts
  – Rendering
     • Described how objects move around in an animation
       sequence?
     • Simply to view objects from another angle


                               Video Processing Lab            2
                                  臺灣師範大學數位媒體中心視訊處理研究室
Coordinate Systems
• Coordinate systems are fundamental
  in computer graphics
  – Describe the locations of points in space
• Project from one coordinate system
  to another
  – Easier to understand and implement



                        Video Processing Lab    3
                           臺灣師範大學數位媒體中心視訊處理研究室
One coordinate system
• Scalars (α), Point (P) & Vector (V)
         y
                   P2: (x2, y2)
  V2=[x2, y2]                 vx   vy               y
                 V=P2-P1=[x2- x1, y2-y1]=[vxy]
                 P1: (x1, y1)                           b
                                                                a+b
             V1=[x1, y1]          x
                                                        a             x
         Scalars (α)

                            α V=[αvij]            Where is a-b & ab ??



                                         Video Processing Lab             4
                                            臺灣師範大學數位媒體中心視訊處理研究室
Two vectors in one
     coordinate system
• Scalar product or dot product                        V2

  – V1.V2=|V1| |V2| cos Θ                                           V1
     • Commutative V1.V2= V2.V1                  Θ

     • Associative V1.(V2+V3)= V1.V2+V1.V3
• Vector product or cross product                           V1xV2
                                                                    V2
  – V1xV2=u|V1| |V2| sin Θ                                     Θ
     • Anti-commutative V1xV2= -V2xV1                  u: unit vector V
                                                                       1
     • No associative V1x(V2xV3) ≠ (V1xV2)xV3
     • Associative V1x(V2+V3)= (V1xV2)+(V1xV3)
                    u x u y uz
          V1  V2  v1x v1y v1z
                    v 2 x v 2y v 2z
                                Video Processing Lab                5
                                   臺灣師範大學數位媒體中心視訊處理研究室
Two coordinate systems
• The point is represented by two different
  coordinate systems
      y
                                  v
                                      (u, v)


                                               u
           (4, 6)

                    x
  – Maybe only one coordinate system can
    represent the point by the easier way



                          Video Processing Lab     6
                             臺灣師範大學數位媒體中心視訊處理研究室
Transformations (1)

• Transformation functions between
  two Coordinate systems (rendering)
 y                                          v
                                                (u, v)
                   u=x-3
                   v=y-4
                                                         u
      (4, 6)       x=u+3
                   y=v+4
               x




                           Video Processing Lab              7
                              臺灣師範大學數位媒體中心視訊處理研究室
Transformations (2)

• In the same coordinate system to
  modify an object’s shape
 y                                      y
                    x’=x-2
                    y’=y-3
       (4, 6)
                                              (2, 3)
                    x=x’+2
                    y=y’+3
                x                                      x




                             Video Processing Lab          8
                                臺灣師範大學數位媒體中心視訊處理研究室
2D affine
      transformations
• Affine transformation
  – Linear projected function x                
                                                       x
    x '  axx x  axy y  t x                linear
                                     xy     x      x  y
    y '  ayx x  ayy y  t y                y 


            x '  axx     axy   x  t x 
      or    y '   a             t 
                            ayy   y   y 
              yx


                            Video Processing Lab            9
                                臺灣師範大學數位媒體中心視訊處理研究室
Composition of affine
      transforms
• Simple transformations
  –   Translation
  –   Scaling
  –   Rotation
  –   Shear
  –   Reflection



                    Video Processing Lab   10
                       臺灣師範大學數位媒體中心視訊處理研究室
2D Translation
• Translation equation P'  P  T                        y                  P’3

                    x '   1 0   x  t x 
     y

                    y '   0 1  y   t                    ty
                                 y                                  x
               x                                             tx


  – Translation is a rigid-body transformation that
    moves objects without deformation.
  – Delete the original polygon
     • To cover the background color (& save it in different
       array)



                                  Video Processing Lab                 11
                                     臺灣師範大學數位媒體中心視訊處理研究室
2D Scaling
• Scaling equation P'  S  P
   y
           x '  s x   0   x  0        y

           y '   0          
                         sy   y  0 
                                                     syy
                                                              x
           x
                                            sxx


  – Uniform scaling: sx=sy                     sx>1, sy< 1

  – Differential scaling: sx≠sy



                             Video Processing Lab                 12
                                臺灣師範大學數位媒體中心視訊處理研究室
2D Rotation (1)

• Single point rotation
  – Pivot-point = origin
       x '  r cos(   ), y '  r sin(   )
          (x’,y’)
               x  r cos( ), y  r sin( )
      r      (x,y)
           
                             x '  cos * x  sin * y
                             y '  sin * x  cos * y



                                        Video Processing Lab   13
                                            臺灣師範大學數位媒體中心視訊處理研究室
2D Rotation (2)
• Rotation equation P  R( )  P '

            x '  cos        sin   x  0
            y '   sin               y   0 
                               cos     
                                                          




  – Now, graphics packages all follow the standard
    column-vector convention
     • OpenGL, Java, Matlab …
  – Trans. and rotations are rigid-body transformations
    that move object without deformation
     • Each point on object is rotation through the same angle
     • Must be defined the direction of the rotated angle
      Rotation point is also called pivot point
                                      Video Processing Lab       14
                                         臺灣師範大學數位媒體中心視訊處理研究室
Y-axis Shear

• Shear along y axis (what is x-axis
  shear?)
           x '  1      0   x  0 
           y '   sh       
                                              y
      y
             y         1  y  0 

                                                   x
                 x




                            Video Processing Lab   15
                               臺灣師範大學數位媒體中心視訊處理研究室
Y axis Reflection

            x '   1 0   x  0 
            y '   0 1  y   0
                                            y
     y
                          

                                                   x
                x




• What is the reflection of x-axis?


                            Video Processing Lab       16
                               臺灣師範大學數位媒體中心視訊處理研究室
Basic transformations
• General form: P'  M2  P  M1
  – Translation (shift): M1=identity matrix
  – Rotation or scaling: M2=translation term (R(Θ))
    or scaling fixed pixel (S(s*))
• The efficient approach
  – To produce a sequence of transformations with
    these equation
     • Scale -> rotate(Θ) -> translate (linear)
     • The final coordinate positions are obtained directly
       from initial coordinates


                               Video Processing Lab           17
                                  臺灣師範大學數位媒體中心視訊處理研究室
Homogeneous coordinate
• General transformation equations:
  – x’ = axx + axy + tx               x '  axx   axy    tx   x 
                                      y '   a          ty   y 
    y’ = ayx + ayy + ty        2D       yx       ayy         
                                     1  0
                                                  0     1   1
                                                                
• A standard technique is used to expand
  the matrix 2D (x,y) -> 3D(x,y,z) h*x
  – Homogenous coordinates: (xh, yh, h)
  – Homogenous parameter: h     h*y
     • ‘h’ means the number of points in z-axis
         – Simply to set h=1




                                    Video Processing Lab                 18
                                       臺灣師範大學數位媒體中心視訊處理研究室
Basic Matrix3x3
• Translation matrix                        1 0 tx 
 P'  P  T(t* )  P'  T(t* )  P          0 1 t 
                                                 y
                                            0 0 1 
                                                   
• Scaling matrix
                                          s x    0       0
             P'  S(s* )  P              0      sy      0
                                                          
                                          0
                                                 0       1
                                                           
• Rotation matrix
                                       cos      sin    0
           P'  R( )  P               sin    cos      0
                                                           
                                        0
                                                  0       1
                                                            

                                     Video Processing Lab       19
                                        臺灣師範大學數位媒體中心視訊處理研究室
Arbitrary point’s
        rotation (1)
• Single point rotation
  – Pivot-point (xr,yr) ! = original point
                                                                1. translate
• How to find solution                                       u  x  xr
  – !! Coordinate transformation                             v  y  yr
         2. rotate
            u '  r cos(   ),v '  r sin(   )          u '  x ' x r
               (u’,v’)
                    u  r cos( ),v  r sin( )              v '  y ' y r
          r       (u,v)
                  
                             x '  xr  ( x  xr )cos  ( y  y r )sin
        (xr,yr)
                             y '  y r  ( x  xr )sin  ( y  y r )cos

                                      Video Processing Lab                20
                                          臺灣師範大學數位媒體中心視訊處理研究室
Arbitrary point’s
        rotation (2)

• General 2D point rotation (or scaling)
  – (xr, yr) & (xr, yr) ≠Origin
     • Translate origin coordinate -> the point
       position         T( xr , y r )
     • Rotate (or scaling) the object about the
       coordinate origin R( ) or S(sx , sy )
     • Translate the point returned to its original
       position T( xr , y r )



                           Video Processing Lab       21
                              臺灣師範大學數位媒體中心視訊處理研究室
Pivot-point rotation
           composite matrix
                                 T( xr , y r )

                                                             R( )      T( xr , y r )

  T( xc , yc )  R( )  T( xc , yc )  R( xc , y c , )
 1 0 X c  cos  sin 0   1 0 X c 
0 1 Y    sin cos 0   0 1 Y  x '  xr  ( x  xr )cos  ( y  y r )sin
      c                              c  y '  y  ( x  x )sin  ( y  y )cos 
                                                     r         r               r
0 0 1   0
                  0    1 0 0 0 
                                          
              cos  sin xc (1  cos )  y c sin 
              sin cos y c (1  cos )  xc sin 
                                                      
               0
                      0              1                
                                                       
                                                 Video Processing Lab              22
                                                    臺灣師範大學數位媒體中心視訊處理研究室
Scaling an Object not at
       the Origin
• What case happens?
  – Apply the scaling transformation to an
    object not at the origin?
• Based on the rotating about a point
  composition, what should you do to
  resize an object about its own center?

      T( xc , yc )  S(sx , sy )  T(xc , y c )  S( xc , y c , sx , sy )

                                       Video Processing Lab                   23
                                           臺灣師範大學數位媒體中心視訊處理研究室
Back to Rotation About a Pt
 • R (rotation matrix) and p (Pivot-point)
   describe how to rotate
    – Translation Origin to the position:
                            x  x  p
    – Rotation:
                  x  Rx  R(x  p)  Rx  Rp
    – Translate back:
                        x  x  p  Rx  Rp  p
 • The composite transformation involves the
   rotation matrix.
             T( xnc , y nc )  R( )  T( xnc , y nc )
                              Video Processing Lab         24
                                 臺灣師範大學數位媒體中心視訊處理研究室
Matrix concatenation
       properties
• What is matrix concatenation?
      M3  M2  M1  (M3  M2 )  M1  M3  (M2  M1 )
  – Multiplication of matrices is associative
    • Premultiplying (left-to-right) = ??
      Postmultiplying (right-to-left)
  – Transformation products not be
    commutative M2  M1  M1  M2




                                  Video Processing Lab   25
                                     臺灣師範大學數位媒體中心視訊處理研究室
3D transformations

• Homogeneous coordinates  x '         a d      g tx   x 
                                  y ' b e       h ty  y 
  – 4x4 matrices                                     
                                  z '  c f      u tz  z 
                                                       
                                  1  0 0        0 1   1

• Specification of translation, rotation,
  scaling and other matrices in OpenGL
  – glTranslate(), glRotate(), glScale(),
    glMultMatrix()



                            Video Processing Lab              26
                               臺灣師範大學數位媒體中心視訊處理研究室
3D translation & scaling

• 3D Translation      x ' 1     0   0 tx   x 
                      y '  0    1   0 ty  y 
                                         
                      z '  0    0   1 tz  z 
                                           
                      1  0      0   0 1   1

• 3D Scaling
                    x '  s x   0    0    0  x 
                    y '  0     sy   0    0  y 
                                          
                   z '   0     0    sz   0 z 
                                            
                   1 0         0    0    1  1 



                          Video Processing Lab         27
                             臺灣師範大學數位媒體中心視訊處理研究室
3D z-Axis Rotation

• 2D extend along z-axis                                    y axis

      – (2D->3D)     X '  cos
                     ' 
                                      sin   0 X 
                     Y    sin   cos     0  Y 
                                                 
                     Z'   0                1  Z 
                                    0         

P  R z ( )  P
  '                                                                          x axis
                                                            z axis

            X '  cos     sin   0 0 X             counterclockwise
            ' 
            Y    sin   cos     0 0 Y 
                                         
           Z'   0          0      1 0 Z 
                                       
           1   0
                            0      0 1 1 

            y-axis & x-axis?
                                       Video Processing Lab                   28
                                           臺灣師範大學數位媒體中心視訊處理研究室
3D Rotation of arbitraryy axis
       y
                                           y                   Step 2
                              Step 1                P’2
                      P2
                                                                           P’1
                                          P’1                   P”2
                 P1                                                                x
                                                           x        z
                    x                 z                         P’2 rotate onto z-axis
   z Initial position
             y              P1 translate to the Origin
                                                                      y
   Step 3                      Step 4 y                         Step 5                P2
                      P’1                            P’2
      P”2                                                                        P1
                         x                P’1
           z                                                                      x
                                                                  z
           Rotation the Object                  x               Translate the rotation
                                z
           around z-axis   Rotate the axis to its               axis to its Original
                           Original Orientation                 position
                      R( )  T  R  T 1
             R  R 1( )  R 1(  )  R z ( )  R y (  )  R x ( )
                   x          y
                                                Video Processing Lab                       29
                                                   臺灣師範大學數位媒體中心視訊處理研究室
Problems with Rotation
        Matrices
• Specifying a rotation really only requires 3
  numbers in three Cartesian coordinates
  – 2 numbers to show a unit vector
  – Third number to show the rotation angle
• Rotation matrix has a large amount of
  redundancy
  – Orthonormal constraints reduce degrees of
    freedom back down to 3
  – Keeping a matrix orthonormal is difficult when
    transformations are combined



                           Video Processing Lab      30
                              臺灣師範大學數位媒體中心視訊處理研究室
Alternative
         Representations
• Specify the axis and the angle (OpenGL method)
   – Hard to compose multiple rotations
• Specify the axis, scaled by the angle
   – Only 3 numbers, but hard to compose
• Euler angles:
   – First, how much to rotate about X
   – Second, how much to rotate about Y
   – Final, how much to rotate about Z
      • Hard to think about, and hard to compose
• Quaternions


                                  Video Processing Lab   31
                                     臺灣師範大學數位媒體中心視訊處理研究室
Quaternions

• 4-vector related to axis and angle,
  unit magnitude
  – Rotation about axis (x,y,z) by angles θ:
                 x '  cos      sin   0   0  x 
                 y '   sin    cos     0   0  y 
                                             
                z '   0           0     1   0 z 
                                               
                1   0             0     0   1 1 

    • Easy to compose
    • Easy to find rotation matrix


                                 Video Processing Lab     32
                                    臺灣師範大學數位媒體中心視訊處理研究室
Transformation in
           OpenGL
• Transformation pipeline & matrices
  –   Current Transformation Matrix (CTM)
  –   CTM operations
  –   CTM in OpenGL
  –   OpenGL matrices




                        Video Processing Lab   33
                           臺灣師範大學數位媒體中心視訊處理研究室
Transformation pipeline &
          matrices
            object                eye

                                              Projection
                     Modelview                  Matrix
   vertex
                      matrix


                     modelview                projection
                     modelview


• OpenGL matrices have three types
  – Model-View (GL_MODEL_VIEW)
  – Projection (GL_PROJECTION)
  – Texture (GL_TEXTURE) (ignore for now)


                             Video Processing Lab          34
                                 臺灣師範大學數位媒體中心視訊處理研究室
Current Transformation
      Matrix (CTM)
• CTM is a 4x4 homogeneous
  coordinate matrix
   – It can be altered by a set of function
   – It is defined in the user program
   – and loaded into a transformation unit
                      C Current matrix

            P                            P’=CP
 vertices            CTM                          vertices




                           Video Processing Lab              35
                              臺灣師範大學數位媒體中心視訊處理研究室
CTM operations                         P
                                             Current matrix
                                                    C
                                                        P’=CP
                                               CTM
                                  vertices              vertices
• CTM can be altered by loading new matrix
  or by postmultiply matrix
  – Load form
                                  glLoadIdentity();
     • identity matrix: C←I
                                 T: glTranslatef(dx, dy, dz);
     • an arbitrary matrix: C←M
                                 R: glRotatef(angle, vx, vy, vz);
     • translation matrix: C←T … S: glScalef(sx, sy, sz);
  – Postmultiply form             glMultMatrixf( );
     • an arbitrary matrix: C←CM
                                                User input matrix
     • a translation matrix: C←CT
     • a rotation matrix: C←CR …


                                Video Processing Lab                36
                                   臺灣師範大學數位媒體中心視訊處理研究室
Example by point rotation
  • Rotation with an arbitrary point
          – Order of transformations in OpenGL
            (one step = one function call)
Initial     •   Loading an identity matrix: C←I
            •   Translation Origin to the position: C← CT
            •   Rotation: C← CR
            •   Translate back: C← CT-1
          – Result: C= TRT-1


                                    Video Processing Lab    37
                                       臺灣師範大學數位媒體中心視訊處理研究室
CTM in OpenGL
• In OpenGL, CTM has the model-view
  matrix and the projection matrix
                             CTM

                 Modelview         Projection
  vertices                                                vertices
                  matrix             matrix

      Geometric transformations       glMatrixMode routine

  – Manipulate those matrices by concatenation
    and start from first setting matrix


                                   Video Processing Lab              38
                                      臺灣師範大學數位媒體中心視訊處理研究室
OpenGL matrices (1)

• Current matrix
        glMatrixMode (GL_MODELVIEW|GL_PROJECTION)
• Arbitrary matrix
  – Load 16-elements array           glLoadMatrix* (elems);
     • A suffix code: f or d
     • The elements must be specified in column order
        – First list 4-elements in first-column
        – …
        – Finally the fourth column
  – Stack & store the Matrix
                   glPushMatrix ();
                   glPopMatrix ();
                                 Video Processing Lab         39
                                      臺灣師範大學數位媒體中心視訊處理研究室
OpenGL matrices (2)
• Multiple by two arbitrary matrices
  C<-M2M1
           glLoadIdentity();
           glMultMatrixf(elemsM2);
           glMultMatrixf(elemsM1);

• Access matrices by query functions
         glGetIntegerv
         glGetFloatv
         glGetBooleanv
         glGetdoublev
         glIsEnabled…
                               Video Processing Lab   40
                                  臺灣師範大學數位媒體中心視訊處理研究室
Summery

• Rotation related with axis and the origin
  – Use the same trick as in 2D:
     • Translate origin to the position
     • Rotate
     • translate back again
• Rotation is not commutative
  – Rotation order matters
  – Experiment to convince by yourself



                                Video Processing Lab   41
                                   臺灣師範大學數位媒體中心視訊處理研究室
Transformation trick

• Rotation and Translation are the
 rigid-body transformations
  – Do not change lengths, sizes or angles,
    so a body does not deform
• Scale, shear… extend naturally
  transformation from 2D to 3D



                        Video Processing Lab   42
                           臺灣師範大學數位媒體中心視訊處理研究室
Triangle’s rotation at
       arbitrary point
• vertices tri = {{50.0, 25.0}, {150.0, 40.0}, {100.0,
  100.0}}; //set object’s vertices
• Centpt; //find center point to describe the
  triangle
• glLoadIdentity();
• glTranslatef(); //translate the center point
• glRotatef(angle, vx,vy,vz); //rotate the center
  point, axis=(vx,vy,vz), angle: user define
• glTranslatef(); //translate return



                              Video Processing Lab       43
                                 臺灣師範大學數位媒體中心視訊處理研究室
Middle project

• Make some visual components by yourself
  – more than three object’s from HW1 & HW2
     • Practice each one composition (rotation, scaling,
       translate, shear and reflection)
        – Note: original & new
     • Practice combining two or three compositions
• Team work (2~3)




                                 Video Processing Lab      44
                                    臺灣師範大學數位媒體中心視訊處理研究室
Reference
• http://www.cs.wisc.edu/~schenney/
• http://graphics.csie.ntu.edu.tw/~robi
  n/courses/3dcg06/
• http://www.cse.psu.edu/~cg418/
• http://groups.csail.mit.edu/graphics/
  classes/6.837


                     Video Processing Lab   45
                        臺灣師範大學數位媒體中心視訊處理研究室
Inverse matrix
• Identify matrix (Inxn)                           1 0 0
                      I                 I3 x 3    0 1 0 
  – MM-1=I,                                              
                   1
                  M 
                      M                             0 0 1
                                                         
  – Inverse matrix (M-1 )
             1 0 tx                   1 0 t x 
         T  0 1 t y 
                              T 1  0 1 t y 
                                                 
             0 0 1 
                                     0 0 1 
                                                 
         cos     sin   0           cos       sin   0
     R   sin
                 cos     0
                               R 1    sin
                                                   cos   0   RT
                                                             
          0
                   0      1
                                       0
                                                     0    1


                                 Video Processing Lab                 46
                                     臺灣師範大學數位媒體中心視訊處理研究室
2D Reflection
 Reflection line y=0       Reflection line x=0       Reflection line y=-x
  y                               y                           y



                       x                         x                          x



• Transformation matrix
    1 0 0                   1 0 0                    0 1 0 
    0 1 0                  0 1 0                     1 0 0 
                                                             
     0 0 1
                            0 0 1                     0 0 1
                                                               


                                        Video Processing Lab                47
                                           臺灣師範大學數位媒體中心視訊處理研究室

Mais conteúdo relacionado

Mais procurados

Numerical Linear Algebra for Data and Link Analysis.
Numerical Linear Algebra for Data and Link Analysis.Numerical Linear Algebra for Data and Link Analysis.
Numerical Linear Algebra for Data and Link Analysis.Leonid Zhukov
 
Modern features-part-1-detectors
Modern features-part-1-detectorsModern features-part-1-detectors
Modern features-part-1-detectorszukun
 
Datamining 7th kmeans
Datamining 7th kmeansDatamining 7th kmeans
Datamining 7th kmeanssesejun
 
MLIP - Chapter 6 - Generation, Super-Resolution, Style transfer
MLIP - Chapter 6 - Generation, Super-Resolution, Style transferMLIP - Chapter 6 - Generation, Super-Resolution, Style transfer
MLIP - Chapter 6 - Generation, Super-Resolution, Style transferCharles Deledalle
 
Visual Object Tracking: Action-Decision Networks (ADNets)
Visual Object Tracking: Action-Decision Networks (ADNets)Visual Object Tracking: Action-Decision Networks (ADNets)
Visual Object Tracking: Action-Decision Networks (ADNets)Yehya Abouelnaga
 
C O N T R O L S Y S T E M S J N T U M O D E L P A P E R{Www
C O N T R O L  S Y S T E M S  J N T U  M O D E L  P A P E R{WwwC O N T R O L  S Y S T E M S  J N T U  M O D E L  P A P E R{Www
C O N T R O L S Y S T E M S J N T U M O D E L P A P E R{Wwwguest3f9c6b
 
MLIP - Chapter 5 - Detection, Segmentation, Captioning
MLIP - Chapter 5 - Detection, Segmentation, CaptioningMLIP - Chapter 5 - Detection, Segmentation, Captioning
MLIP - Chapter 5 - Detection, Segmentation, CaptioningCharles Deledalle
 
Condition Monitoring Of Unsteadily Operating Equipment
Condition Monitoring Of Unsteadily Operating EquipmentCondition Monitoring Of Unsteadily Operating Equipment
Condition Monitoring Of Unsteadily Operating EquipmentJordan McBain
 
Kccsi 2012 a real-time robust object tracking-v2
Kccsi 2012   a real-time robust object tracking-v2Kccsi 2012   a real-time robust object tracking-v2
Kccsi 2012 a real-time robust object tracking-v2Prarinya Siritanawan
 
Generative Adversarial Networks 2
Generative Adversarial Networks 2Generative Adversarial Networks 2
Generative Adversarial Networks 2Alireza Shafaei
 
MLIP - Chapter 3 - Introduction to deep learning
MLIP - Chapter 3 - Introduction to deep learningMLIP - Chapter 3 - Introduction to deep learning
MLIP - Chapter 3 - Introduction to deep learningCharles Deledalle
 
Note on Coupled Line Cameras for Rectangle Reconstruction (ACDDE 2012)
Note on Coupled Line Cameras for Rectangle Reconstruction (ACDDE 2012)Note on Coupled Line Cameras for Rectangle Reconstruction (ACDDE 2012)
Note on Coupled Line Cameras for Rectangle Reconstruction (ACDDE 2012)Joo-Haeng Lee
 
Pathway Discovery in Cancer: the Bayesian Approach
Pathway Discovery in Cancer: the Bayesian ApproachPathway Discovery in Cancer: the Bayesian Approach
Pathway Discovery in Cancer: the Bayesian ApproachFrancesco Gadaleta
 
Estimating Human Pose from Occluded Images (ACCV 2009)
Estimating Human Pose from Occluded Images (ACCV 2009)Estimating Human Pose from Occluded Images (ACCV 2009)
Estimating Human Pose from Occluded Images (ACCV 2009)Jia-Bin Huang
 
MLIP - Chapter 2 - Preliminaries to deep learning
MLIP - Chapter 2 - Preliminaries to deep learningMLIP - Chapter 2 - Preliminaries to deep learning
MLIP - Chapter 2 - Preliminaries to deep learningCharles Deledalle
 
1Sem-Basic Electronics Notes-Unit8-Digital Logic
1Sem-Basic Electronics Notes-Unit8-Digital Logic1Sem-Basic Electronics Notes-Unit8-Digital Logic
1Sem-Basic Electronics Notes-Unit8-Digital LogicDr. Shivananda Koteshwar
 
1시간만에 GAN(Generative Adversarial Network) 완전 정복하기
1시간만에 GAN(Generative Adversarial Network) 완전 정복하기1시간만에 GAN(Generative Adversarial Network) 완전 정복하기
1시간만에 GAN(Generative Adversarial Network) 완전 정복하기NAVER Engineering
 

Mais procurados (19)

Numerical Linear Algebra for Data and Link Analysis.
Numerical Linear Algebra for Data and Link Analysis.Numerical Linear Algebra for Data and Link Analysis.
Numerical Linear Algebra for Data and Link Analysis.
 
Modern features-part-1-detectors
Modern features-part-1-detectorsModern features-part-1-detectors
Modern features-part-1-detectors
 
Datamining 7th kmeans
Datamining 7th kmeansDatamining 7th kmeans
Datamining 7th kmeans
 
MLIP - Chapter 6 - Generation, Super-Resolution, Style transfer
MLIP - Chapter 6 - Generation, Super-Resolution, Style transferMLIP - Chapter 6 - Generation, Super-Resolution, Style transfer
MLIP - Chapter 6 - Generation, Super-Resolution, Style transfer
 
Visual Object Tracking: Action-Decision Networks (ADNets)
Visual Object Tracking: Action-Decision Networks (ADNets)Visual Object Tracking: Action-Decision Networks (ADNets)
Visual Object Tracking: Action-Decision Networks (ADNets)
 
C O N T R O L S Y S T E M S J N T U M O D E L P A P E R{Www
C O N T R O L  S Y S T E M S  J N T U  M O D E L  P A P E R{WwwC O N T R O L  S Y S T E M S  J N T U  M O D E L  P A P E R{Www
C O N T R O L S Y S T E M S J N T U M O D E L P A P E R{Www
 
MLIP - Chapter 5 - Detection, Segmentation, Captioning
MLIP - Chapter 5 - Detection, Segmentation, CaptioningMLIP - Chapter 5 - Detection, Segmentation, Captioning
MLIP - Chapter 5 - Detection, Segmentation, Captioning
 
Condition Monitoring Of Unsteadily Operating Equipment
Condition Monitoring Of Unsteadily Operating EquipmentCondition Monitoring Of Unsteadily Operating Equipment
Condition Monitoring Of Unsteadily Operating Equipment
 
Kccsi 2012 a real-time robust object tracking-v2
Kccsi 2012   a real-time robust object tracking-v2Kccsi 2012   a real-time robust object tracking-v2
Kccsi 2012 a real-time robust object tracking-v2
 
Spatio-temporal reasoning for traffic scene understanding
Spatio-temporal reasoning for traffic scene understandingSpatio-temporal reasoning for traffic scene understanding
Spatio-temporal reasoning for traffic scene understanding
 
Generative Adversarial Networks 2
Generative Adversarial Networks 2Generative Adversarial Networks 2
Generative Adversarial Networks 2
 
MLIP - Chapter 3 - Introduction to deep learning
MLIP - Chapter 3 - Introduction to deep learningMLIP - Chapter 3 - Introduction to deep learning
MLIP - Chapter 3 - Introduction to deep learning
 
Note on Coupled Line Cameras for Rectangle Reconstruction (ACDDE 2012)
Note on Coupled Line Cameras for Rectangle Reconstruction (ACDDE 2012)Note on Coupled Line Cameras for Rectangle Reconstruction (ACDDE 2012)
Note on Coupled Line Cameras for Rectangle Reconstruction (ACDDE 2012)
 
Chapter 1 - Introduction
Chapter 1 - IntroductionChapter 1 - Introduction
Chapter 1 - Introduction
 
Pathway Discovery in Cancer: the Bayesian Approach
Pathway Discovery in Cancer: the Bayesian ApproachPathway Discovery in Cancer: the Bayesian Approach
Pathway Discovery in Cancer: the Bayesian Approach
 
Estimating Human Pose from Occluded Images (ACCV 2009)
Estimating Human Pose from Occluded Images (ACCV 2009)Estimating Human Pose from Occluded Images (ACCV 2009)
Estimating Human Pose from Occluded Images (ACCV 2009)
 
MLIP - Chapter 2 - Preliminaries to deep learning
MLIP - Chapter 2 - Preliminaries to deep learningMLIP - Chapter 2 - Preliminaries to deep learning
MLIP - Chapter 2 - Preliminaries to deep learning
 
1Sem-Basic Electronics Notes-Unit8-Digital Logic
1Sem-Basic Electronics Notes-Unit8-Digital Logic1Sem-Basic Electronics Notes-Unit8-Digital Logic
1Sem-Basic Electronics Notes-Unit8-Digital Logic
 
1시간만에 GAN(Generative Adversarial Network) 완전 정복하기
1시간만에 GAN(Generative Adversarial Network) 완전 정복하기1시간만에 GAN(Generative Adversarial Network) 완전 정복하기
1시간만에 GAN(Generative Adversarial Network) 완전 정복하기
 

Destaque

Hearn and Baker 2 D transformations
Hearn and Baker 2 D transformations   Hearn and Baker 2 D transformations
Hearn and Baker 2 D transformations Taher Barodawala
 
Factor analysis
Factor analysisFactor analysis
Factor analysisDhruv Goel
 
Tutorials--Transformations
Tutorials--TransformationsTutorials--Transformations
Tutorials--TransformationsMedia4math
 
Simd programming introduction
Simd programming introductionSimd programming introduction
Simd programming introductionChamp Yen
 
Geometric objects and transformations
Geometric objects and transformationsGeometric objects and transformations
Geometric objects and transformationssaad siddiqui
 
Matrix 2 d
Matrix 2 dMatrix 2 d
Matrix 2 dxyz120
 
Supot37255412160
Supot37255412160Supot37255412160
Supot37255412160Ajay Ochani
 
Do you know matrix transformations
Do you know matrix transformationsDo you know matrix transformations
Do you know matrix transformationsTarun Gehlot
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transformPatel Punit
 
AP Physics - Chapter 10 Powerpoint
AP Physics - Chapter 10 PowerpointAP Physics - Chapter 10 Powerpoint
AP Physics - Chapter 10 PowerpointMrreynon
 
OpenGL ES 2.x Programming Introduction
OpenGL ES 2.x Programming IntroductionOpenGL ES 2.x Programming Introduction
OpenGL ES 2.x Programming IntroductionChamp Yen
 
AP Physics - Chapter 16 Powerpoint
AP Physics - Chapter 16 PowerpointAP Physics - Chapter 16 Powerpoint
AP Physics - Chapter 16 PowerpointMrreynon
 
2 d transformations by amit kumar (maimt)
2 d transformations by amit kumar (maimt)2 d transformations by amit kumar (maimt)
2 d transformations by amit kumar (maimt)Amit Kapoor
 
AP Physics - Chapter 6 Powerpoint
AP Physics - Chapter 6 PowerpointAP Physics - Chapter 6 Powerpoint
AP Physics - Chapter 6 PowerpointMrreynon
 
3D Geometric Transformations
3D Geometric Transformations3D Geometric Transformations
3D Geometric TransformationsIshan Parekh
 
Physics - Chapter 6 - Momentum and Collisions
Physics - Chapter 6 - Momentum and CollisionsPhysics - Chapter 6 - Momentum and Collisions
Physics - Chapter 6 - Momentum and CollisionsJPoilek
 
Chapter 7 Powerpoint
Chapter 7 PowerpointChapter 7 Powerpoint
Chapter 7 PowerpointMrreynon
 

Destaque (20)

Hearn and Baker 2 D transformations
Hearn and Baker 2 D transformations   Hearn and Baker 2 D transformations
Hearn and Baker 2 D transformations
 
Factor analysis
Factor analysisFactor analysis
Factor analysis
 
Tutorials--Transformations
Tutorials--TransformationsTutorials--Transformations
Tutorials--Transformations
 
Simd programming introduction
Simd programming introductionSimd programming introduction
Simd programming introduction
 
Matrices 2
Matrices 2Matrices 2
Matrices 2
 
Geometric objects and transformations
Geometric objects and transformationsGeometric objects and transformations
Geometric objects and transformations
 
Matrices
MatricesMatrices
Matrices
 
Matrix 2 d
Matrix 2 dMatrix 2 d
Matrix 2 d
 
Supot37255412160
Supot37255412160Supot37255412160
Supot37255412160
 
Do you know matrix transformations
Do you know matrix transformationsDo you know matrix transformations
Do you know matrix transformations
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transform
 
AP Physics - Chapter 10 Powerpoint
AP Physics - Chapter 10 PowerpointAP Physics - Chapter 10 Powerpoint
AP Physics - Chapter 10 Powerpoint
 
OpenGL ES 2.x Programming Introduction
OpenGL ES 2.x Programming IntroductionOpenGL ES 2.x Programming Introduction
OpenGL ES 2.x Programming Introduction
 
Matrices 1
Matrices 1Matrices 1
Matrices 1
 
AP Physics - Chapter 16 Powerpoint
AP Physics - Chapter 16 PowerpointAP Physics - Chapter 16 Powerpoint
AP Physics - Chapter 16 Powerpoint
 
2 d transformations by amit kumar (maimt)
2 d transformations by amit kumar (maimt)2 d transformations by amit kumar (maimt)
2 d transformations by amit kumar (maimt)
 
AP Physics - Chapter 6 Powerpoint
AP Physics - Chapter 6 PowerpointAP Physics - Chapter 6 Powerpoint
AP Physics - Chapter 6 Powerpoint
 
3D Geometric Transformations
3D Geometric Transformations3D Geometric Transformations
3D Geometric Transformations
 
Physics - Chapter 6 - Momentum and Collisions
Physics - Chapter 6 - Momentum and CollisionsPhysics - Chapter 6 - Momentum and Collisions
Physics - Chapter 6 - Momentum and Collisions
 
Chapter 7 Powerpoint
Chapter 7 PowerpointChapter 7 Powerpoint
Chapter 7 Powerpoint
 

Semelhante a CG OpenGL vectors geometric & transformations-course 5

CG OpenGL 3D object representations-course 8
CG OpenGL 3D object representations-course 8CG OpenGL 3D object representations-course 8
CG OpenGL 3D object representations-course 8fungfung Chen
 
CG OpenGL polar curves & input display color-course 4
CG OpenGL polar curves & input display color-course 4CG OpenGL polar curves & input display color-course 4
CG OpenGL polar curves & input display color-course 4fungfung Chen
 
CG OpneGL 2D viewing & simple animation-course 6
CG OpneGL 2D viewing & simple animation-course 6CG OpneGL 2D viewing & simple animation-course 6
CG OpneGL 2D viewing & simple animation-course 6fungfung Chen
 
support-vector-machines.ppt
support-vector-machines.pptsupport-vector-machines.ppt
support-vector-machines.pptshyedshahriar
 
Dual SVM Problem.pdf
Dual SVM Problem.pdfDual SVM Problem.pdf
Dual SVM Problem.pdfssuser8547f2
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learningkkkc
 
Module iii sp
Module iii spModule iii sp
Module iii spVijaya79
 
Deep Learning for Computer Vision (1/4): Image Analytics @ laSalle 2016
Deep Learning for Computer Vision (1/4): Image Analytics @ laSalle 2016Deep Learning for Computer Vision (1/4): Image Analytics @ laSalle 2016
Deep Learning for Computer Vision (1/4): Image Analytics @ laSalle 2016Universitat Politècnica de Catalunya
 
chapter-two ppt for digital image enhancement
chapter-two ppt for digital image enhancementchapter-two ppt for digital image enhancement
chapter-two ppt for digital image enhancementTirusew1
 
Support vector machine
Support vector machineSupport vector machine
Support vector machinePrasenjit Dey
 
Johan Suykens: "Models from Data: a Unifying Picture"
Johan Suykens: "Models from Data: a Unifying Picture" Johan Suykens: "Models from Data: a Unifying Picture"
Johan Suykens: "Models from Data: a Unifying Picture" ieee_cis_cyprus
 
2007 表面瑕疵檢測技術之發展
2007 表面瑕疵檢測技術之發展2007 表面瑕疵檢測技術之發展
2007 表面瑕疵檢測技術之發展CHENHuiMei
 
Distributed Parallel Process Particle Swarm Optimization on Fixed Charge Netw...
Distributed Parallel Process Particle Swarm Optimization on Fixed Charge Netw...Distributed Parallel Process Particle Swarm Optimization on Fixed Charge Netw...
Distributed Parallel Process Particle Swarm Optimization on Fixed Charge Netw...Corey Clark, Ph.D.
 
Computational Linguistics week 5
Computational Linguistics  week 5Computational Linguistics  week 5
Computational Linguistics week 5Mark Chang
 
ppt - Deep Learning From Scratch.pdf
ppt - Deep Learning From Scratch.pdfppt - Deep Learning From Scratch.pdf
ppt - Deep Learning From Scratch.pdfsurefooted
 
Bouguet's MatLab Camera Calibration Toolbox
Bouguet's MatLab Camera Calibration ToolboxBouguet's MatLab Camera Calibration Toolbox
Bouguet's MatLab Camera Calibration ToolboxYuji Oyamada
 
動画像理解のための深層学習アプローチ Deep learning approaches to video understanding
動画像理解のための深層学習アプローチ Deep learning approaches to video understanding動画像理解のための深層学習アプローチ Deep learning approaches to video understanding
動画像理解のための深層学習アプローチ Deep learning approaches to video understandingToru Tamaki
 

Semelhante a CG OpenGL vectors geometric & transformations-course 5 (20)

CG OpenGL 3D object representations-course 8
CG OpenGL 3D object representations-course 8CG OpenGL 3D object representations-course 8
CG OpenGL 3D object representations-course 8
 
CG OpenGL polar curves & input display color-course 4
CG OpenGL polar curves & input display color-course 4CG OpenGL polar curves & input display color-course 4
CG OpenGL polar curves & input display color-course 4
 
CG OpneGL 2D viewing & simple animation-course 6
CG OpneGL 2D viewing & simple animation-course 6CG OpneGL 2D viewing & simple animation-course 6
CG OpneGL 2D viewing & simple animation-course 6
 
support-vector-machines.ppt
support-vector-machines.pptsupport-vector-machines.ppt
support-vector-machines.ppt
 
Dual SVM Problem.pdf
Dual SVM Problem.pdfDual SVM Problem.pdf
Dual SVM Problem.pdf
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
Module iii sp
Module iii spModule iii sp
Module iii sp
 
Deep Learning for Computer Vision (1/4): Image Analytics @ laSalle 2016
Deep Learning for Computer Vision (1/4): Image Analytics @ laSalle 2016Deep Learning for Computer Vision (1/4): Image Analytics @ laSalle 2016
Deep Learning for Computer Vision (1/4): Image Analytics @ laSalle 2016
 
16 17 bag_words
16 17 bag_words16 17 bag_words
16 17 bag_words
 
chapter-two ppt for digital image enhancement
chapter-two ppt for digital image enhancementchapter-two ppt for digital image enhancement
chapter-two ppt for digital image enhancement
 
Support vector machine
Support vector machineSupport vector machine
Support vector machine
 
Johan Suykens: "Models from Data: a Unifying Picture"
Johan Suykens: "Models from Data: a Unifying Picture" Johan Suykens: "Models from Data: a Unifying Picture"
Johan Suykens: "Models from Data: a Unifying Picture"
 
2007 表面瑕疵檢測技術之發展
2007 表面瑕疵檢測技術之發展2007 表面瑕疵檢測技術之發展
2007 表面瑕疵檢測技術之發展
 
Isvc08
Isvc08Isvc08
Isvc08
 
Distributed Parallel Process Particle Swarm Optimization on Fixed Charge Netw...
Distributed Parallel Process Particle Swarm Optimization on Fixed Charge Netw...Distributed Parallel Process Particle Swarm Optimization on Fixed Charge Netw...
Distributed Parallel Process Particle Swarm Optimization on Fixed Charge Netw...
 
Computational Linguistics week 5
Computational Linguistics  week 5Computational Linguistics  week 5
Computational Linguistics week 5
 
ppt - Deep Learning From Scratch.pdf
ppt - Deep Learning From Scratch.pdfppt - Deep Learning From Scratch.pdf
ppt - Deep Learning From Scratch.pdf
 
Bouguet's MatLab Camera Calibration Toolbox
Bouguet's MatLab Camera Calibration ToolboxBouguet's MatLab Camera Calibration Toolbox
Bouguet's MatLab Camera Calibration Toolbox
 
動画像理解のための深層学習アプローチ Deep learning approaches to video understanding
動画像理解のための深層学習アプローチ Deep learning approaches to video understanding動画像理解のための深層学習アプローチ Deep learning approaches to video understanding
動画像理解のための深層学習アプローチ Deep learning approaches to video understanding
 
ECCV WS 2012 (Frank)
ECCV WS 2012 (Frank)ECCV WS 2012 (Frank)
ECCV WS 2012 (Frank)
 

Mais de fungfung Chen

Smart TV content converged service & social media
Smart TV content converged service & social mediaSmart TV content converged service & social media
Smart TV content converged service & social mediafungfung Chen
 
Tips for fulfilling patent application
Tips for fulfilling patent applicationTips for fulfilling patent application
Tips for fulfilling patent applicationfungfung Chen
 
Defending your Rights
Defending your RightsDefending your Rights
Defending your Rightsfungfung Chen
 
Polishing search skills
Polishing search skillsPolishing search skills
Polishing search skillsfungfung Chen
 
Inquiry Based Approach - Patent Search
Inquiry Based Approach - Patent SearchInquiry Based Approach - Patent Search
Inquiry Based Approach - Patent Searchfungfung Chen
 
Overseas protection & patent search
Overseas protection & patent searchOverseas protection & patent search
Overseas protection & patent searchfungfung Chen
 
Patentability classification search
Patentability classification searchPatentability classification search
Patentability classification searchfungfung Chen
 
Novelty to Nonobviousness
Novelty to NonobviousnessNovelty to Nonobviousness
Novelty to Nonobviousnessfungfung Chen
 
Patentability requirement on novelty
Patentability requirement on noveltyPatentability requirement on novelty
Patentability requirement on noveltyfungfung Chen
 
2012 Smart TV - Evolution & Approaches
2012 Smart TV - Evolution & Approaches2012 Smart TV - Evolution & Approaches
2012 Smart TV - Evolution & Approachesfungfung Chen
 
Patentability Requirements
Patentability RequirementsPatentability Requirements
Patentability Requirementsfungfung Chen
 
Working model to patentability
Working model to patentabilityWorking model to patentability
Working model to patentabilityfungfung Chen
 
Evaluate your invention
Evaluate your inventionEvaluate your invention
Evaluate your inventionfungfung Chen
 
how to invention & practice it
how to invention & practice ithow to invention & practice it
how to invention & practice itfungfung Chen
 
Digital converge - DTV service design
Digital converge - DTV service designDigital converge - DTV service design
Digital converge - DTV service designfungfung Chen
 
Hybrid digital broadcasting methods
Hybrid digital broadcasting methodsHybrid digital broadcasting methods
Hybrid digital broadcasting methodsfungfung Chen
 
Summary the challenges of Social TV
Summary the challenges of  Social TVSummary the challenges of  Social TV
Summary the challenges of Social TVfungfung Chen
 
CG OpenGL Shadows + Light + Texture -course 10
CG OpenGL Shadows + Light + Texture -course 10CG OpenGL Shadows + Light + Texture -course 10
CG OpenGL Shadows + Light + Texture -course 10fungfung Chen
 
CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9fungfung Chen
 

Mais de fungfung Chen (20)

Tech biz patent
Tech biz patent Tech biz patent
Tech biz patent
 
Smart TV content converged service & social media
Smart TV content converged service & social mediaSmart TV content converged service & social media
Smart TV content converged service & social media
 
Tips for fulfilling patent application
Tips for fulfilling patent applicationTips for fulfilling patent application
Tips for fulfilling patent application
 
Defending your Rights
Defending your RightsDefending your Rights
Defending your Rights
 
Polishing search skills
Polishing search skillsPolishing search skills
Polishing search skills
 
Inquiry Based Approach - Patent Search
Inquiry Based Approach - Patent SearchInquiry Based Approach - Patent Search
Inquiry Based Approach - Patent Search
 
Overseas protection & patent search
Overseas protection & patent searchOverseas protection & patent search
Overseas protection & patent search
 
Patentability classification search
Patentability classification searchPatentability classification search
Patentability classification search
 
Novelty to Nonobviousness
Novelty to NonobviousnessNovelty to Nonobviousness
Novelty to Nonobviousness
 
Patentability requirement on novelty
Patentability requirement on noveltyPatentability requirement on novelty
Patentability requirement on novelty
 
2012 Smart TV - Evolution & Approaches
2012 Smart TV - Evolution & Approaches2012 Smart TV - Evolution & Approaches
2012 Smart TV - Evolution & Approaches
 
Patentability Requirements
Patentability RequirementsPatentability Requirements
Patentability Requirements
 
Working model to patentability
Working model to patentabilityWorking model to patentability
Working model to patentability
 
Evaluate your invention
Evaluate your inventionEvaluate your invention
Evaluate your invention
 
how to invention & practice it
how to invention & practice ithow to invention & practice it
how to invention & practice it
 
Digital converge - DTV service design
Digital converge - DTV service designDigital converge - DTV service design
Digital converge - DTV service design
 
Hybrid digital broadcasting methods
Hybrid digital broadcasting methodsHybrid digital broadcasting methods
Hybrid digital broadcasting methods
 
Summary the challenges of Social TV
Summary the challenges of  Social TVSummary the challenges of  Social TV
Summary the challenges of Social TV
 
CG OpenGL Shadows + Light + Texture -course 10
CG OpenGL Shadows + Light + Texture -course 10CG OpenGL Shadows + Light + Texture -course 10
CG OpenGL Shadows + Light + Texture -course 10
 
CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9
 

Último

Call Girls Aslali 7397865700 Ridhima Hire Me Full Night
Call Girls Aslali 7397865700 Ridhima Hire Me Full NightCall Girls Aslali 7397865700 Ridhima Hire Me Full Night
Call Girls Aslali 7397865700 Ridhima Hire Me Full Nightssuser7cb4ff
 
Pharmaceutical Packaging for the elderly.pdf
Pharmaceutical Packaging for the elderly.pdfPharmaceutical Packaging for the elderly.pdf
Pharmaceutical Packaging for the elderly.pdfAayushChavan5
 
PORTFOLIO DE ARQUITECTURA CRISTOBAL HERAUD 2024
PORTFOLIO DE ARQUITECTURA CRISTOBAL HERAUD 2024PORTFOLIO DE ARQUITECTURA CRISTOBAL HERAUD 2024
PORTFOLIO DE ARQUITECTURA CRISTOBAL HERAUD 2024CristobalHeraud
 
韩国SKKU学位证,成均馆大学毕业证书1:1制作
韩国SKKU学位证,成均馆大学毕业证书1:1制作韩国SKKU学位证,成均馆大学毕业证书1:1制作
韩国SKKU学位证,成均馆大学毕业证书1:1制作7tz4rjpd
 
(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一
(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一
(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一Fi sss
 
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...Rishabh Aryan
 
Passbook project document_april_21__.pdf
Passbook project document_april_21__.pdfPassbook project document_april_21__.pdf
Passbook project document_april_21__.pdfvaibhavkanaujia
 
Design principles on typography in design
Design principles on typography in designDesign principles on typography in design
Design principles on typography in designnooreen17
 
8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCRdollysharma2066
 
Unveiling the Future: Columbus, Ohio Condominiums Through the Lens of 3D Arch...
Unveiling the Future: Columbus, Ohio Condominiums Through the Lens of 3D Arch...Unveiling the Future: Columbus, Ohio Condominiums Through the Lens of 3D Arch...
Unveiling the Future: Columbus, Ohio Condominiums Through the Lens of 3D Arch...Yantram Animation Studio Corporation
 
1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改
1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改
1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改yuu sss
 
专业一比一美国亚利桑那大学毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国亚利桑那大学毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree专业一比一美国亚利桑那大学毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国亚利桑那大学毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degreeyuu sss
 
办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一
办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一
办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一F dds
 
306MTAMount UCLA University Bachelor's Diploma in Social Media
306MTAMount UCLA University Bachelor's Diploma in Social Media306MTAMount UCLA University Bachelor's Diploma in Social Media
306MTAMount UCLA University Bachelor's Diploma in Social MediaD SSS
 
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree 毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree ttt fff
 
'CASE STUDY OF INDIRA PARYAVARAN BHAVAN DELHI ,
'CASE STUDY OF INDIRA PARYAVARAN BHAVAN DELHI ,'CASE STUDY OF INDIRA PARYAVARAN BHAVAN DELHI ,
'CASE STUDY OF INDIRA PARYAVARAN BHAVAN DELHI ,Aginakm1
 
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证nhjeo1gg
 
Untitled presedddddddddddddddddntation (1).pptx
Untitled presedddddddddddddddddntation (1).pptxUntitled presedddddddddddddddddntation (1).pptx
Untitled presedddddddddddddddddntation (1).pptxmapanig881
 
Design Portfolio - 2024 - William Vickery
Design Portfolio - 2024 - William VickeryDesign Portfolio - 2024 - William Vickery
Design Portfolio - 2024 - William VickeryWilliamVickery6
 
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一F La
 

Último (20)

Call Girls Aslali 7397865700 Ridhima Hire Me Full Night
Call Girls Aslali 7397865700 Ridhima Hire Me Full NightCall Girls Aslali 7397865700 Ridhima Hire Me Full Night
Call Girls Aslali 7397865700 Ridhima Hire Me Full Night
 
Pharmaceutical Packaging for the elderly.pdf
Pharmaceutical Packaging for the elderly.pdfPharmaceutical Packaging for the elderly.pdf
Pharmaceutical Packaging for the elderly.pdf
 
PORTFOLIO DE ARQUITECTURA CRISTOBAL HERAUD 2024
PORTFOLIO DE ARQUITECTURA CRISTOBAL HERAUD 2024PORTFOLIO DE ARQUITECTURA CRISTOBAL HERAUD 2024
PORTFOLIO DE ARQUITECTURA CRISTOBAL HERAUD 2024
 
韩国SKKU学位证,成均馆大学毕业证书1:1制作
韩国SKKU学位证,成均馆大学毕业证书1:1制作韩国SKKU学位证,成均馆大学毕业证书1:1制作
韩国SKKU学位证,成均馆大学毕业证书1:1制作
 
(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一
(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一
(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一
 
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
DAKSHIN BIHAR GRAMIN BANK: REDEFINING THE DIGITAL BANKING EXPERIENCE WITH A U...
 
Passbook project document_april_21__.pdf
Passbook project document_april_21__.pdfPassbook project document_april_21__.pdf
Passbook project document_april_21__.pdf
 
Design principles on typography in design
Design principles on typography in designDesign principles on typography in design
Design principles on typography in design
 
8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR
 
Unveiling the Future: Columbus, Ohio Condominiums Through the Lens of 3D Arch...
Unveiling the Future: Columbus, Ohio Condominiums Through the Lens of 3D Arch...Unveiling the Future: Columbus, Ohio Condominiums Through the Lens of 3D Arch...
Unveiling the Future: Columbus, Ohio Condominiums Through the Lens of 3D Arch...
 
1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改
1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改
1比1办理美国北卡罗莱纳州立大学毕业证成绩单pdf电子版制作修改
 
专业一比一美国亚利桑那大学毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国亚利桑那大学毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree专业一比一美国亚利桑那大学毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
专业一比一美国亚利桑那大学毕业证成绩单pdf电子版制作修改#真实工艺展示#真实防伪#diploma#degree
 
办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一
办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一
办理学位证(SFU证书)西蒙菲莎大学毕业证成绩单原版一比一
 
306MTAMount UCLA University Bachelor's Diploma in Social Media
306MTAMount UCLA University Bachelor's Diploma in Social Media306MTAMount UCLA University Bachelor's Diploma in Social Media
306MTAMount UCLA University Bachelor's Diploma in Social Media
 
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree 毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
'CASE STUDY OF INDIRA PARYAVARAN BHAVAN DELHI ,
'CASE STUDY OF INDIRA PARYAVARAN BHAVAN DELHI ,'CASE STUDY OF INDIRA PARYAVARAN BHAVAN DELHI ,
'CASE STUDY OF INDIRA PARYAVARAN BHAVAN DELHI ,
 
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证
在线办理ohio毕业证俄亥俄大学毕业证成绩单留信学历认证
 
Untitled presedddddddddddddddddntation (1).pptx
Untitled presedddddddddddddddddntation (1).pptxUntitled presedddddddddddddddddntation (1).pptx
Untitled presedddddddddddddddddntation (1).pptx
 
Design Portfolio - 2024 - William Vickery
Design Portfolio - 2024 - William VickeryDesign Portfolio - 2024 - William Vickery
Design Portfolio - 2024 - William Vickery
 
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
 

CG OpenGL vectors geometric & transformations-course 5

  • 1. Vectors & Geometric Transformations Chen Jing-Fung (2006/11/17) Assistant Research Fellow, Digital Media Center, National Taiwan Normal University Video Processing Lab 臺灣師範大學數位媒體中心視訊處理研究室 National Taiwan Normal University Ch5: Computer Graphics with OpenGL 3th, Hearn Baker
  • 2. 3D Graphics • Goal – Using mathematical method produce 2D images which is described 3D • Problems – Modeling (environment) • Construct a scene • Hierarchical description of a complex object (several parts composed) -> simpler parts – Rendering • Described how objects move around in an animation sequence? • Simply to view objects from another angle Video Processing Lab 2 臺灣師範大學數位媒體中心視訊處理研究室
  • 3. Coordinate Systems • Coordinate systems are fundamental in computer graphics – Describe the locations of points in space • Project from one coordinate system to another – Easier to understand and implement Video Processing Lab 3 臺灣師範大學數位媒體中心視訊處理研究室
  • 4. One coordinate system • Scalars (α), Point (P) & Vector (V) y P2: (x2, y2) V2=[x2, y2] vx vy y V=P2-P1=[x2- x1, y2-y1]=[vxy] P1: (x1, y1) b a+b V1=[x1, y1] x a x Scalars (α) α V=[αvij] Where is a-b & ab ?? Video Processing Lab 4 臺灣師範大學數位媒體中心視訊處理研究室
  • 5. Two vectors in one coordinate system • Scalar product or dot product V2 – V1.V2=|V1| |V2| cos Θ V1 • Commutative V1.V2= V2.V1 Θ • Associative V1.(V2+V3)= V1.V2+V1.V3 • Vector product or cross product V1xV2 V2 – V1xV2=u|V1| |V2| sin Θ Θ • Anti-commutative V1xV2= -V2xV1 u: unit vector V 1 • No associative V1x(V2xV3) ≠ (V1xV2)xV3 • Associative V1x(V2+V3)= (V1xV2)+(V1xV3) u x u y uz V1  V2  v1x v1y v1z v 2 x v 2y v 2z Video Processing Lab 5 臺灣師範大學數位媒體中心視訊處理研究室
  • 6. Two coordinate systems • The point is represented by two different coordinate systems y v (u, v) u (4, 6) x – Maybe only one coordinate system can represent the point by the easier way Video Processing Lab 6 臺灣師範大學數位媒體中心視訊處理研究室
  • 7. Transformations (1) • Transformation functions between two Coordinate systems (rendering) y v (u, v) u=x-3 v=y-4 u (4, 6) x=u+3 y=v+4 x Video Processing Lab 7 臺灣師範大學數位媒體中心視訊處理研究室
  • 8. Transformations (2) • In the same coordinate system to modify an object’s shape y y x’=x-2 y’=y-3 (4, 6) (2, 3) x=x’+2 y=y’+3 x x Video Processing Lab 8 臺灣師範大學數位媒體中心視訊處理研究室
  • 9. 2D affine transformations • Affine transformation – Linear projected function x  x x '  axx x  axy y  t x linear xy x  x  y y '  ayx x  ayy y  t y y   x '  axx axy   x  t x  or  y '   a     t  ayy   y   y     yx Video Processing Lab 9 臺灣師範大學數位媒體中心視訊處理研究室
  • 10. Composition of affine transforms • Simple transformations – Translation – Scaling – Rotation – Shear – Reflection Video Processing Lab 10 臺灣師範大學數位媒體中心視訊處理研究室
  • 11. 2D Translation • Translation equation P'  P  T y P’3  x '   1 0   x  t x  y  y '   0 1  y   t  ty       y x x tx – Translation is a rigid-body transformation that moves objects without deformation. – Delete the original polygon • To cover the background color (& save it in different array) Video Processing Lab 11 臺灣師範大學數位媒體中心視訊處理研究室
  • 12. 2D Scaling • Scaling equation P'  S  P y  x '  s x 0   x  0  y  y '   0      sy   y  0     syy x x sxx – Uniform scaling: sx=sy sx>1, sy< 1 – Differential scaling: sx≠sy Video Processing Lab 12 臺灣師範大學數位媒體中心視訊處理研究室
  • 13. 2D Rotation (1) • Single point rotation – Pivot-point = origin x '  r cos(   ), y '  r sin(   ) (x’,y’) x  r cos( ), y  r sin( ) r (x,y)  x '  cos * x  sin * y y '  sin * x  cos * y Video Processing Lab 13 臺灣師範大學數位媒體中心視訊處理研究室
  • 14. 2D Rotation (2) • Rotation equation P  R( )  P '  x '  cos  sin   x  0  y '   sin    y   0  cos          – Now, graphics packages all follow the standard column-vector convention • OpenGL, Java, Matlab … – Trans. and rotations are rigid-body transformations that move object without deformation • Each point on object is rotation through the same angle • Must be defined the direction of the rotated angle Rotation point is also called pivot point Video Processing Lab 14 臺灣師範大學數位媒體中心視訊處理研究室
  • 15. Y-axis Shear • Shear along y axis (what is x-axis shear?)  x '  1 0   x  0   y '   sh    y y    y 1  y  0  x x Video Processing Lab 15 臺灣師範大學數位媒體中心視訊處理研究室
  • 16. Y axis Reflection  x '   1 0   x  0   y '   0 1  y   0 y y        x x • What is the reflection of x-axis? Video Processing Lab 16 臺灣師範大學數位媒體中心視訊處理研究室
  • 17. Basic transformations • General form: P'  M2  P  M1 – Translation (shift): M1=identity matrix – Rotation or scaling: M2=translation term (R(Θ)) or scaling fixed pixel (S(s*)) • The efficient approach – To produce a sequence of transformations with these equation • Scale -> rotate(Θ) -> translate (linear) • The final coordinate positions are obtained directly from initial coordinates Video Processing Lab 17 臺灣師範大學數位媒體中心視訊處理研究室
  • 18. Homogeneous coordinate • General transformation equations: – x’ = axx + axy + tx  x '  axx axy tx   x   y '   a ty   y  y’ = ayx + ayy + ty 2D    yx ayy    1  0    0 1   1    • A standard technique is used to expand the matrix 2D (x,y) -> 3D(x,y,z) h*x – Homogenous coordinates: (xh, yh, h) – Homogenous parameter: h h*y • ‘h’ means the number of points in z-axis – Simply to set h=1 Video Processing Lab 18 臺灣師範大學數位媒體中心視訊處理研究室
  • 19. Basic Matrix3x3 • Translation matrix 1 0 tx  P'  P  T(t* )  P'  T(t* )  P 0 1 t   y 0 0 1    • Scaling matrix s x 0 0 P'  S(s* )  P 0 sy 0   0  0 1  • Rotation matrix cos  sin 0 P'  R( )  P  sin cos  0    0  0 1  Video Processing Lab 19 臺灣師範大學數位媒體中心視訊處理研究室
  • 20. Arbitrary point’s rotation (1) • Single point rotation – Pivot-point (xr,yr) ! = original point 1. translate • How to find solution u  x  xr – !! Coordinate transformation v  y  yr 2. rotate u '  r cos(   ),v '  r sin(   ) u '  x ' x r (u’,v’) u  r cos( ),v  r sin( ) v '  y ' y r r (u,v)  x '  xr  ( x  xr )cos  ( y  y r )sin (xr,yr) y '  y r  ( x  xr )sin  ( y  y r )cos Video Processing Lab 20 臺灣師範大學數位媒體中心視訊處理研究室
  • 21. Arbitrary point’s rotation (2) • General 2D point rotation (or scaling) – (xr, yr) & (xr, yr) ≠Origin • Translate origin coordinate -> the point position T( xr , y r ) • Rotate (or scaling) the object about the coordinate origin R( ) or S(sx , sy ) • Translate the point returned to its original position T( xr , y r ) Video Processing Lab 21 臺灣師範大學數位媒體中心視訊處理研究室
  • 22. Pivot-point rotation composite matrix T( xr , y r ) R( ) T( xr , y r ) T( xc , yc )  R( )  T( xc , yc )  R( xc , y c , )  1 0 X c  cos  sin 0   1 0 X c  0 1 Y    sin cos 0   0 1 Y  x '  xr  ( x  xr )cos  ( y  y r )sin  c     c  y '  y  ( x  x )sin  ( y  y )cos  r r r 0 0 1   0    0 1 0 0 0     cos  sin xc (1  cos )  y c sin    sin cos y c (1  cos )  xc sin     0  0 1   Video Processing Lab 22 臺灣師範大學數位媒體中心視訊處理研究室
  • 23. Scaling an Object not at the Origin • What case happens? – Apply the scaling transformation to an object not at the origin? • Based on the rotating about a point composition, what should you do to resize an object about its own center? T( xc , yc )  S(sx , sy )  T(xc , y c )  S( xc , y c , sx , sy ) Video Processing Lab 23 臺灣師範大學數位媒體中心視訊處理研究室
  • 24. Back to Rotation About a Pt • R (rotation matrix) and p (Pivot-point) describe how to rotate – Translation Origin to the position: x  x  p – Rotation: x  Rx  R(x  p)  Rx  Rp – Translate back: x  x  p  Rx  Rp  p • The composite transformation involves the rotation matrix. T( xnc , y nc )  R( )  T( xnc , y nc ) Video Processing Lab 24 臺灣師範大學數位媒體中心視訊處理研究室
  • 25. Matrix concatenation properties • What is matrix concatenation? M3  M2  M1  (M3  M2 )  M1  M3  (M2  M1 ) – Multiplication of matrices is associative • Premultiplying (left-to-right) = ?? Postmultiplying (right-to-left) – Transformation products not be commutative M2  M1  M1  M2 Video Processing Lab 25 臺灣師範大學數位媒體中心視訊處理研究室
  • 26. 3D transformations • Homogeneous coordinates  x '  a d g tx   x   y ' b e h ty  y  – 4x4 matrices      z '  c f u tz  z         1  0 0 0 1   1 • Specification of translation, rotation, scaling and other matrices in OpenGL – glTranslate(), glRotate(), glScale(), glMultMatrix() Video Processing Lab 26 臺灣師範大學數位媒體中心視訊處理研究室
  • 27. 3D translation & scaling • 3D Translation  x ' 1 0 0 tx   x   y '  0 1 0 ty  y       z '  0 0 1 tz  z         1  0 0 0 1   1 • 3D Scaling  x '  s x 0 0 0  x   y '  0 sy 0 0  y      z '   0 0 sz 0 z        1 0 0 0 1  1  Video Processing Lab 27 臺灣師範大學數位媒體中心視訊處理研究室
  • 28. 3D z-Axis Rotation • 2D extend along z-axis y axis – (2D->3D)  X '  cos  '   sin 0 X   Y    sin cos  0  Y      Z'   0 1  Z     0    P  R z ( )  P ' x axis z axis  X '  cos   sin 0 0 X  counterclockwise  '   Y    sin cos  0 0 Y    Z'   0 0 1 0 Z        1   0   0 0 1 1  y-axis & x-axis? Video Processing Lab 28 臺灣師範大學數位媒體中心視訊處理研究室
  • 29. 3D Rotation of arbitraryy axis y y Step 2 Step 1 P’2 P2 P’1 P’1 P”2 P1 x x z x z P’2 rotate onto z-axis z Initial position y P1 translate to the Origin y Step 3 Step 4 y Step 5 P2 P’1 P’2 P”2 P1 x P’1 z x z Rotation the Object x Translate the rotation z around z-axis Rotate the axis to its axis to its Original Original Orientation position R( )  T  R  T 1 R  R 1( )  R 1(  )  R z ( )  R y (  )  R x ( ) x y Video Processing Lab 29 臺灣師範大學數位媒體中心視訊處理研究室
  • 30. Problems with Rotation Matrices • Specifying a rotation really only requires 3 numbers in three Cartesian coordinates – 2 numbers to show a unit vector – Third number to show the rotation angle • Rotation matrix has a large amount of redundancy – Orthonormal constraints reduce degrees of freedom back down to 3 – Keeping a matrix orthonormal is difficult when transformations are combined Video Processing Lab 30 臺灣師範大學數位媒體中心視訊處理研究室
  • 31. Alternative Representations • Specify the axis and the angle (OpenGL method) – Hard to compose multiple rotations • Specify the axis, scaled by the angle – Only 3 numbers, but hard to compose • Euler angles: – First, how much to rotate about X – Second, how much to rotate about Y – Final, how much to rotate about Z • Hard to think about, and hard to compose • Quaternions Video Processing Lab 31 臺灣師範大學數位媒體中心視訊處理研究室
  • 32. Quaternions • 4-vector related to axis and angle, unit magnitude – Rotation about axis (x,y,z) by angles θ:  x '  cos   sin 0 0  x   y '   sin cos  0 0  y      z '   0 0 1 0 z        1   0 0 0 1 1  • Easy to compose • Easy to find rotation matrix Video Processing Lab 32 臺灣師範大學數位媒體中心視訊處理研究室
  • 33. Transformation in OpenGL • Transformation pipeline & matrices – Current Transformation Matrix (CTM) – CTM operations – CTM in OpenGL – OpenGL matrices Video Processing Lab 33 臺灣師範大學數位媒體中心視訊處理研究室
  • 34. Transformation pipeline & matrices object eye Projection Modelview Matrix vertex matrix modelview projection modelview • OpenGL matrices have three types – Model-View (GL_MODEL_VIEW) – Projection (GL_PROJECTION) – Texture (GL_TEXTURE) (ignore for now) Video Processing Lab 34 臺灣師範大學數位媒體中心視訊處理研究室
  • 35. Current Transformation Matrix (CTM) • CTM is a 4x4 homogeneous coordinate matrix – It can be altered by a set of function – It is defined in the user program – and loaded into a transformation unit C Current matrix P P’=CP vertices CTM vertices Video Processing Lab 35 臺灣師範大學數位媒體中心視訊處理研究室
  • 36. CTM operations P Current matrix C P’=CP CTM vertices vertices • CTM can be altered by loading new matrix or by postmultiply matrix – Load form glLoadIdentity(); • identity matrix: C←I T: glTranslatef(dx, dy, dz); • an arbitrary matrix: C←M R: glRotatef(angle, vx, vy, vz); • translation matrix: C←T … S: glScalef(sx, sy, sz); – Postmultiply form glMultMatrixf( ); • an arbitrary matrix: C←CM User input matrix • a translation matrix: C←CT • a rotation matrix: C←CR … Video Processing Lab 36 臺灣師範大學數位媒體中心視訊處理研究室
  • 37. Example by point rotation • Rotation with an arbitrary point – Order of transformations in OpenGL (one step = one function call) Initial • Loading an identity matrix: C←I • Translation Origin to the position: C← CT • Rotation: C← CR • Translate back: C← CT-1 – Result: C= TRT-1 Video Processing Lab 37 臺灣師範大學數位媒體中心視訊處理研究室
  • 38. CTM in OpenGL • In OpenGL, CTM has the model-view matrix and the projection matrix CTM Modelview Projection vertices vertices matrix matrix Geometric transformations glMatrixMode routine – Manipulate those matrices by concatenation and start from first setting matrix Video Processing Lab 38 臺灣師範大學數位媒體中心視訊處理研究室
  • 39. OpenGL matrices (1) • Current matrix glMatrixMode (GL_MODELVIEW|GL_PROJECTION) • Arbitrary matrix – Load 16-elements array glLoadMatrix* (elems); • A suffix code: f or d • The elements must be specified in column order – First list 4-elements in first-column – … – Finally the fourth column – Stack & store the Matrix glPushMatrix (); glPopMatrix (); Video Processing Lab 39 臺灣師範大學數位媒體中心視訊處理研究室
  • 40. OpenGL matrices (2) • Multiple by two arbitrary matrices C<-M2M1 glLoadIdentity(); glMultMatrixf(elemsM2); glMultMatrixf(elemsM1); • Access matrices by query functions glGetIntegerv glGetFloatv glGetBooleanv glGetdoublev glIsEnabled… Video Processing Lab 40 臺灣師範大學數位媒體中心視訊處理研究室
  • 41. Summery • Rotation related with axis and the origin – Use the same trick as in 2D: • Translate origin to the position • Rotate • translate back again • Rotation is not commutative – Rotation order matters – Experiment to convince by yourself Video Processing Lab 41 臺灣師範大學數位媒體中心視訊處理研究室
  • 42. Transformation trick • Rotation and Translation are the rigid-body transformations – Do not change lengths, sizes or angles, so a body does not deform • Scale, shear… extend naturally transformation from 2D to 3D Video Processing Lab 42 臺灣師範大學數位媒體中心視訊處理研究室
  • 43. Triangle’s rotation at arbitrary point • vertices tri = {{50.0, 25.0}, {150.0, 40.0}, {100.0, 100.0}}; //set object’s vertices • Centpt; //find center point to describe the triangle • glLoadIdentity(); • glTranslatef(); //translate the center point • glRotatef(angle, vx,vy,vz); //rotate the center point, axis=(vx,vy,vz), angle: user define • glTranslatef(); //translate return Video Processing Lab 43 臺灣師範大學數位媒體中心視訊處理研究室
  • 44. Middle project • Make some visual components by yourself – more than three object’s from HW1 & HW2 • Practice each one composition (rotation, scaling, translate, shear and reflection) – Note: original & new • Practice combining two or three compositions • Team work (2~3) Video Processing Lab 44 臺灣師範大學數位媒體中心視訊處理研究室
  • 45. Reference • http://www.cs.wisc.edu/~schenney/ • http://graphics.csie.ntu.edu.tw/~robi n/courses/3dcg06/ • http://www.cse.psu.edu/~cg418/ • http://groups.csail.mit.edu/graphics/ classes/6.837 Video Processing Lab 45 臺灣師範大學數位媒體中心視訊處理研究室
  • 46. Inverse matrix • Identify matrix (Inxn) 1 0 0 I I3 x 3  0 1 0  – MM-1=I,   1 M  M  0 0 1   – Inverse matrix (M-1 ) 1 0 tx   1 0 t x  T  0 1 t y    T 1  0 1 t y    0 0 1    0 0 1    cos  sin 0  cos sin 0 R   sin  cos 0  R 1    sin  cos 0   RT   0  0 1   0  0 1 Video Processing Lab 46 臺灣師範大學數位媒體中心視訊處理研究室
  • 47. 2D Reflection Reflection line y=0 Reflection line x=0 Reflection line y=-x y y y x x x • Transformation matrix 1 0 0  1 0 0   0 1 0  0 1 0   0 1 0  1 0 0         0 0 1    0 0 1  0 0 1     Video Processing Lab 47 臺灣師範大學數位媒體中心視訊處理研究室