Mathematics for real-time graphics

Size: px
Start display at page:

Download "Mathematics for real-time graphics"

Transcription

1 Mathematics for real-time graphics Josef Pelikán CGG MFF UK Praha Math 2018 Josef Pelikán, 1 / 65

2 Content homogeneous coordinates, matrix transformations coordinate-system conversions coordinate systems, projections, frustum perspective correct interpolation orientations Euler angles, quaternions orientation interpolation smooth interpolations and approximations spline functions, natural spline, B-spline, Catmull-Rom,... Math 2018 Josef Pelikán, 2 / 65

3 Geometric transformations in 3D Cartesian 3D coordinate vector [ x, y, z ] multiplying by a 3 3 matrix row vector multiplied from the right (DirectX) [x, y, z] [a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33] = [x ', y',z' ] column vector multiplied from the left (OpenGL) transform matrices 3 3 have serious drawback cannot do translations! Math 2018 Josef Pelikán, 3 / 65

4 Homogeneous coordinates homogeneous coordinate vector [ x, y, z, w ] transformation: multiplying by a 4 4 matrix [x, y, z, w] [a 11 a 12 a 13 a 14 a 21 a 22 a 23 a 24 = [ x', y',z ', w' ] a 31 a 32 a 33 a 34 a 41 a 42 a 43 a 44] homogeneous matrix is able to translate and to do perspective projections Math 2018 Josef Pelikán, 4 / 65

5 Coordinate conversions from homogeneous coordinates [ x, y, z, w ] into Cartesian coordinates: by division (w 0) [ x/w, y/w, z/w ] coordinate vector [ x, y, z, 0 ] does not correspond to any real point in space can be interpreted as a directional vector (point in infinity) from Cartesian coordinates to homogeneous: trivial extension [ x, y, z ] [ x, y, z, 1 ] Math 2018 Josef Pelikán, 5 / 65

6 Elementary transformations Affine transformation: [a11 a12 a13 0 a 21 a 22 a 23 0 a 31 a 32 a 33 0 t 1 t 2 t 3 1 ] upper left submatrix [ a 11 to a 33 ] defines scaling, orientation and shear vector [ t 1, t 2, t 3 ] defines translation translation is performed after former transformations Math 2018 Josef Pelikán, 6 / 65

7 Normal vector transformation normal vectors must not be transformed by regular matrices (like point positions are) exception: M is rotational (orthonormal) normal-vector transformation matrix N: N = M 1 T x N x N' x N y y y Math 2018 Josef Pelikán, 7 / 65

8 Coordinate systems in OpenGL Object space (object modeling) Modeling transform (scene composition) World space (simulation) [x,y,z,w] -z View transform (camera position & view) Eye space (camera space) -z Projection transform (perspective orthographic) xy Clip space (frustum = homo cube) xy n f [x,y,z,w] -z xy -z xy Math 2018 Josef Pelikán, 8 / 65

9 Coordinate systems in OpenGL Clip space (frustum = homo cube) [x,y,z,w] Perspective divide (hardwired into HW) Viewport transform (3D scaling & translation) Normalized Device Space (frustum = cartesian cube) [x,y,z] -z Window space (actual pixel coords) [x,y,z] xy OpenGL: [-1,-1,-1] to [1,1,1] DirectX: [-1,-1, 0] to [1,1,1] [x,y] z actual screen coordinates (fragments) depth value compatible with actual depth-buffer Math 2018 Josef Pelikán, 9 / 65

10 Coordinate systems in OpenGL object space modeling of individual objects, modularity 3D modeling software (3DSMax, Blender, Rhino,..) world space absolute (real) coordinates in simulated virtual world object instantiation, collision detection, AI planning,.. camera space the whole virtual world transforms into coordinates relative to a camera center of projection: origin, view direction: -z (or z) Math 2018 Josef Pelikán, 10 / 65

11 Coordinate systems & transformations transformation model camera altogether modelview matrix world coordinates are not directly used in render. pipel. projection transformation defines visible volume = frustum [ l, r, b, t, n, f ] front & back clip distances: n, f result: homogeneous coordinate (before clipping) clip space mandatory output coordinate of vertex shader! Math 2018 Josef Pelikán, 11 / 65

12 Projection transformation far point f can be in infinity [ ] 2n r l 2n t b r l t b f n 1 r l t b f n 0 0 2fn 0 f n [ ] 2n r l 2n t b r l t b 1 1 r l t b 0 0 2n 0 xy n f -z Math 2018 Josef Pelikán, 12 / 65

13 Coordinate systems & transformations perspective division just converts homogeneous coordinates into Cartesian normalized coordinates ( NDS ) standard-sized cube/cuboid OpenGL: [-1,-1,-1] to [1,1,1] DirectX: [-1,-1,0] to [1,1,1] window coordinates ( window space ) result of linear adjustment to window size in pixels used in rasterizer and all fragment processing Math 2018 Josef Pelikán, 13 / 65

14 Rigid body transformation preserves shapes, alters orientation & position translation and rotation conversion between coordinate systems (e.g. between world-space and camera-space) z u (up) r (right) v (view) y x left-handed = clockwise ( pravotočivý in Czech) Math 2018 Josef Pelikán, 14 / 65

15 Conversion between two orientations z u O s x y t [1, 0, 0 ] M stu xyz = s [0, 1, 0 ] M stu xyz = t [0, 0, 1 ] M stu xyz = u Coordinate system has an origin O and is defined by three unit vectors [ s, t, u ] [ M stu xyz = M xyz stu s x s y s z t x t y t z u x u y u z] T = M stu xyz Math 2018 Josef Pelikán, 15 / 65

16 Euler transformation y head roll arbitrary rotation decomposed into three components Leonard Euler ( ) x -z E(h,p,r) = R y (h) R x (p) R z (r) pitch h (head, yaw): plan view direction p (pitch): forward/backward pitching r (roll): rolling around the view vector Math 2018 Josef Pelikán, 16 / 65

17 Euler transformation II result matrix of rotation E= c r c h s r s p s h s r c h c r s p s h c p s h s r c p c r c p s p c r s h s r s p c h s r s h c r s p c h c p c h s(x).. sin(x), c(x).. cos(x) backward matrix angles computation h, p, r: p.. e 23 r.. e 21 /e 22 h.. e 13 /e 33 Math 2018 Josef Pelikán, 17 / 65

18 Rotations: different conventions main convention: 1. rotation around z by 2. rotation around x' by 3. rotation around z'' by x-convention: 1. rotation around z 2. rotation around original x 3. rotation around original z more systems (24): aeronautics, gyroscopes, physics,.. Math 2018 Josef Pelikán, 18 / 65

19 Quaternions Sir William Rowan Hamilton, 16 Oct 1843 (Dublin) i 2 = j 2 = k 2 = ijk = -1 usage in graphics since 1985 (Shoemake) generalization of complex numbers in 4D space q = (v, w) = i x + j y + k z + w = v + w sometimes (w, v)! imaginary part v = (x, y, z) = i x + j y + k z i 2 = j 2 = k 2 = -1, jk = -kj = i, ki = -ik = j, ij = -ji = k Math 2018 Josef Pelikán, 19 / 65

20 Quaternions: operations I addition (v 1, w 1 ) + (v 2, w 2 ) = (v 1 +v 2, w 1 +w 2 ) multiplication q r = ( v q v r + w r v q + w q v r, w q w r - v q v r ) i q y r z q z r y r w q x q w r x, j q z r x q x r z r w q y q w r y, k q x r y q y r x r w q z q w r z, q w r w q x r x q y r y q z r z Math 2018 Josef Pelikán, 20 / 65

21 Quaternions: operations II conjugation (v, w)* = (-v, w) norm (squared absolute value) q 2 = n(q) = q q* = x 2 + y 2 + z 2 + w 2 unit i = (0, 1) reciprocal q -1 = q* / n(q) multiplication by a scalar s q = (0, s) (v, w) = (s v, s w) Math 2018 Josef Pelikán, 21 / 65

22 Unit quaternions unit quaternion can be expressed by goniometry as q = (u q sin, cos ) for some unit 3D vector u q it represents a rotation (orientation) in 3D ambiguity: both q and -q represent the same rotation! identity (zero rotation): (0, 1) (f + p) power, exponential, logarithm: q = u q sin + cos = exp ( u q ), log q = u q q t = (u q sin + cos ) t = exp (t u q ) = u q sin t + cos t Math 2018 Josef Pelikán, 22 / 65

23 Rotation using quaternion unit quaternion q = (u q sin, cos ) u q... axis of rotation,... angle u q vector (point) in 3D: p = [p x, p y, p z, 0] rotation of vector (point) p around u q by angle 2 p' = q p q -1 = q p q* Math 2018 Josef Pelikán, 23 / 65

24 Quaternion matrix conversions quaternion q converted to a matrix: M = 1 2 y 2 z 2 2 x y w z 2 x z w y 2 x y w z 1 2 x 2 z 2 2 y z w x 2 x z w y 2 y z w x 1 2 x 2 y 2 reverse conversion is based on equations ($): m 23 m 32 =4wx m 31 m 13 =4wy m 12 m 21 =4wz tr M 1 =4w 2 Math 2018 Josef Pelikán, 24 / 65

25 Matrix quaternion II 1. matrix_trace+1 has large enough absolute value: w= 1 2 tr M 1 x= m m w y= m 31 m 13 4w z= m 12 m 21 4w 2. otherwise compute a component with largest absolute value first and then apply $: 4x 2 =1 m 11 m 22 m 33 4y 2 =1 m 11 m 22 m 33 4z 2 =1 m 11 m 22 m 33 Math 2018 Josef Pelikán, 25 / 65

26 Spherical linear interpolation (slerp) two quaternions q and r real parameter 0 t 1 Interpolated quaternion (q r 0, else take -q) slerp(q,r,t) = q (q* r) t different formulation: slerp q, r,t = sin 1 t sin t q sin sin r cos =q x r x q y r y q z r z q w r w... the shortest spherical arc between q and r (quaternion splines will be explained later) Math 2018 Josef Pelikán, 26 / 65

27 Rotation between two vectors two vectors s and t: 1. normalization of s, t 2. unit rotation axis u = (s t) / s t 3. angle between s and t: e = s t = cos 2 s t = sin 2 4. final quaternion: q = ( u sin, cos ) q= q v, q w = e s t, 2 1 e 2 Math 2018 Josef Pelikán, 27 / 65

28 Slerp of rotational matrices two rotational matrices Q and R real parameter 0 t 1 Interpolated matrix slerp(q,r,t) = Q (Q T R) t technical problem:? power operation on matrices need to compute axis and angle Q T R not very efficient (for details see RotationIssues.pdf ) Math 2018 Josef Pelikán, 28 / 65

29 Rotation representation - summary rotational matrix + HW support, efficient point/vector transformation memory (float[9]), other operations are not so efficient rotational axis and angle + memory (float[4] or float[6]), similar to quaternion inefficient composition and interpolation quaternion + memory (float[4]), composition, interpolation inefficient point/vector transformation (for details see RotationIssues.pdf ) Math 2018 Josef Pelikán, 29 / 65

30 Interpolation in the screen space concerns clip-space and next spaces clip space: [ x, y, z, w ] NDS: [ x/w, y/w, z/w, w ] ( w could be preserved) window space (fragments): [ x i, y i, z i, w ] projective perspective transformation maps depth z to NDS non-linearly! nonuniform accuracy of z-buffer (distant parts could be less accurate: minimization of f/n ratio!) + interpolation of depth z can be done in the screen space linearly W-buffer instead of z-bufferu (not used any more) Math 2018 Josef Pelikán, 30 / 65

31 Perspective-correct interpolation [x 1,y 1,z 1,1/w 1,u 1 /w 1,v 1 /w 1 ] [x 2,y 2,z 2,1/w 2,u 2 /w 2,v 2 /w 2 ] w = 1 / (1/w) u = (u/w) w... [x 3,y 3,z 3,1/w 3,u 3 /w 3,v 3 /w 3 ] Linear interpolation + division: depth z is linear by itself for texture coordinates or w perspective-correct interpolation must be used: quantities 1/w, u/w, v/w,.. are linearly interpolated, [ u, v ] is then computed by division (hyperbolic interpolation) Math 2018 Josef Pelikán, 31 / 65

32 Interpolation example I Affine Correct Math 2018 Josef Pelikán, 32 / 65

33 Interpolation example II Affine Correct Math 2018 Josef Pelikán, 33 / 65

34 Approximation and interpolation approximation (e.g. B-spline) needs not to pass through control points interpolation (e.g. Catmull-Rom) curve passes through ctrl. points curve continuity G n geometric continuity of n th order (G 0 simple continuity, G 1 tangent, G 2 curvature, ) C n analytical continuity of n th order, n th derivative cont. (C 1 speed, C 2 acceleration), superior to geometric Math 2018 Josef Pelikán, 34 / 65

35 History curves in modeling industry Paul de Faget de Casteljau by Citroën (1959) Pierre Bèzier (by Renault , UNISURF) - late start, but his results were more popular application of spline function theory mostly in the USA (James Ferguson, 1964, Boeing, C 2 spline curves) spline function theory B-spline: Isaac Jacob Schoenberg, (ballistics, Aberdeen, MD, 1946) theory: Carl de Boor (also worked in General Motors) Gordon, Riesenfeld united Bèzier and B-spline curves (1972) Math 2018 Josef Pelikán, 35 / 65

36 Free-form curves I defined by a sequence of control points control polygon approximation or interpolation boundary conditions can be different controllability sometimes tangent vectors added in ctrl. pts. (Hermit) interpolation closer control locality change of single control point (one tangent vector) induces change in restricted neighborhood only Math 2018 Josef Pelikán, 36 / 65

37 Free-form curves II parametric expression (0 t 1) convex hull property curve lies in convex hull of its control polygon Cauchy condition for blending functions sufficient for convex hull property ensures affine transformation invariancy N 1 i =0 N 1 P t = i=0 w i t = 1 w i t P i P 1 P 0 P2 P 3 Math 2018 Josef Pelikán, 37 / 65

38 Splines Jay Greer Edson International Math 2018 Josef Pelikán, 38 / 65

39 Spline functions Named after elastic ruler used in ship design (pinned in several points by ducks ) definition: spline function of degree n: piece-wise polynomial (of degree n) maximum-smoothness connection: C n-1 continuity of n-1 th derivative (polyn. of degree n) global parametrization u, u 0 u u N [u 0, u 1,... u N ] individual parts are often uniformly parametrized uniform spline: t i = (u u i ) / (u i+1 u i ), 0 t i 1 Math 2018 Josef Pelikán, 39 / 65

40 Polynomial curve matrix notation: xn yn z n x P t = TC = [t n, t n 1,... t, 1 ] [ n 1 y n 1 z n 1 ] x 1 y 1 z 1 x 0 y 0 z 0 basis matrix M and vector of geometric conditions G: 1 0, k C = MG = [m ij ] i =n, j=1 [G.. k] G Math 2018 Josef Pelikán, 40 / 65 P t = TMG

41 Matrix notation of a curve P(t) = T C = T M G separation of a parameter vector (T) from polynomial basis (M) and geometric control conditions/points (G) differentiation (tangent, curvature) restricted to T control polynomial TM times geometry G cubic: n = 3, k = 4 11 m 12 m 13 m 14 Q(t )=[t 3,t 2 m,t,1] [m 21 m 22 m 23 m 24 G 2 m 31 m 32 m 33 m 34 G 3 m 41 m 42 m 43 m 44] [G1 4] G Math 2018 Josef Pelikán, 41 / 65

42 Hermite cubic curve Ferguson curve (cubic) geometry: endpoints and tangent vectors beginning (P 0 ) and end (P 1 ) of a curve tangents in beginning (T 0 ) and ending (T 1 ) points F (t)=[t 3,t 2,t, ] [ ] [P 0 P 1 1] T T Math 2018 Josef Pelikán, 42 / 65

43 Hermite cubic examples T 0 T 0 T 0 P 1 P 0 P 1 T 1 T1 P 0 P 0 P 1 T 1 Math 2018 Josef Pelikán, 43 / 65

44 More curves interpolating cubics derived from Hermite: general: Kochanek-Bartels (KB-spline, TCB cubic) special: cardinal spline, Catmull-Rom spline Akima interpolation ( Akima spline, not C 2 ) D-spline cubic another popular curves: Bèzier curves B-spline curve, Coons spline (approximation) natural spline (interpolation) Math 2018 Josef Pelikán, 44 / 65

45 Kochanek-Bartels cubic (KB-spline, TCB) derived from Hermite cubic (3DS Max, Lightwave) tangent vectors are derived from control points three additional scalar parameters (zero by default): - tension t: sharpness of a curve passing control point (absolute value of a tangent vector) - continuity c: in control points - bias b: tangent direction in control point Left and right tangent (T 0 and T 1 in local sense): L i = 1 t 1 c 1 b P 2 i P i 1 1 t 1 c 1 b P 2 i 1 P i 1 t 1 c 1 b R i = P 2 i P i 1 1 t 1 c 1 b P 2 i 1 P i Math 2018 Josef Pelikán, 45 / 65

46 Cardinal spline, Catmull-Rom spline Special cases of KB-spline: cardinal spline parameter a only (in fact relates to t, c = b = 0) T i = a P i 1 P i 1 0 a 1 Catmull-Rom spline a = t = 1/2 MG = 1 2 T i = 1 ] [ 2 P P i 1 i 1 [ Pi P i P i P i 2] Math 2018 Josef Pelikán, 46 / 65

47 Akima interpolation Alternative definition of tangent vectors for Hermite cubic: non-c 2! P i-2 Pi+2 P i-1 P i+1 P i C i T i = P i+1 P i 1 A i B i T i Math 2018 Josef Pelikán, 47 / 65

48 D-spline cubic one more variant of Hermite cubic tangent vector computed by the D-interpolation P i-1 b i P i c i P i+1 d i G =[ Pi P i 1 T i T i 1] T i b i Math 2018 Josef Pelikán, 48 / 65

49 Bèzier curves I polynomial curve of degree N N+1 control points - boundary control points define endpoints of a curve - boundary control-point pairs define tangent vectors parametric expression using Bernstein polynomials easy G 1 or C 1 connection spline-join is also possible, but much more complicated Bernstein polynomials: B n i t = n i ti 1 t n i 0 i n, 0 t 1 Math 2018 Josef Pelikán, 49 / 65

50 Bèzier curves II Cauchy condition convex combination of control points n i =0 B i n t = 1 P 1 P 2 for pro 0 t MG =[ ] [P 0 P 1 ] P 2 P 3 P 0 cubic Bèzier curve P 3 Math 2018 Josef Pelikán, 50 / 65

51 Joining Bèzier curves I G 1 connection (co-linear tangents) P 1 P 2 P 6 P 3 P 5 P 0 P 3 P 4 = k P 2 P 3 P 4 Math 2018 Josef Pelikán, 51 / 65

52 Joining Bèzier curves II C 1 connection (equal tangent vectors) P 1 P 6 P2 P 3 P 5 P 0 P 3 P 4 = P 2 P 3 P 4 Math 2018 Josef Pelikán, 52 / 65

53 Joining Bèzier curves III Quadratic spline from Bèzier segments P 1 P 4 P 5 P 8 P 2 P3 P 6 P 0 P 7 P 1 P 2 = P 2 P 3 P 3 P 4 = P 4 P 5... P 2k 1 P 2k = P 2k P 2k+1 Math 2018 Josef Pelikán, 53 / 65

54 Joining Bèzier curves IV Cubic spline from Bèzier segments P 7 P 1 P 2 P8 P 6 P 3 P 0 P 4 P 5 P 9 P 2 P 3 = P 3 P 4 P 5 P 6 = P 6 P 7... P 3k 1 P 3k = P 3k P 3k+1 Math 2018 Josef Pelikán, 54 / 65

55 De Casteljau (de Boor) algorithm geometric construction of Bèzier curve used as subdivision scheme or for computation of a specific point.. P 1 1 P 1 P 2 P 1 1 P 1 P 2 P 0 2 1/2 P 0 1 1/2 P 0 2 P 03 =L 3 =R 0 =B(1/2) P 1 2 P 2 1 1/4 1 P 0 3/4 P 0 3 =B(3/4) P 1 2 P 2 1 L 0 =P 0 P 3 =R 3 P 0 P 3 Math 2018 Josef Pelikán, 55 / 65

56 Using [S]LERP operation linear interpolation LERP (SLERP for quaternions) LERP ( A, B, t ) = A (1 t) + B t P 1 Q 1 P 2 Cubic Bèzier: 1-t R 0 Q i = LERP( P i, P i+1, t ) Q 0 t S 0 = B(t) R 1 Q 2 R i = LERP( Q i, Q i+1, t ) S i = LERP( R i, R i+1, t ) P 0 P 3 Math 2018 Josef Pelikán, 56 / 65

57 [S]LERP for quadratic interpolation 1-t Q 0 P 1 Q 1 P 2 t R 0 = B(t) Quadratic Bèzier: Q i = LERP( P i, P i+1, t ) R i = LERP( Q i, Q i+1, t ) P 0 Math 2018 Josef Pelikán, 57 / 65

58 Cubic spline function assembled from cubic polynomials neighbor polynomials have C 2 joint elastic spline-ruler (see construction) interpolating cubic spline in knot points x 0, x 1,... x n function values y 0, y 1,... y n are prescribed S x = S k x =s k,0 s k,1 x x k s k,2 x x k 2 s k,3 x x k 3 x [x k, x k 1 ], k=0, 1,..., n 1 condition A: S x k = y k k=0, 1,..., n Math 2018 Josef Pelikán, 58 / 65

59 Interpolating cubic spline condition B (C 0 continuity): S k x k 1 = S k 1 x k 1 k=0, 1,..., n 2 condition C (C 1 continuity): S k ' ' x k 1 = S k 1 x k 1 k=0, 1,..., n 2 condition D (C 2 continuity): S '' '' k x k 1 = S k 1 x k 1 k=0, 1,..., n 2 natural cubic spline has additional condition E: S ' ' x 0 = S ' ' x n = 0 Math 2018 Josef Pelikán, 59 / 65

60 Natural cubic spline interpolating spline uniquely determined by the conditions (solution of linear system of equations s k,l ) has no local property (the whole curve changes after altering one control point) open spline: conditions A, B, C, D are not sufficient, 2 more DoF additional condition E (second derivatives in endpoints) closed (cyclic) spline: x 0 = x n C and D give us missing conditions for x 0 Math 2018 Josef Pelikán, 60 / 65

61 B-spline (basis spline) free-form curve shape is defined by a sequence of control points parametric form using basis/blending functions (dependency of a curve point on control polygon) local property (only local change after altering one CP) uniform cubic B-spline (Coons curve) unified set of basis functions (cubic polynomials) nonuniform B-spline more complicated definition using knot vector 0 t i 1 Math 2018 Josef Pelikán, 61 / 65

62 Coons B-spline P 1 P 5 P 3,1 P 6 P 3,2 P 2 P 0 P 7 P 3,3 P 4 continuity C 2 sharing 3 CP between neighb. altering one CP induces change in 4 segments MG = 1 6 [ ] [Pi 1 P i P i 1 P i 2] Math 2018 Josef Pelikán, 62 / 65

63 Spline interpolation of quaternions subsequent interpolation by a sequence of oriantations q 0, q 1,... q n slerp(q i,q i+1,t) not sufficient continuity (C 0 only) a slerp(a,b,t) b squad p,a,b, q,t = slerp slerp p,q,t,slerp a,b,t, 2t 1 t p squad(p,a,b,q,t) q s i t = squad q i,a i,b i,q i 1,t slerp(p,q,t) a i = b i 1 = q i exp[ 1 log q i q i 1 log q 1 i q i 1 ] 4 Math 2018 Josef Pelikán, 63 / 65

64 Vertex blending ( skinning ) vertex p of each triangle is connected to some neighbor bones (coordinate systems) quiescent position: t = 0 bones are animated by matrices B i (t) (object world) initial transformation M i = B i (0) n p t = i= 1 w i p M i 1 B i t, n i= 1 w i = 1 B 1 (t) w 1 p(t) w 2 B 2 (t) Math 2018 Josef Pelikán, 64 / 65

65 Sources Tomas Akenine-Möller, Eric Haines: Real-time rendering, 2 nd edition, A K Peters, 2002, ISBN: J. Žára, B. Beneš, J. Sochor, P. Felkel: Moderní počítačová grafika, 2. vydání, Computer Press, 2005, ISBN: (Dave Eberly) Math 2018 Josef Pelikán, 65 / 65

For each question, indicate whether the statement is true or false by circling T or F, respectively.

For each question, indicate whether the statement is true or false by circling T or F, respectively. True/False For each question, indicate whether the statement is true or false by circling T or F, respectively. 1. (T/F) Rasterization occurs before vertex transformation in the graphics pipeline. 2. (T/F)

More information

Quaternions and Rotations

Quaternions and Rotations CSCI 520 Computer Animation and Simulation Quaternions and Rotations Jernej Barbic University of Southern California 1 Rotations Very important in computer animation and robotics Joint angles, rigid body

More information

Computer Graphics Curves and Surfaces. Matthias Teschner

Computer Graphics Curves and Surfaces. Matthias Teschner Computer Graphics Curves and Surfaces Matthias Teschner Outline Introduction Polynomial curves Bézier curves Matrix notation Curve subdivision Differential curve properties Piecewise polynomial curves

More information

Quaternions and Rotations

Quaternions and Rotations CSCI 520 Computer Animation and Simulation Quaternions and Rotations Jernej Barbic University of Southern California 1 Rotations Very important in computer animation and robotics Joint angles, rigid body

More information

3D Modeling Parametric Curves & Surfaces. Shandong University Spring 2013

3D Modeling Parametric Curves & Surfaces. Shandong University Spring 2013 3D Modeling Parametric Curves & Surfaces Shandong University Spring 2013 3D Object Representations Raw data Point cloud Range image Polygon soup Surfaces Mesh Subdivision Parametric Implicit Solids Voxels

More information

Information Coding / Computer Graphics, ISY, LiTH. Splines

Information Coding / Computer Graphics, ISY, LiTH. Splines 28(69) Splines Originally a drafting tool to create a smooth curve In computer graphics: a curve built from sections, each described by a 2nd or 3rd degree polynomial. Very common in non-real-time graphics,

More information

Objects 2: Curves & Splines Christian Miller CS Fall 2011

Objects 2: Curves & Splines Christian Miller CS Fall 2011 Objects 2: Curves & Splines Christian Miller CS 354 - Fall 2011 Parametric curves Curves that are defined by an equation and a parameter t Usually t [0, 1], and curve is finite Can be discretized at arbitrary

More information

CSE 167: Introduction to Computer Graphics Lecture 12: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

CSE 167: Introduction to Computer Graphics Lecture 12: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013 CSE 167: Introduction to Computer Graphics Lecture 12: Bézier Curves Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013 Announcements Homework assignment 5 due tomorrow, Nov

More information

The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a

The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a coordinate system and then the measuring of the point with

More information

Today. Rendering pipeline. Rendering pipeline. Object vs. Image order. Rendering engine Rendering engine (jtrt) Computergrafik. Rendering pipeline

Today. Rendering pipeline. Rendering pipeline. Object vs. Image order. Rendering engine Rendering engine (jtrt) Computergrafik. Rendering pipeline Computergrafik Today Rendering pipeline s View volumes, clipping Viewport Matthias Zwicker Universität Bern Herbst 2008 Rendering pipeline Rendering pipeline Hardware & software that draws 3D scenes on

More information

2D Spline Curves. CS 4620 Lecture 13

2D Spline Curves. CS 4620 Lecture 13 2D Spline Curves CS 4620 Lecture 13 2008 Steve Marschner 1 Motivation: smoothness In many applications we need smooth shapes [Boeing] that is, without discontinuities So far we can make things with corners

More information

CHAPTER 1 Graphics Systems and Models 3

CHAPTER 1 Graphics Systems and Models 3 ?????? 1 CHAPTER 1 Graphics Systems and Models 3 1.1 Applications of Computer Graphics 4 1.1.1 Display of Information............. 4 1.1.2 Design.................... 5 1.1.3 Simulation and Animation...........

More information

Design considerations

Design considerations Curves Design considerations local control of shape design each segment independently smoothness and continuity ability to evaluate derivatives stability small change in input leads to small change in

More information

Bezier Curves, B-Splines, NURBS

Bezier Curves, B-Splines, NURBS Bezier Curves, B-Splines, NURBS Example Application: Font Design and Display Curved objects are everywhere There is always need for: mathematical fidelity high precision artistic freedom and flexibility

More information

3D Modeling Parametric Curves & Surfaces

3D Modeling Parametric Curves & Surfaces 3D Modeling Parametric Curves & Surfaces Shandong University Spring 2012 3D Object Representations Raw data Point cloud Range image Polygon soup Solids Voxels BSP tree CSG Sweep Surfaces Mesh Subdivision

More information

Introduction to OpenGL

Introduction to OpenGL Introduction to OpenGL 1995-2015 Josef Pelikán & Alexander Wilkie CGG MFF UK Praha pepca@cgg.mff.cuni.cz http://cgg.mff.cuni.cz/~pepca/ 1 / 31 Advances in Hardware 3D acceleration is a common feature in

More information

Curves. Computer Graphics CSE 167 Lecture 11

Curves. Computer Graphics CSE 167 Lecture 11 Curves Computer Graphics CSE 167 Lecture 11 CSE 167: Computer graphics Polynomial Curves Polynomial functions Bézier Curves Drawing Bézier curves Piecewise Bézier curves Based on slides courtesy of Jurgen

More information

Central issues in modelling

Central issues in modelling Central issues in modelling Construct families of curves, surfaces and volumes that can represent common objects usefully; are easy to interact with; interaction includes: manual modelling; fitting to

More information

Overview. By end of the week:

Overview. By end of the week: Overview By end of the week: - Know the basics of git - Make sure we can all compile and run a C++/ OpenGL program - Understand the OpenGL rendering pipeline - Understand how matrices are used for geometric

More information

Homework #2. Hidden Surfaces, Projections, Shading and Texture, Ray Tracing, and Parametric Curves

Homework #2. Hidden Surfaces, Projections, Shading and Texture, Ray Tracing, and Parametric Curves Computer Graphics Instructor: Brian Curless CSE 457 Spring 2013 Homework #2 Hidden Surfaces, Projections, Shading and Texture, Ray Tracing, and Parametric Curves Assigned: Sunday, May 12 th Due: Thursday,

More information

CSE 167: Introduction to Computer Graphics Lecture #11: Bezier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

CSE 167: Introduction to Computer Graphics Lecture #11: Bezier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 CSE 167: Introduction to Computer Graphics Lecture #11: Bezier Curves Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 Announcements Project 3 due tomorrow Midterm 2 next

More information

CS 536 Computer Graphics Intro to Curves Week 1, Lecture 2

CS 536 Computer Graphics Intro to Curves Week 1, Lecture 2 CS 536 Computer Graphics Intro to Curves Week 1, Lecture 2 David Breen, William Regli and Maxim Peysakhov Department of Computer Science Drexel University 1 Outline Math review Introduction to 2D curves

More information

2D Spline Curves. CS 4620 Lecture 18

2D Spline Curves. CS 4620 Lecture 18 2D Spline Curves CS 4620 Lecture 18 2014 Steve Marschner 1 Motivation: smoothness In many applications we need smooth shapes that is, without discontinuities So far we can make things with corners (lines,

More information

Fall CSCI 420: Computer Graphics. 4.2 Splines. Hao Li.

Fall CSCI 420: Computer Graphics. 4.2 Splines. Hao Li. Fall 2014 CSCI 420: Computer Graphics 4.2 Splines Hao Li http://cs420.hao-li.com 1 Roller coaster Next programming assignment involves creating a 3D roller coaster animation We must model the 3D curve

More information

Intro to Curves Week 4, Lecture 7

Intro to Curves Week 4, Lecture 7 CS 430/536 Computer Graphics I Intro to Curves Week 4, Lecture 7 David Breen, William Regli and Maxim Peysakhov Geometric and Intelligent Computing Laboratory Department of Computer Science Drexel University

More information

Know it. Control points. B Spline surfaces. Implicit surfaces

Know it. Control points. B Spline surfaces. Implicit surfaces Know it 15 B Spline Cur 14 13 12 11 Parametric curves Catmull clark subdivision Parametric surfaces Interpolating curves 10 9 8 7 6 5 4 3 2 Control points B Spline surfaces Implicit surfaces Bezier surfaces

More information

Rasterization Overview

Rasterization Overview Rendering Overview The process of generating an image given a virtual camera objects light sources Various techniques rasterization (topic of this course) raytracing (topic of the course Advanced Computer

More information

Computer Graphics I Lecture 11

Computer Graphics I Lecture 11 15-462 Computer Graphics I Lecture 11 Midterm Review Assignment 3 Movie Midterm Review Midterm Preview February 26, 2002 Frank Pfenning Carnegie Mellon University http://www.cs.cmu.edu/~fp/courses/graphics/

More information

Basic GPU techniques Josef Pelikán CGG MFF UK Praha.

Basic GPU techniques Josef Pelikán CGG MFF UK Praha. Basic GPU techniques 2005-2018 Josef Pelikán CGG MFF UK Praha pepca@cgg.mff.cuni.cz http://cgg.mff.cuni.cz/~pepca/ Basic GPU 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 1 / 22 Content visibility

More information

08 - Designing Approximating Curves

08 - Designing Approximating Curves 08 - Designing Approximating Curves Acknowledgement: Olga Sorkine-Hornung, Alexander Sorkine-Hornung, Ilya Baran Last time Interpolating curves Monomials Lagrange Hermite Different control types Polynomials

More information

Transformations Week 9, Lecture 18

Transformations Week 9, Lecture 18 CS 536 Computer Graphics Transformations Week 9, Lecture 18 2D Transformations David Breen, William Regli and Maxim Peysakhov Department of Computer Science Drexel University 1 3 2D Affine Transformations

More information

Visual Recognition: Image Formation

Visual Recognition: Image Formation Visual Recognition: Image Formation Raquel Urtasun TTI Chicago Jan 5, 2012 Raquel Urtasun (TTI-C) Visual Recognition Jan 5, 2012 1 / 61 Today s lecture... Fundamentals of image formation You should know

More information

Intro to Curves Week 1, Lecture 2

Intro to Curves Week 1, Lecture 2 CS 536 Computer Graphics Intro to Curves Week 1, Lecture 2 David Breen, William Regli and Maxim Peysakhov Department of Computer Science Drexel University Outline Math review Introduction to 2D curves

More information

Splines. Parameterization of a Curve. Curve Representations. Roller coaster. What Do We Need From Curves in Computer Graphics? Modeling Complex Shapes

Splines. Parameterization of a Curve. Curve Representations. Roller coaster. What Do We Need From Curves in Computer Graphics? Modeling Complex Shapes CSCI 420 Computer Graphics Lecture 8 Splines Jernej Barbic University of Southern California Hermite Splines Bezier Splines Catmull-Rom Splines Other Cubic Splines [Angel Ch 12.4-12.12] Roller coaster

More information

ECE 600, Dr. Farag, Summer 09

ECE 600, Dr. Farag, Summer 09 ECE 6 Summer29 Course Supplements. Lecture 4 Curves and Surfaces Aly A. Farag University of Louisville Acknowledgements: Help with these slides were provided by Shireen Elhabian A smile is a curve that

More information

Representing Curves Part II. Foley & Van Dam, Chapter 11

Representing Curves Part II. Foley & Van Dam, Chapter 11 Representing Curves Part II Foley & Van Dam, Chapter 11 Representing Curves Polynomial Splines Bezier Curves Cardinal Splines Uniform, non rational B-Splines Drawing Curves Applications of Bezier splines

More information

CSE 167: Introduction to Computer Graphics Lecture #13: Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

CSE 167: Introduction to Computer Graphics Lecture #13: Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017 CSE 167: Introduction to Computer Graphics Lecture #13: Curves Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017 Announcements Project 4 due Monday Nov 27 at 2pm Next Tuesday:

More information

CS 445 / 645 Introduction to Computer Graphics. Lecture 21 Representing Rotations

CS 445 / 645 Introduction to Computer Graphics. Lecture 21 Representing Rotations CS 445 / 645 Introduction to Computer Graphics Lecture 21 Representing Rotations Parameterizing Rotations Straightforward in 2D A scalar, θ, represents rotation in plane More complicated in 3D Three scalars

More information

Curves D.A. Forsyth, with slides from John Hart

Curves D.A. Forsyth, with slides from John Hart Curves D.A. Forsyth, with slides from John Hart Central issues in modelling Construct families of curves, surfaces and volumes that can represent common objects usefully; are easy to interact with; interaction

More information

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL International Edition Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL Sixth Edition Edward Angel Dave Shreiner Interactive Computer Graphics: A Top-Down Approach with Shader-Based

More information

Fundamentals of Computer Animation

Fundamentals of Computer Animation Fundamentals of Computer Animation Quaternions as Orientations () page 1 Multiplying Quaternions q1 = (w1, x1, y1, z1); q = (w, x, y, z); q1 * q = ( w1.w - v1.v, w1.v + w.v1 + v1 X v) where v1 = (x1, y1,

More information

1 Transformations. Chapter 1. Transformations. Department of Computer Science and Engineering 1-1

1 Transformations. Chapter 1. Transformations. Department of Computer Science and Engineering 1-1 Transformations 1-1 Transformations are used within the entire viewing pipeline: Projection from world to view coordinate system View modifications: Panning Zooming Rotation 1-2 Transformations can also

More information

Hierarchical Models Josef Pelikán & Alexander Wilkie CGG MFF UK Praha

Hierarchical Models Josef Pelikán & Alexander Wilkie CGG MFF UK Praha Hierarchical Models 1995-2015 Josef Pelikán & Alexander Wilkie CGG MFF UK Praha pepca@cgg.mff.cuni.cz http://cgg.mff.cuni.cz/~pepca/ 1 / 16 Hierarchies for 3D Modeling Bottom-up modeling Complex models

More information

Applications of Dual Quaternions in Three Dimensional Transformation and Interpolation

Applications of Dual Quaternions in Three Dimensional Transformation and Interpolation Applications of Dual Quaternions in Three Dimensional Transformation and Interpolation November 11, 2013 Matthew Smith mrs126@uclive.ac.nz Department of Computer Science and Software Engineering University

More information

Curves and Surfaces. Shireen Elhabian and Aly A. Farag University of Louisville

Curves and Surfaces. Shireen Elhabian and Aly A. Farag University of Louisville Curves and Surfaces Shireen Elhabian and Aly A. Farag University of Louisville February 21 A smile is a curve that sets everything straight Phyllis Diller (American comedienne and actress, born 1917) Outline

More information

Freeform Curves on Spheres of Arbitrary Dimension

Freeform Curves on Spheres of Arbitrary Dimension Freeform Curves on Spheres of Arbitrary Dimension Scott Schaefer and Ron Goldman Rice University 6100 Main St. Houston, TX 77005 sschaefe@rice.edu and rng@rice.edu Abstract Recursive evaluation procedures

More information

INF3320 Computer Graphics and Discrete Geometry

INF3320 Computer Graphics and Discrete Geometry INF3320 Computer Graphics and Discrete Geometry More smooth Curves and Surfaces Christopher Dyken, Michael Floater and Martin Reimers 10.11.2010 Page 1 More smooth Curves and Surfaces Akenine-Möller, Haines

More information

3D Transformations World Window to Viewport Transformation Week 2, Lecture 4

3D Transformations World Window to Viewport Transformation Week 2, Lecture 4 CS 430/536 Computer Graphics I 3D Transformations World Window to Viewport Transformation Week 2, Lecture 4 David Breen, William Regli and Maxim Peysakhov Geometric and Intelligent Computing Laboratory

More information

Computer Graphics with OpenGL ES (J. Han) Chapter IV Spaces and Transforms

Computer Graphics with OpenGL ES (J. Han) Chapter IV Spaces and Transforms Chapter IV Spaces and Transforms Scaling 2D scaling with the scaling factors, s x and s y, which are independent. Examples When a polygon is scaled, all of its vertices are processed by the same scaling

More information

Parametric curves. Brian Curless CSE 457 Spring 2016

Parametric curves. Brian Curless CSE 457 Spring 2016 Parametric curves Brian Curless CSE 457 Spring 2016 1 Reading Required: Angel 10.1-10.3, 10.5.2, 10.6-10.7, 10.9 Optional Bartels, Beatty, and Barsky. An Introduction to Splines for use in Computer Graphics

More information

CS354 Computer Graphics Rotations and Quaternions

CS354 Computer Graphics Rotations and Quaternions Slide Credit: Don Fussell CS354 Computer Graphics Rotations and Quaternions Qixing Huang April 4th 2018 Orientation Position and Orientation The position of an object can be represented as a translation

More information

Rational Bezier Curves

Rational Bezier Curves Rational Bezier Curves Use of homogeneous coordinates Rational spline curve: define a curve in one higher dimension space, project it down on the homogenizing variable Mathematical formulation: n P(u)

More information

CS130 : Computer Graphics Curves (cont.) Tamar Shinar Computer Science & Engineering UC Riverside

CS130 : Computer Graphics Curves (cont.) Tamar Shinar Computer Science & Engineering UC Riverside CS130 : Computer Graphics Curves (cont.) Tamar Shinar Computer Science & Engineering UC Riverside Blending Functions Blending functions are more convenient basis than monomial basis canonical form (monomial

More information

12.1 Quaternions and Rotations

12.1 Quaternions and Rotations Fall 2015 CSCI 420 Computer Graphics 12.1 Quaternions and Rotations Hao Li http://cs420.hao-li.com 1 Rotations Very important in computer animation and robotics Joint angles, rigid body orientations, camera

More information

Splines & Quaternions (splines.txt) by Jochen Wilhelmy a.k.a. digisnap

Splines & Quaternions (splines.txt) by Jochen Wilhelmy a.k.a. digisnap Splines & Quaternions (splines.txt) ----------------------------------- by Jochen Wilhelmy a.k.a. digisnap digisnap@cs.tu-berlin.de 06.08.1997 Introduction ============ This text describes the spline and

More information

3D Kinematics. Consists of two parts

3D Kinematics. Consists of two parts D Kinematics Consists of two parts D rotation D translation The same as D D rotation is more complicated than D rotation (restricted to z-ais) Net, we will discuss the treatment for spatial (D) rotation

More information

Splines. Connecting the Dots

Splines. Connecting the Dots Splines or: Connecting the Dots Jens Ogniewski Information Coding Group Linköping University Before we start... Some parts won t be part of the exam Basically all that is not described in the book. More

More information

(Spline, Bezier, B-Spline)

(Spline, Bezier, B-Spline) (Spline, Bezier, B-Spline) Spline Drafting terminology Spline is a flexible strip that is easily flexed to pass through a series of design points (control points) to produce a smooth curve. Spline curve

More information

CMSC427 Transformations II: Viewing. Credit: some slides from Dr. Zwicker

CMSC427 Transformations II: Viewing. Credit: some slides from Dr. Zwicker CMSC427 Transformations II: Viewing Credit: some slides from Dr. Zwicker What next? GIVEN THE TOOLS OF The standard rigid and affine transformations Their representation with matrices and homogeneous coordinates

More information

Properties of Blending Functions

Properties of Blending Functions Chapter 5 Properties of Blending Functions We have just studied how the Bernstein polynomials serve very nicely as blending functions. We have noted that a degree n Bézier curve always begins at P 0 and

More information

Intro to Modeling Modeling in 3D

Intro to Modeling Modeling in 3D Intro to Modeling Modeling in 3D Polygon sets can approximate more complex shapes as discretized surfaces 2 1 2 3 Curve surfaces in 3D Sphere, ellipsoids, etc Curved Surfaces Modeling in 3D ) ( 2 2 2 2

More information

Visualizing Quaternions

Visualizing Quaternions Visualizing Quaternions Andrew J. Hanson Computer Science Department Indiana University Siggraph 25 Tutorial OUTLINE I: (45min) Twisting Belts, Rolling Balls, and Locking Gimbals: Explaining Rotation Sequences

More information

LECTURE #6. Geometric Modelling for Engineering Applications. Geometric modeling for engineering applications

LECTURE #6. Geometric Modelling for Engineering Applications. Geometric modeling for engineering applications LECTURE #6 Geometric modeling for engineering applications Geometric Modelling for Engineering Applications Introduction to modeling Geometric modeling Curve representation Hermite curve Bezier curve B-spline

More information

Quaternions and Rotations

Quaternions and Rotations CSCI 420 Computer Graphics Lecture 20 and Rotations Rotations Motion Capture [Angel Ch. 3.14] Rotations Very important in computer animation and robotics Joint angles, rigid body orientations, camera parameters

More information

Quaternions and Exponentials

Quaternions and Exponentials Quaternions and Exponentials Michael Kazhdan (601.457/657) HB A.6 FvDFH 21.1.3 Announcements OpenGL review II: Today at 9:00pm, Malone 228 This week's graphics reading seminar: Today 2:00-3:00pm, my office

More information

Quaternions and Rotations

Quaternions and Rotations CSCI 480 Computer Graphics Lecture 20 and Rotations April 6, 2011 Jernej Barbic Rotations Motion Capture [Ch. 4.12] University of Southern California http://www-bcf.usc.edu/~jbarbic/cs480-s11/ 1 Rotations

More information

Interactive Graphics. Lecture 9: Introduction to Spline Curves. Interactive Graphics Lecture 9: Slide 1

Interactive Graphics. Lecture 9: Introduction to Spline Curves. Interactive Graphics Lecture 9: Slide 1 Interactive Graphics Lecture 9: Introduction to Spline Curves Interactive Graphics Lecture 9: Slide 1 Interactive Graphics Lecture 13: Slide 2 Splines The word spline comes from the ship building trade

More information

Geometric Transformations

Geometric Transformations Geometric Transformations CS 4620 Lecture 9 2017 Steve Marschner 1 A little quick math background Notation for sets, functions, mappings Linear and affine transformations Matrices Matrix-vector multiplication

More information

Parametric curves. Reading. Curves before computers. Mathematical curve representation. CSE 457 Winter Required:

Parametric curves. Reading. Curves before computers. Mathematical curve representation. CSE 457 Winter Required: Reading Required: Angel 10.1-10.3, 10.5.2, 10.6-10.7, 10.9 Parametric curves CSE 457 Winter 2014 Optional Bartels, Beatty, and Barsky. An Introduction to Splines for use in Computer Graphics and Geometric

More information

CS451Real-time Rendering Pipeline

CS451Real-time Rendering Pipeline 1 CS451Real-time Rendering Pipeline JYH-MING LIEN DEPARTMENT OF COMPUTER SCIENCE GEORGE MASON UNIVERSITY Based on Tomas Akenine-Möller s lecture note You say that you render a 3D 2 scene, but what does

More information

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics Parametric Curves University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Parametric Representations 3 basic representation strategies: Explicit: y = mx + b Implicit: ax + by + c

More information

Le s s on 02. Basic methods in Computer Animation

Le s s on 02. Basic methods in Computer Animation Le s s on 02 Basic methods in Computer Animation Lesson 02 Outline Key-framing and parameter interpolation Skeleton Animation Forward and inverse Kinematics Procedural techniques Motion capture Key-framing

More information

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Parametric Curves University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Parametric Representations 3 basic representation strategies: Explicit: y = mx + b Implicit: ax + by + c

More information

09 - Designing Surfaces. CSCI-GA Computer Graphics - Fall 16 - Daniele Panozzo

09 - Designing Surfaces. CSCI-GA Computer Graphics - Fall 16 - Daniele Panozzo 9 - Designing Surfaces Triangular surfaces A surface can be discretized by a collection of points and triangles Each triangle is a subset of a plane Every point on the surface can be expressed as an affine

More information

Sung-Eui Yoon ( 윤성의 )

Sung-Eui Yoon ( 윤성의 ) CS480: Computer Graphics Curves and Surfaces Sung-Eui Yoon ( 윤성의 ) Course URL: http://jupiter.kaist.ac.kr/~sungeui/cg Today s Topics Surface representations Smooth curves Subdivision 2 Smooth Curves and

More information

OpenGL Transformations

OpenGL Transformations OpenGL Transformations R. J. Renka Department of Computer Science & Engineering University of North Texas 02/18/2014 Introduction The most essential aspect of OpenGL is the vertex pipeline described in

More information

End-Term Examination

End-Term Examination Paper Code: MCA-108 Paper ID : 44108 Second Semester [MCA] MAY-JUNE 2006 Q. 1 Describe the following in brief :- (3 x 5 = 15) (a) QUADRATIC SURFACES (b) RGB Color Models. (c) BSP Tree (d) Solid Modeling

More information

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner GLOBAL EDITION Interactive Computer Graphics A Top-Down Approach with WebGL SEVENTH EDITION Edward Angel Dave Shreiner This page is intentionally left blank. Interactive Computer Graphics with WebGL, Global

More information

To Do. Outline. Translation. Homogeneous Coordinates. Foundations of Computer Graphics. Representation of Points (4-Vectors) Start doing HW 1

To Do. Outline. Translation. Homogeneous Coordinates. Foundations of Computer Graphics. Representation of Points (4-Vectors) Start doing HW 1 Foundations of Computer Graphics Homogeneous Coordinates Start doing HW 1 To Do Specifics of HW 1 Last lecture covered basic material on transformations in 2D Likely need this lecture to understand full

More information

Part II: OUTLINE. Visualizing Quaternions. Part II: Visualizing Quaternion Geometry. The Spherical Projection Trick: Visualizing unit vectors.

Part II: OUTLINE. Visualizing Quaternions. Part II: Visualizing Quaternion Geometry. The Spherical Projection Trick: Visualizing unit vectors. Visualizing Quaternions Part II: Visualizing Quaternion Geometry Andrew J. Hanson Indiana University Part II: OUTLINE The Spherical Projection Trick: Visualizing unit vectors. Quaternion Frames Quaternion

More information

Computer Graphics Splines and Curves

Computer Graphics Splines and Curves Computer Graphics 2015 9. Splines and Curves Hongxin Zhang State Key Lab of CAD&CG, Zhejiang University 2015-11-23 About homework 3 - an alternative solution with WebGL - links: - WebGL lessons http://learningwebgl.com/blog/?page_id=1217

More information

Graphics and Interaction Transformation geometry and homogeneous coordinates

Graphics and Interaction Transformation geometry and homogeneous coordinates 433-324 Graphics and Interaction Transformation geometry and homogeneous coordinates Department of Computer Science and Software Engineering The Lecture outline Introduction Vectors and matrices Translation

More information

Graphics Pipeline 2D Geometric Transformations

Graphics Pipeline 2D Geometric Transformations Graphics Pipeline 2D Geometric Transformations CS 4620 Lecture 8 1 Plane projection in drawing Albrecht Dürer 2 Plane projection in drawing source unknown 3 Rasterizing triangles Summary 1 evaluation of

More information

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates Department of Computer Science and Software Engineering The Lecture outline Introduction Vectors and matrices Translation

More information

2D transformations: An introduction to the maths behind computer graphics

2D transformations: An introduction to the maths behind computer graphics 2D transformations: An introduction to the maths behind computer graphics Lecturer: Dr Dan Cornford d.cornford@aston.ac.uk http://wiki.aston.ac.uk/dancornford CS2150, Computer Graphics, Aston University,

More information

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016 Computergrafik Matthias Zwicker Universität Bern Herbst 2016 Today Curves NURBS Surfaces Parametric surfaces Bilinear patch Bicubic Bézier patch Advanced surface modeling 2 Piecewise Bézier curves Each

More information

Shape modeling Modeling technique Shape representation! 3D Graphics Modeling Techniques

Shape modeling Modeling technique Shape representation! 3D Graphics   Modeling Techniques D Graphics http://chamilo2.grenet.fr/inp/courses/ensimag4mmgd6/ Shape Modeling technique Shape representation! Part : Basic techniques. Projective rendering pipeline 2. Procedural Modeling techniques Shape

More information

CS 130 Final. Fall 2015

CS 130 Final. Fall 2015 CS 130 Final Fall 2015 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is trying

More information

a a= a a =a a 1 =1 Division turned out to be equivalent to multiplication: a b= a b =a 1 b

a a= a a =a a 1 =1 Division turned out to be equivalent to multiplication: a b= a b =a 1 b MATH 245 Extra Effort ( points) My assistant read through my first draft, got half a page in, and skipped to the end. So I will save you the flipping. Here is the assignment. Do just one of them. All the

More information

Notes on Computer Graphics and OpenGL. Thomas Strathmann

Notes on Computer Graphics and OpenGL. Thomas Strathmann Notes on Computer Graphics and OpenGL Thomas Strathmann February 2, 2011 Preface The purpose of this document is to server as a sort of logbook in which I put down all the interesting math and assorted

More information

Advanced Computer Graphics Transformations. Matthias Teschner

Advanced Computer Graphics Transformations. Matthias Teschner Advanced Computer Graphics Transformations Matthias Teschner Motivation Transformations are used To convert between arbitrary spaces, e.g. world space and other spaces, such as object space, camera space

More information

Computer Graphics. 2.1 Mathematics

Computer Graphics. 2.1 Mathematics 2 Computer Graphics What You Will Learn: The objectives of this chapter are quite ambitious; you should refer to the references cited in each Section to get a deeper explanation of the topics presented.

More information

Spline Notes. Marc Olano University of Maryland, Baltimore County. February 20, 2004

Spline Notes. Marc Olano University of Maryland, Baltimore County. February 20, 2004 Spline Notes Marc Olano University of Maryland, Baltimore County February, 4 Introduction I. Modeled after drafting tool A. Thin strip of wood or metal B. Control smooth curved path by running between

More information

Computer Graphics Lecture 5

Computer Graphics Lecture 5 1 / 25 Computer Graphics Lecture 5 Dr. Marc Eduard Frîncu West University of Timisoara Mar 27th 2012 2 / 25 Outline 1 Graphical Primitives Drawing Surfaces 2 Assignment 3 Recap 3 / 25 Graphical Primitives

More information

3D Viewing. CS 4620 Lecture 8

3D Viewing. CS 4620 Lecture 8 3D Viewing CS 46 Lecture 8 13 Steve Marschner 1 Viewing, backward and forward So far have used the backward approach to viewing start from pixel ask what part of scene projects to pixel explicitly construct

More information

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CSE528 Computer Graphics: Theory, Algorithms, and Applications CSE528 Computer Graphics: Theory, Algorithms, and Applications Hong Qin Stony Brook University (SUNY at Stony Brook) Stony Brook, New York 11794-2424 Tel: (631)632-845; Fax: (631)632-8334 qin@cs.stonybrook.edu

More information

Fundamentals of 3D. Lecture 3: Debriefing: Lecture 2 Rigid transformations Quaternions Iterative Closest Point (+Kd-trees)

Fundamentals of 3D. Lecture 3: Debriefing: Lecture 2 Rigid transformations Quaternions Iterative Closest Point (+Kd-trees) INF555 Fundamentals of 3D Lecture 3: Debriefing: Lecture 2 Rigid transformations Quaternions Iterative Closest Point (+Kd-trees) Frank Nielsen nielsen@lix.polytechnique.fr Harris-Stephens' combined corner/edge

More information

Rotations in 3D Graphics and the Gimbal Lock

Rotations in 3D Graphics and the Gimbal Lock Rotations in 3D Graphics and the Gimbal Lock Valentin Koch Autodesk Inc. January 27, 2016 Valentin Koch (ADSK) IEEE Okanagan January 27, 2016 1 / 37 Presentation Road Map 1 Introduction 2 Rotation Matrices

More information

Curves and Surfaces 1

Curves and Surfaces 1 Curves and Surfaces 1 Representation of Curves & Surfaces Polygon Meshes Parametric Cubic Curves Parametric Bi-Cubic Surfaces Quadric Surfaces Specialized Modeling Techniques 2 The Teapot 3 Representing

More information

Computer Vision Projective Geometry and Calibration. Pinhole cameras

Computer Vision Projective Geometry and Calibration. Pinhole cameras Computer Vision Projective Geometry and Calibration Professor Hager http://www.cs.jhu.edu/~hager Jason Corso http://www.cs.jhu.edu/~jcorso. Pinhole cameras Abstract camera model - box with a small hole

More information