GeometricTransformations (1)

# GeometricTransformations (1) - Computer Graphics Page 1...

This preview shows pages 1–5. Sign up to view the full content.

Computer Graphics Page 1 GEOMETRIC TRANSFORMATIONS Review of Mathematical Preliminaries Points: 0 0 0 = y x P = 1 1 1 y x P Vectors: directional lines - - = = = 0 1 0 1 1 0 y y x x P P V Vy Vx = y x V 1. A vector has a direction and a length: Length: |V|=(x 2 + y 2 ) 1/2 A unit vector: |V| = 1 e.g.: = 0 1 x , = 1 0 y . P 1 (x 1 ,y 1 ) P 0 (x 0 ,y 0 )

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Computer Graphics Page 2 Normalize a vector: V V 2. Add two vectors = v v y x V = w w y x W + + = + w v w v y y x x W V 3. Scalar Multiplication = = y x y x V α 4. Dot product of two vectors scalar w v w v y y x x W V += W V W V = ) cos( θ V W if θ = 90 ° => cos θ = 0 => V W = 0. if θ < 90 ° => cos θ > 0 => V W > 0. if θ > 90 ° => cos θ < 0 => V W < 0. 5. Normal : a unit vector perpendicular to a surface. V W θ
Computer Graphics Page 3 Lines y=mx+b e.g.: y = x; ax+by+c=0 Let f(x,y) = ax + by + c A point p(x p ,y p ) is on the line if f(x p ,y p ) = 0. When b < 0: p(x p ,y p ) is above the line if f(x p ,y p ) < 0. p(x p ,y p ) is below the line if f(x p ,y p ) > 0. When b > 0: p(x p ,y p ) is above the line if f(x p ,y p ) > 0. p(x p ,y p ) is below the line if f(x p ,y p ) < 0. Parametric Form: P(t)=P 0 +t(P 1 -P 0 ); 0 <= t <= 1 P(t)=P 0 +t(P 1 -P 0 ) y(t) x(t) = y 0 x 0 + y 1 x 1 t *( 29 y 0 x 0 - P 1 (x 1 ,y 1 ) P 0 (x 0 ,y 0 ) - - + = ) ( * ) ( * ) ( ) ( 0 1 0 1 0 0 y y t x x t y x t y t x

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Computer Graphics Page 4 x(t) = x 0 + t * (x 1 – x 0 ) y(t) = y 0 + t * (y 1 – y 0 ) 0 <= t <= 1 x(t) = (1-t) * x 0 + t * x 1 y(t) = (1-t) * y 0 + t * y 1 0 <= t <= 1 Matrix Multiplication c 11 c 21 c 12 c 22 a 11 a 21 a 12 a 22 b 11 b 21 b 12 b 22 = x’
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 18

GeometricTransformations (1) - Computer Graphics Page 1...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online