Chap 3 Viewing Pipeline Reading: Angel s Interactive Computer Graphics, Sixth ed. Sections 4.1~4.7

Size: px
Start display at page:

Download "Chap 3 Viewing Pipeline Reading: Angel s Interactive Computer Graphics, Sixth ed. Sections 4.1~4.7"

Transcription

1 Chap 3 Viewing Pipeline Reading: Angel s Interactive Computer Graphics, Sixth ed. Sections 4.~4.7 Chap 3 View Pipeline, Comp. Graphics (U) CGGM Lab., CS Dept., NCTU Jung Hong Chuang

2 Outline View parameters setting Projection in OpenGL Simple perspective/parallel projection Perspective-projection matrix View volume clipping Chap 3, View Pipeline (CG-U) 2 CGGM Lab.,CS Dept.,NCTU, Jung Hong Chuang

3 Viewing Pipeline Review.. View projection View transform View-Volume Clipping in homogeneous space Window-viewport mapping Chap 3, View Pipeline (CG-U) 3 CGGM Lab.,CS Dept.,NCTU, Jung Hong Chuang

4 A Practical Viewing System Review.. Users specify Parameters for view coordinate system A camera position C a viewing direction vector N an upvector V. View volume information Projection type A view plane distance d (= near clipping plane distance), and a far clipping plane distance f. A view window on the view plane Chap 3, View Pipeline (CG-U) 4 CGGM Lab.,CS Dept.,NCTU, Jung Hong Chuang

5 Viewing Parameters Review.. -n View coordinate system World coordinate system Here, without near and far clipping planes Chap 3, View Pipeline (CG-U) 5 CGGM Lab.,CS Dept.,NCTU, Jung Hong Chuang

6 OpenGL Setting for viewing system - In OpenGL, glulookat() function alters the model-view matrix glulookat(eyex,eyey,eye,atx,aty,at,upx,upy,up) By default a camera at the origin of the word frame pointing in the - direction the model-view matrix is initially an identity matrix. Chap 3, View Pipeline (CG-U) 6 CGGM Lab.,CS Dept.,NCTU, Jung Hong Chuang

7 OpenGL Setting for viewing system -2 Look-at function Eyepoint eye, specified in the world frame, determines VRP At point at, specified in the world frame Up vector up glulookat(eyex,eyey,eye,atx,aty,at,upx,upy,up) Defines the model-view matrix glmatrixmode(gl_modelview) glloadidentity(); glulookat(eyex,eyey,eye,atx,aty,at,upx,upy,up) Chap 3, View Pipeline (CG-U) 7 CGGM Lab.,CSIE Dept.,NCTU Jung Hong Chuang

8 OpenGL Setting for viewing system -3 Derive (u,v,n) defined in world coor. sys. n = eye - at Negative of viewing direction N v: view up vector up if up is perpendicular to n u = v x n up may not be perpendicular to n v = up - its projection in direction of n, or First do u = up x n, then v=n x u Chap 3, View Pipeline (CG-U) 8 CGGM Lab.,CSIE Dept.,NCTU Jung Hong Chuang

9 OpenGL Setting for viewing system -4 Chap 3, View Pipeline (CG-U) 9 CGGM Lab.,CSIE Dept.,NCTU Jung Hong Chuang

10 OpenGL Specifying projection information Properties of camera focal length of lens or the sie of the film plane, i.e., angle of view. Projection parameters Projection type View frustum View plane distance Window or angle of view Front and back clipping plane distances near (>), far (>) Chap 3, View Pipeline (CG-U) CGGM Lab.,CSIE Dept.,NCTU Jung Hong Chuang

11 Viewing Pipeline - Review.. View transform Tview world coord. sys. -> view coord. sys. For simpler and faster clipping and projection Chap 3, View Pipeline (CG-U) CGGM Lab.,CS Dept.,NCTU, Jung Hong Chuang

12 Viewing Pipeline - 2 Review.. View transform View transform matrix T view [ x v, y v, v, ] = Tview [x w, y w, w, ] T T view can be written as T view = B T, where T(-C) translates the world coordinate origin to C. B rotates any vector expressed in the world coordinate system into the view coordinate system by mapping (u,v,n) to (e,e 2,e 3 ). Chap 3, View Pipeline (CG-U) 2 CGGM Lab.,CS Dept.,NCTU, Jung Hong Chuang

13 Chap 3, View Pipeline (CG-U) 3 CGGM Lab.,CS Dept., NCTU, Jung Hong Chuang Viewing Pipeline - 3 View transform : maps the eye to (,,) y x y x eye eye eye T eye eye eye T T

14 Chap 3, View Pipeline (CG-U) 4 CGGM Lab., CS Dept., NCTU, Jung Hong Chuang Viewing Pipeline - 4 View transform So are orthonormal,,and, Since to ( ) to (), to ( ), : maps y x y x y x y x y x y x y y y x x x n n n v v v u u u B n n n v v v u u u B n v u n v u n v u n v u B,, n,, v,, u B

15 Viewing Pipeline - 5 Review.. View projection view coord. sys. -> screen coord. sys. Convert view volume to normalied view volume and then do orthogonal projection Why and How? - Mapping view volume to normalied view volume. Easy view-volume clipping and projection, and Standard sied window. - Chap 3, View Pipeline (CG-U) 5 CGGM Lab., CS Dept., NCTU, Jung Hong Chuang

16 Projection normaliation - Eye coordinate system: right-handed system Viewing direction: - Normalied device coord.: left-handed system Viewing direction: + Chap 3, View Pipeline (CG-U) 6 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

17 Projection normaliation -2 = Perspective projection Orthogonal projection of the distorted object Chap 3, View Pipeline (CG-U) 7 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

18 Projection normaliation -3 Projection normaliation Converts all projections into orthogonal projection by distorting the objects such that the orthogonal projection of the distorted objects is the same as the desired projection of the original objects. Converting view volume to normalied view volume, followed by the orthogonal projection Reasons Easy for view volume clipping Normaliation let us clip against a simple cube regardless of type of projection Chap 3, View Pipeline (CG-U) 8 CGGM Lab., CS Dept.,NCTU Jung Hong Chuang

19 Projection normaliation -4 Reasons Easy for view volume/back-face culling The nonsingular homogeneous transformation retains meaningful depth value along the projectors that is necessary for HSR. Rather than derive a different projection matrix for each type of projection, we can convert all projections to orthogonal projections with the default view volume, allowing us to use standard transformations in the pipeline Chap 3, View Pipeline (CG-U) 9 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

20 Projection normaliation -5 Reasons This strategy allows us to use standard transformations in the pipeline and makes for efficient clipping Delay final projection until end Important for hidden-surface removal to retain depth information as long as possible Chap 3, View Pipeline (CG-U) 2 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

21 Projection normaliation -6 Perspective projection is broken into two parts Perspective transformation + perspective division (back to 3D) Converts the view volume to a normalied view volume, called canonical view volume Objects are distorted in a manner that yields the desired projection through the second step. Orthogonal projection of the distorted objects Need to make sure Correct projection Meaningful depth Chap 3, View Pipeline (CG-U) 2 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

22 Projection normaliation -7 Perspective transformation = Perspective projection = Perspective transform + perspective division + orthographic projection Perspective projection Orthogonal projection of the distorted object Chap 3, View Pipeline (CG-U) 22 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

23 Simple perspective projection (w/o view volume) - In 3D: x x y y p p p d d d -d x y p p xd yd -d d is the distance from eye to view plane Nonlinear!! No matrix form!! -d -d Chap 3, View Pipeline (CG-U) 23 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

24 Simple perspective projection (w/o view volume) -2 Perspective projection Preserves lines, but it is nonlinear, not affine No meaningful depth is preserved Can actually decompose the perspective projection into perspective projection (in 3D) = perspective transform (linear, in homo. coord.) + perspective division + orthographic proj. [Here, depth is still not preserved!!!] Chap 3, View Pipeline (CG-U) 24 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

25 Chap 3, View Pipeline (CG-U) 25 CGGM Lab., CS Dept., NCTU Jung Hong Chuang Simple perspective projection (w/o view volume) -3 Perspective transform M : in homo. coord. Perspective division (de-homogeniation) / / y x d Mp d y x q d d yd y xd x p p p

26 What we are going to do? First derive the perspective transform matrix for a right view volume Show that it does the same projection as the original perspective projection It converts the right view volume to a normalied view volume It preserves a meaningful depth Extend the result to general perspective view volumes Chap 3, View Pipeline (CG-U) 26 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

27 Perspective normaliation transformation - For a right view volume specified by Eyepoint: (,, ), view plane at =-n Planes: x=±, y=±, =-n, =-f (f>n) (symmetric, 45 o ) View window (-n, -n,- n), (n, n, -n) Assuming near plane distance n = view plane distance d Consider the nonsingular matrix N ' n n (-n,-n,-n) (n,n,-n) α, β unspecified (but nonero), used to transfer the near and far clipping planes to =- and = Chap 3, View Pipeline (CG-U) 27 CGGM Lab., CS Dept., NCTU Jung Hong Chuang =-n =-f

28 Perspective normaliation transformation -2 Apply N to point p=[x y ] T, we obtain p =[x y w ] T : x' nx, y' ny, ', After dividing by w, we have nx x ny y" " " Consider only (x, y ), w' this is the same as the simple perspective projection!! (Note that n=d) And has a meaningful depth!!!! Chap 3, View Pipeline (CG-U) 28 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

29 Perspective normaliation transformation -3 Chap 3, View Pipeline (CG-U) 29 CGGM Lab., CS Dept., NCTU Jung Hong Chuang Orthographic projection of distorted objects = Perspective projection of original objects! If we apply an orthographic projection along - axis to N, we obtain a simple perspectiveprojection matrix. ' n n n n N M orth view plane at =-d Don t care so is value!!!,,

30 Perspective normaliation transformation -4 Apply the above projection to p, we have p' M orth N' p nx ny x y p p nx ny This is exactly the result of a simple perspective projection for view plane at =-n So, Perspective projection = perspective transformation N + orthographic projection M orth Chap 3, View Pipeline (CG-U) 3 CGGM Lab.,CS Dept., NCTU Jung Hong Chuang

31 Perspective normaliation transformation -5 N is nonsingular and does the following x= ± is transformed to planes x = ±n (by putting x= ± in x =-nx/) y= ± is transformed to planes y = ±n (by putting y= ± in y =-ny/) =-n and =-f are transformed by N to the planes that are perpendicular to -axis, and and will be chosen such that ( n) " ( n) ( f ) " ( f ) Chap 3, View Pipeline (CG-U) 3 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

32 Chap 3, View Pipeline (CG-U) 32 CGGM Lab., CS Dept., NCTU Jung Hong Chuang Perspective normaliation transformation -6 If we select the transformed clipping planes become, respectively, " ) ( ) ( " " ) ( ) ( " f f n n n f fn n f n f 2 This choice Preserves the depth order Normalies the -values within near and far planes to [-,]

33 Perspective normaliation transformation -7 By concatenating S(,,) to N', we have n n N S, N', n n With N, the view volume will be convertedto the canonical volume and a point p [ x, y,,] will be transformed to p' x" Np [ x, so the projectedpoint and depth are x, y,, ], y" y, " view Chap 3, View Pipeline (CG-U) 33 CGGM Lab.,CSIE Dept.,NCTU Jung Hong Chuang

34 Perspective normaliation transformation ( x, y, ) ( nx, ny, ) Chap 3, View Pipeline (CG-U) 34 CGGM Lab.,CSIE Dept.,NCTU Jung Hong Chuang

35 Perspective normaliation transformation -9 Chap 3, View Pipeline (CG-U) 35 CGGM Lab.,CSIE Dept.,NCTU Jung Hong Chuang ),, ( ny nx ),, ( y x,), ( n n S,), ( n n S + +

36 Perspective normaliation transformation - The mapping " ( ) is nonlinear but preserves the ordering of depths, i.e., if > 2 in the original view volume, then < 2 : Since the original " ( Note that : In eye coord.: In NDC :, if ) and view volume and 2 is in front of "is in front of are depthsof Chap 3, View Pipeline (CG-U) 36 CGGM Lab.,CSIE Dept.,NCTU Jung Hong Chuang 2 " 2 2 2, two points 2 " within

37 Perspective normaliation transformation - Eye coordinate system: right-handed system Viewing direction: - Normalied device coord.: left-handed system Viewing direction: + See OpenGL projection matrix at Chap 3, View Pipeline (CG-U) 37 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

38 Perspective normaliation transformation -2 - = -f 2 = -n +x 2 + = +x = Z > Z 2 Z < Z 2

39 Perspective normaliation transformation -3 Hidden surface removal works if we first apply the normaliation transformation However, the formula " ( ) implies that the distances are distorted by the normaliation which can cause numerical problems especially if the near distance is small Chap 3, View Pipeline (CG-U) 39 CGGM Lab.,CSIE Dept.,NCTU Jung Hong Chuang

40 Perspective normaliation transformation -4 Chap 3, View Pipeline (CG-U) 4 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

41 Perspective normaliation transformation -5 Properties of perspective transformation N Preserves lines and flatness. Preserves in-between-ness If a point inside an object, the transformed point will be inside the transformed object. Preserves depth order with its pseudo-depth. Warps objects such that the orthographic projection of the warped object = perspective projection of the original one. Warps the view volume to the canonical view volume Chap 3, View Pipeline (CG-U) 4 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

42 Perspective normaliation transformation -6 N transforms the right view volume to the canonical view volume (after perspective division), and an orthographic projection in the transformed volume yields the same image as does the perspective projection (Consider only x, y-value). N is called perspective transformation matrix. - + Chap 3, View Pipeline (CG-U) 42 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

43 Perspective normaliation transformation -7 For an asymmetric, not right view volume (whose face planes are not x=±, y=±), we need to do a shear transformation H and a scaling S before applying N. Chap 3, View Pipeline (CG-U) 43 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

44 Perspective normaliation transformation -8 The shear transformation H shears the point (( l r)/ 2, ( b t) / 2, n) to (,, n) by l r x' x 2, y' n that is, H (cot,cot) y b t 2 n l r H 2n b t, 2n Since <, (l+r)/(2n) must be < when (l+r)< to make a move to the right. (l+r)/(2n) must be > when (l+r)> to make a left move. Chap 3, View Pipeline (CG-U) 44 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

45 Perspective normaliation transformation -9 Review of shear transformation x' y' ' x y y cot shear the point to (,, n (( l r)/ 2, ( b t) / 2, n) ) Since for -n, ( l r) / 2 cot cot ( l r) / n 2 l r 2n Chap 3, View Pipeline (CG-U) 45 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

46 Perspective normaliation transformation -2,n Sheared by ( l r) / 2 n l r, n 2 n Chap 3, View Pipeline (CG-U) 46 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

47 Perspective normaliation transformation -2 The scaling transformation S Scale the sheared view volume defined by x ( r l) 2( n), y ( t b) 2( n), f, n to a symmetric-right view volume ( x, y ) without changing the near and far planes. Scaling matrix (derived using 4 corners of the window on the near plane) S 2n r l, 2n t b, Positive scaling factors!! Chap 3, View Pipeline (CG-U) 47 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

48 Perspective normaliation transformation -22 Scaled by x min x 2 max min n, n Scale factor: divide by (r-l)/2, then multiply by n n Scaled by x min x 2 max min r l, n 2 Chap 3, View Pipeline (CG-U) 48 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

49 Perspective normaliation transformation -23 Projection matrix is P NSH Precisely the projection matrix that OpenGL creates when glufrustum() is executed. P NSH Chap 3, View Pipeline (CG-U) 49 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

50 Chap 3, View Pipeline (CG-U) 5 CGGM Lab., CS Dept., NCTU Jung Hong Chuang Perspective normaliation transformation ) ( 2 2 n f fn n f f b n t b t b t n l r l r l r n NSH P

51 Another derivation of N - from pseudo-depth Simple perspective transformation xn yn transforms ( x, y, ) to (,, n) A pseudo-depth is desired No depth!! Has a meaningful depth function with the same denominator as x and y, and hence apply the same transformation matrix. so try transforms ( x, y, ) to xn (, yn, ) for some and Chap 3, View Pipeline (CG-U) 5 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

52 Another derivation of N -2 from pseudo-depth For the transformation transforms ( x, y, ) to xn (, yn We choose and such that the pseudo-depth varies between - and. Depth=- for =-n, Depth= for =-f, ) for some and ( f n) f n, f 2 fn n Chap 3, View Pipeline (CG-U) 52 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

53 OpenGL Canonical view volume Canonical view volume A cube whose center is at the origin of the window coordinate and whose faces are given by 6 planes: x=, -, y=, -, =, -. Canonical view volume is the default in OpenGL (result of glfrustum() and glortho()), or obtained by glmatrixmode(gl_projection); glloadidentity(); glortho(-.,., -.,., -.,.); =-. is the near plane =. is the far plane Chap 3, View Pipeline (CG-U) 53 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

54 OpenGL Perspective projection - For general symmetric view volume gluperspective(fovy, aspect, near, far) Produces a projection matrix that converts the symmetric view volume to the symmetric-right one by a scaling transformation S, and to a canonical view volume by a N. Produces P = NS Chap 3, View Pipeline (CG-U) 54 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

55 OpenGL Perspective projection -2 view plane aspect = w/h Chap 3, View Pipeline (CG-U) 55 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

56 OpenGL Perspective projection -3 For asymmetric volume glfrustum(l, r, b, t, n, f) Produces a projection matrix that converts the asymmetric view volume to the symmetric-right one by a shear transformation H followed by a scaling transformation S, and to a canonical view volume by a N Produces P = NSH Chap 3, View Pipeline (CG-U) 56 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

57 Orthogonal projections - What is the projection matrix? Move the center of the specified view volume to the center of the canonical view volume by T( ( xmax xmin ) / 2, ( ymax ymin ) / 2, ( max min Scale the sides by S( 2/( xmax xmin ),2/( ymax ymin ),2/( max min )) ) / 2) Chap 3, View Pipeline (CG-U) 57 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

58 Orthogonal projections -2 Projection matrix P ST x max 2 x min y max 2 y min 2 far near xmax xmin x max xmin ymax ymin y max ymin far near far near Chap 3, View Pipeline (CG-U) 58 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

59 OpenGL Orthogonal projections - OpenGL provides only orthographic projection glortho(xmin, xmax, ymin, ymax, near, far) Parameters are identical to those of glfrustum() max min max Z max = -far min = -near min Chap 3, View Pipeline (CG-U) 59 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

60 OpenGL Orthogonal projections -2 Converting general view volume defined by glortho(xmin, xmax, ymin, ymax, near, far); Produces a projection matrix that transforms the view volume to the canonical view volume. Vertices inside (outside) the original view volume are transformed by the projection matrix to the vertices inside (outside) the canonical view volume.,-) (-,-, Chap 3, View Pipeline (CG-U) 6 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

61 OpenGL Projection normaliation OpenGL Clip coordinates (homogeneous): has depth Normalied device coord. (3D): has depth Window coordinates (2D): has no depth Projection in OpenGL Part : results in a projection matrix. Followed a perspective division to convert vertices to normalied device coordinates. Part 2: do nothing, neglect. Converts to window coordinates. Chap 3, View Pipeline (CG-U) 6 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

62 Projection normaliation Oblique projection Not available in OpenGL. Characteried by the angle between the projector and the view plane. Assuming that Near and far planes parallel to the view plane Other faces parallel to the projector s direction. Chap 3, View Pipeline (CG-U) 62 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

63 Chap 3, View Pipeline (CG-U) 63 CGGM Lab., CS Dept., NCTU Jung Hong Chuang Oblique projection Projection matrix - Consider the top and side view cot tan cot tan : p p p p p y y y y x x x x P Shearing

64 Oblique projection Projection matrix -2 tan( ) x x p p tan x cot( ) tan( ) x cot( ) x p x cot x x p Shearing Note that : cot( ) tan( ) cot( ) tan Chap 3, View Pipeline (CG-U) 64 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

65 Chap 3, View Pipeline (CG-U) 65 CGGM Lab., CS Dept., NCTU Jung Hong Chuang Oblique projection Projection matrix -3 For view volume with unit length and origin as center P can be broken into two matrices M orth is orthographic projection, H() is a shear matrix cot cot ), ( cot cot H M P orth

66 Oblique projection Projection matrix -4 M orth Chap 3, View Pipeline (CG-U) 66 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

67 Oblique projection Projection matrix -5 For general oblique projection A shear of the object by H(θ,Φ) A translation and a scaling (convert the sheared view volume to the canonical view volume) An orthographic projection Projection matrix P M orth S T H(, ) Chap 3, View Pipeline (CG-U) 67 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

68 View volume clipping - Clip against canonical view volume? It is parameter free, uses only - and. Planes are aligned with coordinate axes. Why in homogeneous space? Clipping in HS isn t completely necessary, but it makes the clipping clean, fast, and simple, at almost no cost. Done after perspective division Signs of x (or y, ) and w are lost. Can tell only if x and w have the same or opposite signs. Chap 3, View Pipeline (CG-U) 68 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

69 View volume clipping -2 Situations that necessitate clipping in HS involve Particular transformation of objects or the construction of rational surfaces such that the point has a negative w, even the point is in front of the eye. Clipping in 3D is correct only when w> In HS: two clip regions A (w>) & B ( w<) Negate points with w< and clip all against A. Chap 3, View Pipeline (CG-U) 69 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

70 Chap 3, View Pipeline (CG-U) 7 CGGM Lab., CS Dept., NCTU Jung Hong Chuang View volume clipping -2 Uses Cyrus-Beck clipper (a topic in Chap. 4) ) (, ) ( ) (, ) ( ) (, ) ( view volume : the canonical or outside of inside is, where ),,,, ( point A a To test if w w w w y w w y y w w y x w w x x w w x w w y x a a a a a a a a a a a a a a a a a a a a a a a a a a a a a

71 Viewing Pipeline Summary View projection View transform View-Volume Clipping in homogeneous space Window-viewport mapping Chap 3, View Pipeline (CG-U) 7 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

72 View Projection -3 Shear scaling Mapping view volume to normalied view volume. Easy view-volume clipping and projection, and Standard sied window. Comp. Graphics (U), Chap 3 View Pipeline 72 CGGM Lab., CS Dept., NCTU Jung Hong Chuang

Overview. Viewing and perspectives. Planar Geometric Projections. Classical Viewing. Classical views Computer viewing Perspective normalization

Overview. Viewing and perspectives. Planar Geometric Projections. Classical Viewing. Classical views Computer viewing Perspective normalization Overview Viewing and perspectives Classical views Computer viewing Perspective normalization Classical Viewing Viewing requires three basic elements One or more objects A viewer with a projection surface

More information

Fundamental Types of Viewing

Fundamental Types of Viewing Viewings Fundamental Types of Viewing Perspective views finite COP (center of projection) Parallel views COP at infinity DOP (direction of projection) perspective view parallel view Classical Viewing Specific

More information

Three-Dimensional Graphics III. Guoying Zhao 1 / 67

Three-Dimensional Graphics III. Guoying Zhao 1 / 67 Computer Graphics Three-Dimensional Graphics III Guoying Zhao 1 / 67 Classical Viewing Guoying Zhao 2 / 67 Objectives Introduce the classical views Compare and contrast image formation by computer with

More information

Computer Viewing. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Computer Viewing. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science Computer Viewing CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science 1 Objectives Introduce the mathematics of projection Introduce OpenGL viewing functions Look at

More information

Introduction to Computer Graphics 4. Viewing in 3D

Introduction to Computer Graphics 4. Viewing in 3D Introduction to Computer Graphics 4. Viewing in 3D National Chiao Tung Univ, Taiwan By: I-Chen Lin, Assistant Professor Textbook: E.Angel, Interactive Computer Graphics, 5 th Ed., Addison Wesley Ref: Hearn

More information

Chapter 2 A top-down approach - How to make shaded images?

Chapter 2 A top-down approach - How to make shaded images? Chapter 2 A top-down approach - How to make shaded images? Comp. Graphics (U), Chap 2 Global View 1 CGGM Lab., CS Dept., NCTU Jung Hong Chuang Graphics API vs. application API Graphics API Support rendering

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

Computer Viewing and Projection. Overview. Computer Viewing. David Carr Fundamentals of Computer Graphics Spring 2004 Based on Slides by E.

Computer Viewing and Projection. Overview. Computer Viewing. David Carr Fundamentals of Computer Graphics Spring 2004 Based on Slides by E. INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET Computer Viewing and Projection David Carr Fundamentals of Computer Graphics Spring 24 Based on Slides by E. Angel Projection 1 L Overview Computer

More information

5.8.3 Oblique Projections

5.8.3 Oblique Projections 278 Chapter 5 Viewing y (, y, ) ( p, y p, p ) Figure 537 Oblique projection P = 2 left right 0 0 left+right left right 0 2 top bottom 0 top+bottom top bottom far+near far near 0 0 far near 2 0 0 0 1 Because

More information

Overview of Projections: From a 3D world to a 2D screen.

Overview of Projections: From a 3D world to a 2D screen. Overview of Projections: From a 3D world to a 2D screen. Lecturer: Dr Dan Cornford d.cornford@aston.ac.uk http://wiki.aston.ac.uk/dancornford CS2150, Computer Graphics, Aston University, Birmingham, UK

More information

CSE328 Fundamentals of Computer Graphics

CSE328 Fundamentals of Computer Graphics CSE328 Fundamentals of Computer Graphics Hong Qin State University of New York at Stony Brook (Stony Brook University) Stony Brook, New York 794--44 Tel: (63)632-845; Fax: (63)632-8334 qin@cs.sunysb.edu

More information

COMP3421. Introduction to 3D Graphics

COMP3421. Introduction to 3D Graphics COMP3421 Introduction to 3D Graphics 3D coodinates Moving to 3D is simply a matter of adding an extra dimension to our points and vectors: 3D coordinates 3D coordinate systems can be left or right handed.

More information

CS 4204 Computer Graphics

CS 4204 Computer Graphics CS 4204 Computer Graphics 3D Viewing and Projection Yong Cao Virginia Tech Objective We will develop methods to camera through scenes. We will develop mathematical tools to handle perspective projection.

More information

Viewing and Projection

Viewing and Projection CSCI 480 Computer Graphics Lecture 5 Viewing and Projection Shear Transformation Camera Positioning Simple Parallel Projections Simple Perspective Projections [Geri s Game, Pixar, 1997] January 26, 2011

More information

Transformation Pipeline

Transformation Pipeline Transformation Pipeline Local (Object) Space Modeling World Space Clip Space Projection Eye Space Viewing Perspective divide NDC space Normalized l d Device Coordinatesd Viewport mapping Screen space Coordinate

More information

Viewing with Computers (OpenGL)

Viewing with Computers (OpenGL) We can now return to three-dimension?', graphics from a computer perspective. Because viewing in computer graphics is based on the synthetic-camera model, we should be able to construct any of the classical

More information

CITSTUDENTS.IN VIEWING. Computer Graphics and Visualization. Classical and computer viewing. Viewing with a computer. Positioning of the camera

CITSTUDENTS.IN VIEWING. Computer Graphics and Visualization. Classical and computer viewing. Viewing with a computer. Positioning of the camera UNIT - 6 7 hrs VIEWING Classical and computer viewing Viewing with a computer Positioning of the camera Simple projections Projections in OpenGL Hiddensurface removal Interactive mesh displays Parallelprojection

More information

3.1 Viewing and Projection

3.1 Viewing and Projection Fall 2017 CSCI 420: Computer Graphics 3.1 Viewing and Projection Hao Li http://cs420.hao-li.com 1 Recall: Affine Transformations Given a point [xyz] > form homogeneous coordinates [xyz1] > The transformed

More information

Computer Viewing Computer Graphics I, Fall 2008

Computer Viewing Computer Graphics I, Fall 2008 Computer Viewing 1 Objectives Introduce mathematics of projection Introduce OpenGL viewing functions Look at alternate viewing APIs 2 Computer Viewing Three aspects of viewing process All implemented in

More information

On the Midterm Exam. Monday, 10/17 in class. Closed book and closed notes. One-side and one page cheat sheet is allowed. A calculator is allowed

On the Midterm Exam. Monday, 10/17 in class. Closed book and closed notes. One-side and one page cheat sheet is allowed. A calculator is allowed On the Midterm Exam Monday, 1/17 in class Closed book and closed notes One-side and one page cheat sheet is allowed A calculator is allowed Covers the topics until the class on Wednesday, 1/12 Take-home

More information

COMP3421. Introduction to 3D Graphics

COMP3421. Introduction to 3D Graphics COMP3421 Introduction to 3D Graphics 3D coodinates Moving to 3D is simply a matter of adding an extra dimension to our points and vectors: 3D coordinates 3D coordinate systems can be left or right handed.

More information

Viewing and Projection

Viewing and Projection CSCI 480 Computer Graphics Lecture 5 Viewing and Projection January 25, 2012 Jernej Barbic University of Southern California Shear Transformation Camera Positioning Simple Parallel Projections Simple Perspective

More information

Computer Viewing. Prof. George Wolberg Dept. of Computer Science City College of New York

Computer Viewing. Prof. George Wolberg Dept. of Computer Science City College of New York Computer Viewing Prof. George Wolberg Dept. of Computer Science City College of New York Objectives Introduce the mathematics of projection Introduce OpenGL viewing functions Look at alternate viewing

More information

Evening s Goals. Mathematical Transformations. Discuss the mathematical transformations that are utilized for computer graphics

Evening s Goals. Mathematical Transformations. Discuss the mathematical transformations that are utilized for computer graphics Evening s Goals Discuss the mathematical transformations that are utilized for computer graphics projection viewing modeling Describe aspect ratio and its importance Provide a motivation for homogenous

More information

3D Viewing. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

3D Viewing. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller 3D Viewing CMPT 361 Introduction to Computer Graphics Torsten Möller Reading Chapter 4 of Angel Chapter 6 of Foley, van Dam, 2 Objectives What kind of camera we use? (pinhole) What projections make sense

More information

Computer Graphics. Chapter 10 Three-Dimensional Viewing

Computer Graphics. Chapter 10 Three-Dimensional Viewing Computer Graphics Chapter 10 Three-Dimensional Viewing Chapter 10 Three-Dimensional Viewing Part I. Overview of 3D Viewing Concept 3D Viewing Pipeline vs. OpenGL Pipeline 3D Viewing-Coordinate Parameters

More information

Course no. DIS4566 National Chiao Tung Univ, Taiwan By: I-Chen Lin, Assistant Professor

Course no. DIS4566 National Chiao Tung Univ, Taiwan By: I-Chen Lin, Assistant Professor Computer Graphics 3. Viewing in 3D (b) Course no. DIS4566 National Chiao Tung Univ, Taiwan By: I-Chen Lin, Assistant Professor Textbook: E.Angel, Interactive Computer Graphics, 4 th Ed., Addison Wesley

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

CS230 : Computer Graphics Lecture 6: Viewing Transformations. Tamar Shinar Computer Science & Engineering UC Riverside

CS230 : Computer Graphics Lecture 6: Viewing Transformations. Tamar Shinar Computer Science & Engineering UC Riverside CS230 : Computer Graphics Lecture 6: Viewing Transformations Tamar Shinar Computer Science & Engineering UC Riverside Rendering approaches 1. image-oriented foreach pixel... 2. object-oriented foreach

More information

3D Viewing. With acknowledge to: Ed Angel. Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

3D Viewing. With acknowledge to: Ed Angel. Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 3D Viewing With acknowledge to: Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Classical Viewing Viewing plane projectors Classical

More information

Viewing. Reading: Angel Ch.5

Viewing. Reading: Angel Ch.5 Viewing Reading: Angel Ch.5 What is Viewing? Viewing transform projects the 3D model to a 2D image plane 3D Objects (world frame) Model-view (camera frame) View transform (projection frame) 2D image View

More information

Geometry: Outline. Projections. Orthographic Perspective

Geometry: Outline. Projections. Orthographic Perspective Geometry: Cameras Outline Setting up the camera Projections Orthographic Perspective 1 Controlling the camera Default OpenGL camera: At (0, 0, 0) T in world coordinates looking in Z direction with up vector

More information

Viewing and Projection

Viewing and Projection 15-462 Computer Graphics I Lecture 5 Viewing and Projection Shear Transformation Camera Positioning Simple Parallel Projections Simple Perspective Projections [Angel, Ch. 5.2-5.4] January 30, 2003 [Red

More information

COMP3421. Introduction to 3D Graphics

COMP3421. Introduction to 3D Graphics COMP3421 Introduction to 3D Graphics 3D coordinates Moving to 3D is simply a matter of adding an extra dimension to our points and vectors: 3D coordinates 3D coordinate systems can be left or right handed.

More information

3D Viewing. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

3D Viewing. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller 3D Viewing Introduction to Computer Graphics Torsten Möller Machiraju/Zhang/Möller Reading Chapter 4 of Angel Chapter 13 of Hughes, van Dam, Chapter 7 of Shirley+Marschner Machiraju/Zhang/Möller 2 Objectives

More information

Viewing/Projection IV. Week 4, Fri Jan 29

Viewing/Projection IV. Week 4, Fri Jan 29 Universit of British Columbia CPSC 314 Computer Graphics Jan-Apr 2010 Tamara Munner Viewing/Projection IV Week 4, Fri Jan 29 http://www.ugrad.cs.ubc.ca/~cs314/vjan2010 News etra TA office hours in lab

More information

Classical and Computer Viewing. Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico

Classical and Computer Viewing. Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico Classical and Computer Viewing Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico Planar Geometric Projections Standard projections project onto a plane Projectors

More information

CSC 305 The Graphics Pipeline-1

CSC 305 The Graphics Pipeline-1 C. O. P. d y! "#"" (-1, -1) (1, 1) x z CSC 305 The Graphics Pipeline-1 by Brian Wyvill The University of Victoria Graphics Group Perspective Viewing Transformation l l l Tools for creating and manipulating

More information

Viewing/Projections III. Week 4, Wed Jan 31

Viewing/Projections III. Week 4, Wed Jan 31 Universit of British Columbia CPSC 34 Computer Graphics Jan-Apr 27 Tamara Munner Viewing/Projections III Week 4, Wed Jan 3 http://www.ugrad.cs.ubc.ca/~cs34/vjan27 News etra TA coverage in lab to answer

More information

One or more objects A viewer with a projection surface Projectors that go from the object(s) to the projection surface

One or more objects A viewer with a projection surface Projectors that go from the object(s) to the projection surface Classical Viewing Viewing requires three basic elements One or more objects A viewer with a projection surface Projectors that go from the object(s) to the projection surface Classical views are based

More information

To Do. Demo (Projection Tutorial) Motivation. What we ve seen so far. Outline. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 5: Viewing

To Do. Demo (Projection Tutorial) Motivation. What we ve seen so far. Outline. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 5: Viewing Foundations of Computer Graphics (Fall 0) CS 84, Lecture 5: Viewing http://inst.eecs.berkele.edu/~cs84 To Do Questions/concerns about assignment? Remember it is due Sep. Ask me or TAs re problems Motivation

More information

CS452/552; EE465/505. Intro to Lighting

CS452/552; EE465/505. Intro to Lighting CS452/552; EE465/505 Intro to Lighting 2-10 15 Outline! Projection Normalization! Introduction to Lighting (and Shading) Read: Angel Chapter 5., sections 5.4-5.7 Parallel Projections Chapter 6, sections

More information

Transforms 3: Projection Christian Miller CS Fall 2011

Transforms 3: Projection Christian Miller CS Fall 2011 Transforms 3: Projection Christian Miller CS 354 - Fall 2011 Eye coordinates Eye space is the coordinate system at the camera: x right, y up, z out (i.e. looking down -z) [RTR] The setup Once we ve applied

More information

Lecture 4: Viewing. Topics:

Lecture 4: Viewing. Topics: Lecture 4: Viewing Topics: 1. Classical viewing 2. Positioning the camera 3. Perspective and orthogonal projections 4. Perspective and orthogonal projections in OpenGL 5. Perspective and orthogonal projection

More information

To Do. Motivation. Demo (Projection Tutorial) What we ve seen so far. Computer Graphics. Summary: The Whole Viewing Pipeline

To Do. Motivation. Demo (Projection Tutorial) What we ve seen so far. Computer Graphics. Summary: The Whole Viewing Pipeline Computer Graphics CSE 67 [Win 9], Lecture 5: Viewing Ravi Ramamoorthi http://viscomp.ucsd.edu/classes/cse67/wi9 To Do Questions/concerns about assignment? Remember it is due tomorrow! (Jan 6). Ask me or

More information

Viewing COMPSCI 464. Image Credits: Encarta and

Viewing COMPSCI 464. Image Credits: Encarta and Viewing COMPSCI 464 Image Credits: Encarta and http://www.sackville.ednet.ns.ca/art/grade/drawing/perspective4.html Graphics Pipeline Graphics hardware employs a sequence of coordinate systems The location

More information

3D Viewing. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 9

3D Viewing. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 9 3D Viewing CS 46 Lecture 9 Cornell CS46 Spring 18 Lecture 9 18 Steve Marschner 1 Viewing, backward and forward So far have used the backward approach to viewing start from pixel ask what part of scene

More information

Three-Dimensional Viewing Hearn & Baker Chapter 7

Three-Dimensional Viewing Hearn & Baker Chapter 7 Three-Dimensional Viewing Hearn & Baker Chapter 7 Overview 3D viewing involves some tasks that are not present in 2D viewing: Projection, Visibility checks, Lighting effects, etc. Overview First, set up

More information

Lecture 4. Viewing, Projection and Viewport Transformations

Lecture 4. Viewing, Projection and Viewport Transformations Notes on Assignment Notes on Assignment Hw2 is dependent on hw1 so hw1 and hw2 will be graded together i.e. You have time to finish both by next monday 11:59p Email list issues - please cc: elif@cs.nyu.edu

More information

3D Viewing Episode 2

3D Viewing Episode 2 3D Viewing Episode 2 1 Positioning and Orienting the Camera Recall that our projection calculations, whether orthographic or frustum/perspective, were made with the camera at (0, 0, 0) looking down the

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

The Viewing Pipeline adaptation of Paul Bunn & Kerryn Hugo s notes

The Viewing Pipeline adaptation of Paul Bunn & Kerryn Hugo s notes The Viewing Pipeline adaptation of Paul Bunn & Kerryn Hugo s notes What is it? The viewing pipeline is the procession of operations that are applied to the OpenGL matrices, in order to create a 2D representation

More information

Announcement. Project 1 has been posted online and in dropbox. Due: 11:59:59 pm, Friday, October 14

Announcement. Project 1 has been posted online and in dropbox. Due: 11:59:59 pm, Friday, October 14 Announcement Project 1 has been posted online and in dropbox Due: 11:59:59 pm, Friday, October 14 Project 1: Interactive Viewing of Two Teapots How to create a teapot? Before OpenGL 3., glutsolidteapot

More information

CS 543: Computer Graphics. Projection

CS 543: Computer Graphics. Projection CS 543: Computer Graphics Projection Robert W. Lindeman Associate Professor Interactive Media & Game Development Department of Computer Science Worcester Poltechnic Institute gogo@wpi.edu with lots of

More information

Prof. Feng Liu. Fall /19/2016

Prof. Feng Liu. Fall /19/2016 Prof. Feng Liu Fall 26 http://www.cs.pdx.edu/~fliu/courses/cs447/ /9/26 Last time More 2D Transformations Homogeneous Coordinates 3D Transformations The Viewing Pipeline 2 Today Perspective projection

More information

Notes on Assignment. Notes on Assignment. Notes on Assignment. Notes on Assignment

Notes on Assignment. Notes on Assignment. Notes on Assignment. Notes on Assignment Notes on Assignment Notes on Assignment Objects on screen - made of primitives Primitives are points, lines, polygons - watch vertex ordering The main object you need is a box When the MODELVIEW matrix

More information

Motivation. What we ve seen so far. Demo (Projection Tutorial) Outline. Projections. Foundations of Computer Graphics

Motivation. What we ve seen so far. Demo (Projection Tutorial) Outline. Projections. Foundations of Computer Graphics Foundations of Computer Graphics Online Lecture 5: Viewing Orthographic Projection Ravi Ramamoorthi Motivation We have seen transforms (between coord sstems) But all that is in 3D We still need to make

More information

Virtual Cameras & Their Matrices

Virtual Cameras & Their Matrices Virtual Cameras & Their Matrices J.Tumblin-Modified, highly edited SLIDES from: Ed Angel Professor Emeritus of Computer Science University of New Mexico 1 What is Projection? Any operation that reduces

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

Lecture 3 Sections 2.2, 4.4. Mon, Aug 31, 2009

Lecture 3 Sections 2.2, 4.4. Mon, Aug 31, 2009 Model s Lecture 3 Sections 2.2, 4.4 World s Eye s Clip s s s Window s Hampden-Sydney College Mon, Aug 31, 2009 Outline Model s World s Eye s Clip s s s Window s 1 2 3 Model s World s Eye s Clip s s s Window

More information

Viewing/Projections IV. Week 4, Fri Feb 1

Viewing/Projections IV. Week 4, Fri Feb 1 Universit of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner Viewing/Projections IV Week 4, Fri Feb 1 http://www.ugrad.cs.ubc.ca/~cs314/vjan2008 News extra TA office hours in lab

More information

Transformations. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Transformations. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Transformations Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Angel: Interactive Computer Graphics 4E Addison-Wesley 25 1 Objectives

More information

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015 Orthogonal Projection Matrices 1 Objectives Derive the projection matrices used for standard orthogonal projections Introduce oblique projections Introduce projection normalization 2 Normalization Rather

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

Last week. Machiraju/Zhang/Möller/Fuhrmann

Last week. Machiraju/Zhang/Möller/Fuhrmann Last week Machiraju/Zhang/Möller/Fuhrmann 1 Geometry basics Scalar, point, and vector Vector space and affine space Basic point and vector operations Sided-ness test Lines, planes, and triangles Linear

More information

Three Main Themes of Computer Graphics

Three Main Themes of Computer Graphics Three Main Themes of Computer Graphics Modeling How do we represent (or model) 3-D objects? How do we construct models for specific objects? Animation How do we represent the motion of objects? How do

More information

Projection: Mapping 3-D to 2-D. Orthographic Projection. The Canonical Camera Configuration. Perspective Projection

Projection: Mapping 3-D to 2-D. Orthographic Projection. The Canonical Camera Configuration. Perspective Projection Projection: Mapping 3-D to 2-D Our scene models are in 3-D space and images are 2-D so we need some wa of projecting 3-D to 2-D The fundamental approach: planar projection first, we define a plane in 3-D

More information

CS 4731/543: Computer Graphics Lecture 5 (Part I): Projection. Emmanuel Agu

CS 4731/543: Computer Graphics Lecture 5 (Part I): Projection. Emmanuel Agu CS 4731/543: Computer Graphics Lecture 5 (Part I): Projection Emmanuel Agu 3D Viewing and View Volume Recall: 3D viewing set up Projection Transformation View volume can have different shapes (different

More information

Models and The Viewing Pipeline. Jian Huang CS456

Models and The Viewing Pipeline. Jian Huang CS456 Models and The Viewing Pipeline Jian Huang CS456 Vertex coordinates list, polygon table and (maybe) edge table Auxiliary: Per vertex normal Neighborhood information, arranged with regard to vertices and

More information

Viewing Transformation

Viewing Transformation CS38: Computer Graphics Viewing Transformation Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/cg/ Class Objectives Know camera setup parameters Understand viewing and projection processes

More information

Chap 7, 2008 Spring Yeong Gil Shin

Chap 7, 2008 Spring Yeong Gil Shin Three-Dimensional i Viewingi Chap 7, 28 Spring Yeong Gil Shin Viewing i Pipeline H d fi i d? How to define a window? How to project onto the window? Rendering "Create a picture (in a synthetic camera)

More information

CS 418: Interactive Computer Graphics. Projection

CS 418: Interactive Computer Graphics. Projection CS 418: Interactive Computer Graphics Projection Eric Shaffer Based on John Hart s CS 418 Slides Hierarchical Solar System Model Without push/pop, You can t move the Earth scale to before you draw the

More information

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

CSE 167: Introduction to Computer Graphics Lecture #5: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017 CSE 167: Introduction to Computer Graphics Lecture #5: Projection Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017 Announcements Friday: homework 1 due at 2pm Upload to TritonEd

More information

7. 3D Viewing. Projection: why is projection necessary? CS Dept, Univ of Kentucky

7. 3D Viewing. Projection: why is projection necessary? CS Dept, Univ of Kentucky 7. 3D Viewing Projection: why is projection necessary? 1 7. 3D Viewing Projection: why is projection necessary? Because the display surface is 2D 2 7.1 Projections Perspective projection 3 7.1 Projections

More information

Transformation Algebra

Transformation Algebra Transformation Algebra R. J. Renka Department of Computer Science & Engineering University of North Texas 0/07/205 Linear Transformations A point with Cartesian coordinates (x, y, z) is taken to be a column

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

The Graphics Pipeline and OpenGL I: Transformations!

The Graphics Pipeline and OpenGL I: Transformations! ! The Graphics Pipeline and OpenGL I: Transformations! Gordon Wetzstein! Stanford University! EE 267 Virtual Reality! Lecture 2! stanford.edu/class/ee267/!! Albrecht Dürer, Underweysung der Messung mit

More information

CS452/552; EE465/505. Geometry Transformations

CS452/552; EE465/505. Geometry Transformations CS452/552; EE465/505 Geometry Transformations 1-26-15 Outline! Geometry: scalars, points & vectors! Transformations Read: Angel, Chapter 4 (study cube.html/cube.js example) Appendix B: Spaces (vector,

More information

CS 475 / CS 675 Computer Graphics. Lecture 7 : The Modeling-Viewing Pipeline

CS 475 / CS 675 Computer Graphics. Lecture 7 : The Modeling-Viewing Pipeline CS 475 / CS 675 Computer Graphics Lecture 7 : The Modeling-Viewing Pipeline Taonom Planar Projections Parallel Perspectie Orthographic Aonometric Oblique Front Top Side Trimetric Dimetric Isometric Caalier

More information

2D and 3D Viewing Basics

2D and 3D Viewing Basics CS10101001 2D and 3D Viewing Basics Junqiao Zhao 赵君峤 Department of Computer Science and Technology College of Electronics and Information Engineering Tongji University Viewing Analog to the physical viewing

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

Fachhochschule Regensburg, Germany, February 15, 2017

Fachhochschule Regensburg, Germany, February 15, 2017 s Operations Fachhochschule Regensburg, Germany, February 15, 2017 s Motivating Example s Operations To take a photograph of a scene: Set up your tripod and point camera at the scene (Viewing ) Position

More information

CSE452 Computer Graphics

CSE452 Computer Graphics CSE45 Computer Graphics Lecture 8: Computer Projection CSE45 Lecture 8: Computer Projection 1 Review In the last lecture We set up a Virtual Camera Position Orientation Clipping planes Viewing angles Orthographic/Perspective

More information

University of British Columbia CPSC 314 Computer Graphics Jan-Apr Tamara Munzner. Viewing 4. Page 1

University of British Columbia CPSC 314 Computer Graphics Jan-Apr Tamara Munzner. Viewing 4. Page 1 University of British Columbia CPSC 34 Computer Graphics Jan-Apr 206 Tamara Munzner Viewing 4 http://www.ugrad.cs.ubc.ca/~cs34/vjan206 Page 2 Projective Rendering Pipeline object world viewing O2W OCS

More information

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo Computer Graphics Bing-Yu Chen National Taiwan Universit The Universit of Toko Viewing in 3D 3D Viewing Process Classical Viewing and Projections 3D Snthetic Camera Model Parallel Projection Perspective

More information

Reminder: Affine Transformations. Viewing and Projection. Shear Transformations. Transformation Matrices in OpenGL. Specification via Ratios

Reminder: Affine Transformations. Viewing and Projection. Shear Transformations. Transformation Matrices in OpenGL. Specification via Ratios CSCI 420 Computer Graphics Lecture 6 Viewing and Projection Jernej Barbic University o Southern Caliornia Shear Transormation Camera Positioning Simple Parallel Projections Simple Perspective Projections

More information

Chap 7, 2009 Spring Yeong Gil Shin

Chap 7, 2009 Spring Yeong Gil Shin Three-Dimensional i Viewingi Chap 7, 29 Spring Yeong Gil Shin Viewing i Pipeline H d fi i d? How to define a window? How to project onto the window? Rendering "Create a picture (in a snthetic camera) Specification

More information

Game Architecture. 2/19/16: Rasterization

Game Architecture. 2/19/16: Rasterization Game Architecture 2/19/16: Rasterization Viewing To render a scene, need to know Where am I and What am I looking at The view transform is the matrix that does this Maps a standard view space into world

More information

CS380: Computer Graphics Viewing Transformation. Sung-Eui Yoon ( 윤성의 ) Course URL:

CS380: Computer Graphics Viewing Transformation. Sung-Eui Yoon ( 윤성의 ) Course URL: CS38: Computer Graphics Viewing Transformation Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/cg/ Class Objectives Know camera setup parameters Understand viewing and projection processes

More information

Realtime 3D Computer Graphics & Virtual Reality. Viewing

Realtime 3D Computer Graphics & Virtual Reality. Viewing Realtime 3D Computer Graphics & Virtual Realit Viewing Transformation Pol. Per Verte Pipeline CPU DL Piel Teture Raster Frag FB v e r t e object ee clip normalied device Modelview Matri Projection Matri

More information

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CSE528 Computer Graphics: Theory, Algorithms, and Applications CSE528 Computer Graphics: Theor, Algorithms, and Applications Hong Qin State Universit of New York at Ston Brook (Ston Brook Universit) Ston Brook, New York 794--44 Tel: (63)632-845; Fa: (63)632-8334 qin@cs.sunsb.edu

More information

COMP3421. Vector geometry, Clipping

COMP3421. Vector geometry, Clipping COMP3421 Vector geometry, Clipping Transformations Object in model co-ordinates Transform into world co-ordinates Represent points in object as 1D Matrices Multiply by matrices to transform them Coordinate

More information

Computer Graphics. Coordinate Systems and Change of Frames. Based on slides by Dianna Xu, Bryn Mawr College

Computer Graphics. Coordinate Systems and Change of Frames. Based on slides by Dianna Xu, Bryn Mawr College Computer Graphics Coordinate Systems and Change of Frames Based on slides by Dianna Xu, Bryn Mawr College Linear Independence A set of vectors independent if is linearly If a set of vectors is linearly

More information

3-Dimensional Viewing

3-Dimensional Viewing CHAPTER 6 3-Dimensional Vieing Vieing and projection Objects in orld coordinates are projected on to the vie plane, hich is defined perpendicular to the vieing direction along the v -ais. The to main tpes

More information

GEOMETRIC TRANSFORMATIONS AND VIEWING

GEOMETRIC TRANSFORMATIONS AND VIEWING GEOMETRIC TRANSFORMATIONS AND VIEWING 2D and 3D 1/44 2D TRANSFORMATIONS HOMOGENIZED Transformation Scaling Rotation Translation Matrix s x s y cosθ sinθ sinθ cosθ 1 dx 1 dy These 3 transformations are

More information

Announcements. Submitting Programs Upload source and executable(s) (Windows or Mac) to digital dropbox on Blackboard

Announcements. Submitting Programs Upload source and executable(s) (Windows or Mac) to digital dropbox on Blackboard Now Playing: Vertex Processing: Viewing Coulibaly Amadou & Mariam from Dimanche a Bamako Released August 2, 2005 Rick Skarbez, Instructor COMP 575 September 27, 2007 Announcements Programming Assignment

More information

Clipping and Scan Conversion

Clipping and Scan Conversion 15-462 Computer Graphics I Lecture 14 Clipping and Scan Conversion Line Clipping Polygon Clipping Clipping in Three Dimensions Scan Conversion (Rasterization) [Angel 7.3-7.6, 7.8-7.9] March 19, 2002 Frank

More information

p =(x,y,d) y (0,0) d z Projection plane, z=d

p =(x,y,d) y (0,0) d z Projection plane, z=d Projections ffl Mapping from d dimensional space to d 1 dimensional subspace ffl Range of an projection P : R! R called a projection plane ffl P maps lines to points ffl The image of an point p under P

More information

Affine Transformations in 3D

Affine Transformations in 3D Affine Transformations in 3D 1 Affine Transformations in 3D 1 Affine Transformations in 3D General form 2 Translation Elementary 3D Affine Transformations 3 Scaling Around the Origin 4 Along x-axis Shear

More information

So we have been talking about 3D viewing, the transformations pertaining to 3D viewing. Today we will continue on it. (Refer Slide Time: 1:15)

So we have been talking about 3D viewing, the transformations pertaining to 3D viewing. Today we will continue on it. (Refer Slide Time: 1:15) Introduction to Computer Graphics Dr. Prem Kalra Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture - 8 3D Viewing So we have been talking about 3D viewing, the

More information