Multimedia Signals and Systems Virtual Reality and VRML

Size: px
Start display at page:

Download "Multimedia Signals and Systems Virtual Reality and VRML"

Transcription

1 Multimedia Signals and Systems Virtual Reality and VRML Kunio Takaya Electrical and Computer Engineering University of Saskatchewan January 16, 2008 ** Go to full-screen mode now by hitting CTRL-L 1

2 Contents 1 Basic Theory of 3D Graphics 4 2 Viewing Transformation 16 3 Projection to the View Plane 24 4 Equation of a Plane 29 5 Reflection Model - the Phong model 36 6 MATLAB - surface and mesh 45 7 Virtual Reality Modeling Language 48 2

3 R µ ν 1 2 R δµ ν = 8πG c 4 T µ ν Here T µ ν is tensor of energy momentum. black red green yellow blue magenta cyan 3

4 1 Basic Theory of 3D Graphics Alan Watt, Fundamentals of Three-Dimensional Computer Graphics, Addison Wesley, 1991, ISBN In 3D computer graphics, we use a right-handed corrdinate system to define the world coordinate system and we use a left-handed coordinate system to define the view coordinate system. In the right-handed or left-handed coordinate systems, thumb points x-axis, index finger points y-axis, middle finger points z-axis. 4

5 A vertex in a 3D space, V at [x, y, z] is represented by [X, Y, Z, w] in a homogeneous coordinate system. Where, w is a scale factor, which is normally 1. x = X/w, y = Y/w, and z = Z/w. 1. Transformation A vertex point V is transformed to a new point V by a transformation matrix M. V = VM 5

6 Translation can be treated as matrix multiplication, V = VT = [x, y, z, 1] T x T y T z 1 = [x + T x, y + T y, z + T z, 1] 6

7 2. Scaling V = VS S x S y 0 0 = [x, y, z, 1] 0 0 S z = [xs x, ys y, zs z, 1] 7

8 3. Rotation about x-axis V = VR x cos θ x sin θ x 0 = [x, y, z, 1] 0 sin θ x cos θ x = [x, y cos θ x + z sin θ x, y sin θ x z cos θ x, 1] 8

9 4. Rotation about y-axis V = VR y cos θ y 0 sin θ y = [x, y, z, 1] sin θ y 0 cos θ y = [x cos θ y + z sin θ y, y, x cos θ y + z sin θ y, 1] 9

10 5. Rotation about z-axis V = VR z = [x, y, z, 1] cos θ z sin θ z 0 0 sin θ z cos θ z = [x cos θ z y sin θ z, x sin θ z + y cos θ z, z, 1] Let a current point in the (x, y) plane be x = r cos θ 0, and y = r sin θ 0. After rotation about z-axis by θ z, x = r cos(θ 0 + θ z ), y = r sin(θ 0 + θ z ) 10

11 Let s check that the given rotation matrix about z-axis is correct! x = r cos(θ 0 + θ z ) = r(cos θ 0 cos θ z sin θ 0 sin θ z ) = x cos θ z y sin θ z y = r sin(θ 0 + θ z ) = r(sin θ 0 cos θ z + cos θ 0 sin θ z ) = y cos θ z + x sin θ z 11

12 When rotaions about different axes are mixed, multiply each of respective rotation matrices in the order of applied rotaions. For example, if rotation about x-axis, rotation about y-axis, then rotation about z axis are applied, the combined rotation matrix is R = R x R y R z. If rotation about z axis is applied first, then rotation about x-axis followed by rotation about y-axis, the combined rotation matrix is R = R z R x R y. 12

13 6. Example Consider rotating a body about a line parallel to the z axis which passes through the point [T x, T y, 0] where one of the vertices of the object is located. A net transformation matrix can be derived as follows: 1. translate the object to the origin, 2. apply the desired rotation, and 3. translate the object back to its original position. 13

14 14

15 = T 1 R z T 2 = cos θ z sin θ z sin θ z cos θ z T x T y T x T y 0 1 cos θ z sin θ z 0 0 sin θ z cos θ z T x cos θ z + T y sin θ z + T x T x cos θ z T y sin θ z + T y

16 2 Viewing Transformation The viewing transformation, T view transform points in the world coordinate system into the view corrdinate system. [x v, y v, z v, 1] = [x w, y w, z w, 1]T view We adopt a left-handed convention for the view coordinate system. World coordinates are defined as a right-handed system so that in the computation of a net transformation matrix for the viewing transformation, we would include a conversion to a left-handed coordinate system. Four steps of transformations are required to accomplish this conversion. 16

17 17

18 7. Set a View Point The viewing transformation is specified using spherical instead of cartesian coordinates. A view point is specified with a distance from the origin of the world coordinate, µ, and two angles, θ and φ. The view point s cartesian coordinates are T x = µ cos θ sin φ, T y = µ sin θ sin φ, T z = µ cos φ Since we are moving the origin of a system from [0, 0, 0, 1] to [T x, T y, T z, 1], the first transformation required is T 1 = T x T y T z 1 18

19 = µ cos θ sin φ µ sin θ sin φ µ cos φ 1 19

20 8. Align y with the plane [µ, θ, φ] The next step is to rotate the coordinate system through 90 θ in a clockwise direction about the z -axis. This is to align y -axis to the plain that contains the vector [µ, θ, φ], and x -axis to become normal to this plane. A clockwise rotation of the coordinate system is the same as a counterclosckwise rotaion of a point relative to the coordinate system. Thus, sin θ cos θ 0 0 cos θ sin θ 0 0 T 2 = since cos(90 θ) = sin θ, and sin(90 θ) = cos θ 20

21 9. Align z to the vector [µ, θ, φ] The next step is to rotate the coordinate system through 180 φ counterclockwise about the x -axis. This makes z -axis pass through the origin of the world coordinate system cos φ sin φ 0 T 3 = 0 sin φ cos φ

22 10. Convert to a left-handed system T 4 =

23 11. The net viewing transformation Multiplying these together gives the net transformation matrix from the world coordinate system to the viewing cooridniate system. sin θ cos θ cos φ cos θ sin θ 0 cos θ sin θ cos φ sin θ sin φ 0 T view = T 1 T 2 T 3 T 4 = 0 sin φ cos φ µ 1 With this transformation, T view [x v, y v, z v, 1] = [x w, y w, z w, 1]T view. 23

24 3 Projection to the View Plane 12. Perspective Projection A view plane is a plane perpendicular to the line [µ, θ, φ] positioned at a distance d from the view point. Perspective projection of a point in the view coordinate system, [x v, y v, z v, 1], is [x s, y s, d, 1] = [ x v z v d, y v z v d, d, 1] Taking advantage of desciptive power of the homogeneous coordinate system, we can write this as [x s, y s, d, 1] = [ x v z v d, y v z v d, d, 1] = [x v, y v, z v, z v d ] 24

25 = [x v, y v, z v, 1] d Thus, T pers = d

26 26

27 13. Parallel (orthographic) Projection When the view point is set at infinity, the projection is parallel projection T orth =

28 28

29 4 Equation of a Plane 14. Plane defined by a Line Normal A plane is a two-dimensional doubly ruled surface spanned by two linearly independent vectors. The equation of a plane with nonzero normal vector n = (a, b, c) 29

30 through the point x 0 = (x 0, y 0, z 0 ) is n (x x 0 ) = 0 where x = (x, y, z). This gives the general equation of a plane, ax + by + cz + d = 0, where d = ax 0 by 0 cz 0 A plane specified in this form therefore has x-, y-, and z-intercepts at x = d a, y = d b, z = d c and lies at a distance D = d a2 + b 2 + c 2. It is especially convenient to specify planes in so-called Hessian normal form. This is obtained by defining the components of the 30

31 unit normal vector ˆn = (n x, n y, n z ) as n x = a a2 + b 2 + c 2, n y = b a2 + b 2 + c 2, n z = c a2 + b 2 + c 2 and the constant p = d. Then the Hessian normal a2 + b 2 + c2 form of the plane is ˆn x = p. The (signed) distance to a point x 0 is D = ˆn x 0 + p, and the distance from the origin is simply D = p. Refer to 31

32 15. Plane defined by Intercepts This section presents the useful equation to describe a plane of polygons that construct a wireframe 3D structure. In intercept form, a plane passing through the points (a, 0, 0), (0, b, 0) and (0, 0, c ) is given by x a + y b + z c = 1. The plane through (x 1, y 1, z 1 ) and parallel to (a 1, b 1, c 1 ) and 32

33 (a 2, b 2, c 2 ) (two normal lines) is x x 1 y y 1 z z 1 a 1 b 1 c 1 a 2 b 2 c 2 = 0 The plane through points (x 1, y 1, z 1 ) and (x 2, y 2, z 2 ) parallel to (a, b, c) direction is x x 1 y y 1 z z 1 x 2 x 1 y 2 y 1 z 2 z 1 = 0 a b c 33

34 The three-point form is x y z 1 x 1 y 1 z 1 1 x 2 y 2 z 2 1 x 3 y 3 z 3 1 = x x 1 y y 1 z z 1 x 2 x 1 y 2 y 1 z 2 z 1 x 3 x 1 y 3 y 1 z 3 z 1 = 0 A plane specified in three-point form can be given by A 1 x + A 2 y + A 3 z A = 0, where, A = det(x 1, x 2, x 3 ) and A i is and the determinant obtained by replacing x i with a column vector of 1 s. To express in Hessian normal form, note that the unit normal vector can also be immediately written as ˆn = (x 3 x 1 ) (x 2 x 1 ) j(x 3 x 1 ) (x 2 x 1 )j and the constant p giving the distance from the plane to the origin 34

35 is p = A A A A 2 3. The (signed) point-plane distance from a point (x 0, y 0, z 0 ) to a plane ax + by + cz + d = 0 is D = ax 0 + by 0 + cz 0 + d a2 + b 2 + c 2. The dihedral angle between the planes a 1 x + b 1 y + c 1 z + d 1 = 0 and a 2 x + b 2 y + c 2 z + d 2 = 0 which have normal vectors ˆn 1 = (a 1, b 1, c 1 ) and ˆn 2 = (a 2, b 2, c 2 ) is simply given via the dot product of the normals, cos θ = ˆn 1 ˆn 2 = a 1 a 2 + b 1 b 2 + c 1 c 2 a b c 2 1 a b c 2 2 The dihedral angle is therefore particularly simple to compute if the planes are specified in Hessian normal form. 35

36 5 Reflection Model - the Phong model 16. Back face elimination (culling) 36

37 Given a view point, we can determine whether or not a polygon is visible from the view point. Calculate the angle between the polygon surfance normal and the line-of-sight vector. The surface (polygon) is visible if and only if the angle between the two is less than 90. N V > 0 Visible 17. the Phoneg reflection model The light incident at a surface is light reflected, light scattered, light absorbed, light transmitted 37

38 38

39 Of those components, the light reflected and redirected toward the view point determines the impression of the surface (polygon). The reflected light consists of diffused reflection, ambient light, and specular reflection. diffused reflection A surface with a perfect diffuser scatters light equally in all directions. This means that the amount of reflected light seen by the viewer does not depend on the viewer s position. Such surfaces are dull and matt, and the intensity of diffused reflected light is given by Lambert s law. I d = I i k d (L N) = I i k d cos θ, where, 0 θ π 2 Where, I i is the incident light, and k d is the diffuse reflectivity. ambient light Ambient light is the result of multiple reflectio from alls and object, and incident on a surface from all directions. It is modelled as a constant term, I a k a. We combine diffused reflection and ambient light, and consider a distance from the 39

40 surface to a view poing r and a constant k. I = I a k a + I i k d L N r + k specular reflection When a surface is glossy (not matt, not of diffusion), the incident light (L) is reflected by the surface into the direction of (R), keeping the angle to the surface normal to be equal. Amount of reflected light observed depends on the view angle φ measured from the line of reflection. The intensity of specular reflection is given by I s = I i k s cos n φ r + k = I i k s (R V) n r + k Combining diffused light, ambient light and specular light, L N I = I a k a + I i k d r + k + I (R V) n ik s r + k In the 3D graphic model, incident light sources and a view 40

41 point are given and known. However, the direction of reflection R needs calculations. In practice, (R V) is replaced by (N H) using a surface that reflect the incident light to the view angle. The normal line to this surface is H. L N I = I a k a + I i k d r + k + I (N H) n ik s r + k For colored objects, the Phong model uses a different diffuse reflection coefficient for each of RGB. Specular lights is treated as white. I = I a k a r + I i [k d r L N r + k + k (N H) n s r + k ] I = I a k a g + I i [k d g L N r + k + k s I = I a k a b + I i [k d b L N r + k + k s (N H) n r + k ] (N H) n r + k ] 41

42 42

43 43

44 44

45 6 MATLAB - surface and mesh 16. 3D Rendering by the Phong model ep=pi/64; theta=[-pi/2: pi/16: pi/2]; radius=cos(theta); height=sin(theta); phi=[0: pi/16: 2*pi]; mmax=size(radius,2); nmax=size(phi,2); x=cos(phi); y=sin(phi); z=zeros(1,nmax); for k=2:mmax r=radius(k); h=height(k); x=[x;r*cos(phi)]; y=[y;r*sin(phi)]; z=[z;h*ones(1,nmax)]; end figure; subplot(1,2,1); s=surface( xda,x, yda,y, zdata,z, EdgeColor, None,... Clipping, off ); cd=ones(mmax,1)*rand(1,nmax); set(s, CData, cd); l1=light( pos,[1-2 1]); l2=light( pos,-[1-2 1]); 45

46 axis vis3d; set(gca, DataAspectRatio, [1 1 1]); shading interp; lighting phong; set(gca, CameraViewAngle, 7); axis([ ]); colormap(hsv(180)); view(130,30); material([ ]); set(l2, Position, [1 1 1]); 46

47 47

48 7 Virtual Reality Modeling Language 17. 3D Rendering by VRML VRML stands for Virtual Reality Modeling Language. It allows to specify dynamic 3D scenes through which users can navigate with the help of a VRML browser. The Virtual Reality Modeling Language (VRML) can been seen as a 3-D visual extension of the WWW. People can navigate through 3-D space and click on objects representing URLs. Often, VRML is pronounced like Vermal, not V-R-M-L. Cortona VRML Client 5.1 is a VRML interactive Web3D viewer, a plug-in for popular Internet browsers (Internet Explorer, Netscape Browser, Mozilla, Mozilla Firefox, etc.) downloadable from 48

49 The Virtual Reality Modeling Language consists of two parts. Part 1 (ISO/IEC ) defines the base functionality and text encoding for VRML. Part 2 (ISO/IEC ) defines the base functionality and all bindings for the VRML External Authoring Interface. The Virtual Reality Modeling Language, International Standard ISO/IEC :1997 is described in VRML97/ Online tutorials provide a good guide for writing a code in VRML. One of the sites is Here, we just study how the world and view coordinates we studied 49

50 here are implemented, and also how the Phong model of ray tracing is implemented in VRML. 18. Simple VRML scripts 50

51 #VRML V2.0 utf8 #transform.wrl Transform{ translation children[ Shape{ appearance Appearance{ material Material {} } geometry Cone{ bottomradius 2.0 height 4.0 } } ] } Transform{ translation scale rotation children[ Shape{ appearance Appearance{ material Material {} } geometry Cone{ bottomradius 2.0 height 4.0 } } ] } 51

52 #VRML V2.0 utf8 #emissiveball.wrl Viewpoint{ position orientation } Transform{ translation children[ Shape{ appearance Appearance{ material Material { diffusecolor specularcolor shininess 0.5 } } geometry Sphere{ radius 2.0 } } ] } 52

53 Transform{ translation children[ Shape{ appearance Appearance{ material Material { emissivecolor } } geometry Sphere{ radius 2.0 } } ] } 53

54 #VRML V2.0 utf8 #grid.wrl Viewpoint{ position orientation } #background Background{ skycolor [ ] } # Set a view point # Rotate about x-axis # Set color #Geometry and Shape Shape{ appearance Appearance{ material Material{ diffusecolor } } geometry ElevationGrid{ # Display geometrical shape xdimension 10 # number of grid point x-axis zdimension 10 # number of grid point z-axis xspacing 0.5 # distance between grids x-axis zspacing 0.5 # distance between grids z-axis height[ # Specify vertex heights 0.5, 0.5, 0.4, 0.4, 0.5, 0.6, 0.4, 0.4, 0.5, 0.2, 54

55 ]}} 0.5, 0.5, 0.3, 0.4, 0.4, 0.5, 0.4, 0.4, 0.4, 0.2, 0.4, 0.4, 0.3, 0.2, 0.2, 0.2, 0.4, 0.4, 0.3, 0.2, 0.4, 0.3, 0.2, 0.2, 0.2, 0.2, 0.2, 0.3, 0.3, 0.2, 0.2, 0.2, 0.2, 0.0, 0.0, 0.0, 0.0, 0.1, 0.1, 0.1, 0.2, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -0.1, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -0.1, -0.1, -0.2, -0.3, -0.1, -0.1, -0.2, -0.2, -0.3, -0.4, -0.5, -0.5, -0.5, -0.5, -0.2, -0.4, -0.4, -0.4, -0.5, -0.3, -0.5, -0.5, -0.5,

56 19. VRML animation robot.wrl 56

Rendering. Illumination Model. Wireframe rendering simple, ambiguous Color filling flat without any 3D information

Rendering. Illumination Model. Wireframe rendering simple, ambiguous Color filling flat without any 3D information llumination Model Wireframe rendering simple, ambiguous Color filling flat without any 3D information Requires modeling interaction of light with the object/surface to have a different color (shade in

More information

Graphics for VEs. Ruth Aylett

Graphics for VEs. Ruth Aylett Graphics for VEs Ruth Aylett Overview VE Software Graphics for VEs The graphics pipeline Projections Lighting Shading VR software Two main types of software used: off-line authoring or modelling packages

More information

Shading I Computer Graphics I, Fall 2008

Shading I Computer Graphics I, Fall 2008 Shading I 1 Objectives Learn to shade objects ==> images appear threedimensional Introduce types of light-material interactions Build simple reflection model Phong model Can be used with real time graphics

More information

Shading. Why we need shading. Scattering. Shading. Objectives

Shading. Why we need shading. Scattering. Shading. Objectives Shading Why we need shading Objectives Learn to shade objects so their images appear three-dimensional Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something

More information

Graphics for VEs. Ruth Aylett

Graphics for VEs. Ruth Aylett Graphics for VEs Ruth Aylett Overview VE Software Graphics for VEs The graphics pipeline Projections Lighting Shading Runtime VR systems Two major parts: initialisation and update loop. Initialisation

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

Illumination & Shading I

Illumination & Shading I CS 543: Computer Graphics Illumination & Shading I Robert W. Lindeman Associate Professor Interactive Media & Game Development Department of Computer Science Worcester Polytechnic Institute gogo@wpi.edu

More information

w Foley, Section16.1 Reading

w Foley, Section16.1 Reading Shading w Foley, Section16.1 Reading Introduction So far, we ve talked exclusively about geometry. w What is the shape of an object? w How do I place it in a virtual 3D space? w How do I know which pixels

More information

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Lecture 15: Shading-I. CITS3003 Graphics & Animation Lecture 15: Shading-I CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 Objectives Learn that with appropriate shading so objects appear as threedimensional

More information

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014 ECS 175 COMPUTER GRAPHICS Ken Joy Winter 2014 Shading To be able to model shading, we simplify Uniform Media no scattering of light Opaque Objects No Interreflection Point Light Sources RGB Color (eliminating

More information

The Viewing Pipeline Coordinate Systems

The Viewing Pipeline Coordinate Systems Overview Interactive Graphics System Model Graphics Pipeline Coordinate Systems Modeling Transforms Cameras and Viewing Transform Lighting and Shading Color Rendering Visible Surface Algorithms Rasterization

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

CS5620 Intro to Computer Graphics

CS5620 Intro to Computer Graphics So Far wireframe hidden surfaces Next step 1 2 Light! Need to understand: How lighting works Types of lights Types of surfaces How shading works Shading algorithms What s Missing? Lighting vs. Shading

More information

Computer Vision Systems. Viewing Systems Projections Illuminations Rendering Culling and Clipping Implementations

Computer Vision Systems. Viewing Systems Projections Illuminations Rendering Culling and Clipping Implementations Computer Vision Systems Viewing Systems Projections Illuminations Rendering Culling and Clipping Implementations Viewing Systems Viewing Transformation Projective Transformation 2D Computer Graphics Devices

More information

Lighting and Shading Computer Graphics I Lecture 7. Light Sources Phong Illumination Model Normal Vectors [Angel, Ch

Lighting and Shading Computer Graphics I Lecture 7. Light Sources Phong Illumination Model Normal Vectors [Angel, Ch 15-462 Computer Graphics I Lecture 7 Lighting and Shading February 12, 2002 Frank Pfenning Carnegie Mellon University http://www.cs.cmu.edu/~fp/courses/graphics/ Light Sources Phong Illumination Model

More information

Comp 410/510 Computer Graphics. Spring Shading

Comp 410/510 Computer Graphics. Spring Shading Comp 410/510 Computer Graphics Spring 2017 Shading Why we need shading Suppose we build a model of a sphere using many polygons and then color it using a fixed color. We get something like But we rather

More information

Illumination and Shading

Illumination and Shading Illumination and Shading Computer Graphics COMP 770 (236) Spring 2007 Instructor: Brandon Lloyd 2/14/07 1 From last time Texture mapping overview notation wrapping Perspective-correct interpolation Texture

More information

Computer Graphics. Illumination and Shading

Computer Graphics. Illumination and Shading Rendering Pipeline modelling of geometry transformation into world coordinates placement of cameras and light sources transformation into camera coordinates backface culling projection clipping w.r.t.

More information

Illumination & Shading

Illumination & Shading Illumination & Shading Goals Introduce the types of light-material interactions Build a simple reflection model---the Phong model--- that can be used with real time graphics hardware Why we need Illumination

More information

Illumination Models & Shading

Illumination Models & Shading Illumination Models & Shading Lighting vs. Shading Lighting Interaction between materials and light sources Physics Shading Determining the color of a pixel Computer Graphics ZBuffer(Scene) PutColor(x,y,Col(P));

More information

Computer Science 426 Midterm 3/11/04, 1:30PM-2:50PM

Computer Science 426 Midterm 3/11/04, 1:30PM-2:50PM NAME: Login name: Computer Science 46 Midterm 3//4, :3PM-:5PM This test is 5 questions, of equal weight. Do all of your work on these pages (use the back for scratch space), giving the answer in the space

More information

Illumination & Shading: Part 1

Illumination & Shading: Part 1 Illumination & Shading: Part 1 Light Sources Empirical Illumination Shading Local vs Global Illumination Lecture 10 Comp 236 Spring 2005 Computer Graphics Jargon: Illumination Models Illumination - the

More information

Midterm Exam! CS 184: Foundations of Computer Graphics! page 1 of 14!

Midterm Exam! CS 184: Foundations of Computer Graphics! page 1 of 14! Midterm Exam! CS 184: Foundations of Computer Graphics! page 1 of 14! Student Name:!! Class Account Username:! Instructions: Read them carefully!! The exam begins at 2:40pm and ends at 4:00pm. You must

More information

Figure 1. Lecture 1: Three Dimensional graphics: Projections and Transformations

Figure 1. Lecture 1: Three Dimensional graphics: Projections and Transformations Lecture 1: Three Dimensional graphics: Projections and Transformations Device Independence We will start with a brief discussion of two dimensional drawing primitives. At the lowest level of an operating

More information

Ligh%ng in OpenGL. The Phong Illumina%on Model. Vector Background

Ligh%ng in OpenGL. The Phong Illumina%on Model. Vector Background Ligh%ng in OpenGL The Phong Illumina%on Model Vector Background 1 Vector Dot Product The dot product of two vectors is a number:! x $ # 1 v 1 = # y 1 # " z 1 %! x $ # 2 v 2 = # y 2 # " z 2 % In GLSL you

More information

CS130 : Computer Graphics Lecture 8: Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside

CS130 : Computer Graphics Lecture 8: Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside CS130 : Computer Graphics Lecture 8: Lighting and Shading Tamar Shinar Computer Science & Engineering UC Riverside Why we need shading Suppose we build a model of a sphere using many polygons and color

More information

CS Computer Graphics: Illumination and Shading I

CS Computer Graphics: Illumination and Shading I CS 543 - Computer Graphics: Illumination and Shading I by Robert W. Lindeman gogo@wpi.edu (with help from Emmanuel Agu ;-) Illumination and Shading Problem: Model light/surface point interactions to determine

More information

CS Computer Graphics: Illumination and Shading I

CS Computer Graphics: Illumination and Shading I CS 543 - Computer Graphics: Illumination and Shading I by Robert W. Lindeman gogo@wpi.edu (with help from Emmanuel Agu ;-) Illumination and Shading Problem: Model light/surface point interactions to determine

More information

Topics and things to know about them:

Topics and things to know about them: Practice Final CMSC 427 Distributed Tuesday, December 11, 2007 Review Session, Monday, December 17, 5:00pm, 4424 AV Williams Final: 10:30 AM Wednesday, December 19, 2007 General Guidelines: The final will

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

BETWEEN PHOTO-REALISM AND NON-PHOTO REALISTIC RENDERING MODELING URBAN AREAS FOR REAL TIME VR

BETWEEN PHOTO-REALISM AND NON-PHOTO REALISTIC RENDERING MODELING URBAN AREAS FOR REAL TIME VR BETWEEN PHOTO-REALISM AND NON-PHOTO REALISTIC RENDERING MODELING URBAN AREAS FOR REAL TIME VR Guenter Pomaska Bielefeld University of Applied Sciences, Faculty of Architecture and Civil Engineering, Germany

More information

Midterm Exam! CS 184: Foundations of Computer Graphics! page 1 of 13!

Midterm Exam! CS 184: Foundations of Computer Graphics! page 1 of 13! Midterm Exam! CS 184: Foundations of Computer Graphics! page 1 of 13! Student Name:!! Class Account Username:! Instructions: Read them carefully!! The exam begins at 1:10pm and ends at 2:30pm. You must

More information

COMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective

COMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective COMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective Department of Computing and Information Systems The Lecture outline Introduction Rotation about artibrary axis

More information

Interactive Real-Time Raycasting

Interactive Real-Time Raycasting Interactive Real-Time Raycasting CS184 AS4 Due 2009-02-26 11:00pm We start our exploration of Rendering - the process of converting a high-level object-based description into a graphical image for display.

More information

Ray Tracer Due date: April 27, 2011

Ray Tracer Due date: April 27, 2011 Computer graphics Assignment 4 1 Overview Ray Tracer Due date: April 27, 2011 In this assignment you will implement the camera and several primitive objects for a ray tracer, and a basic ray tracing algorithm.

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

Midterm Exam CS 184: Foundations of Computer Graphics page 1 of 11

Midterm Exam CS 184: Foundations of Computer Graphics page 1 of 11 Midterm Exam CS 184: Foundations of Computer Graphics page 1 of 11 Student Name: Class Account Username: Instructions: Read them carefully! The exam begins at 2:40pm and ends at 4:00pm. You must turn your

More information

Graphics Hardware and Display Devices

Graphics Hardware and Display Devices Graphics Hardware and Display Devices CSE328 Lectures Graphics/Visualization Hardware Many graphics/visualization algorithms can be implemented efficiently and inexpensively in hardware Facilitates interactive

More information

Visualisatie BMT. Rendering. Arjan Kok

Visualisatie BMT. Rendering. Arjan Kok Visualisatie BMT Rendering Arjan Kok a.j.f.kok@tue.nl 1 Lecture overview Color Rendering Illumination 2 Visualization pipeline Raw Data Data Enrichment/Enhancement Derived Data Visualization Mapping Abstract

More information

CPSC / Illumination and Shading

CPSC / Illumination and Shading CPSC 599.64 / 601.64 Rendering Pipeline usually in one step modelling of geometry transformation into world coordinate system placement of cameras and light sources transformation into camera coordinate

More information

Computer Graphics. Shading. Based on slides by Dianna Xu, Bryn Mawr College

Computer Graphics. Shading. Based on slides by Dianna Xu, Bryn Mawr College Computer Graphics Shading Based on slides by Dianna Xu, Bryn Mawr College Image Synthesis and Shading Perception of 3D Objects Displays almost always 2 dimensional. Depth cues needed to restore the third

More information

Computer Graphics. Illumination and Shading

Computer Graphics. Illumination and Shading () Illumination and Shading Dr. Ayman Eldeib Lighting So given a 3-D triangle and a 3-D viewpoint, we can set the right pixels But what color should those pixels be? If we re attempting to create a realistic

More information

Deferred Rendering Due: Wednesday November 15 at 10pm

Deferred Rendering Due: Wednesday November 15 at 10pm CMSC 23700 Autumn 2017 Introduction to Computer Graphics Project 4 November 2, 2017 Deferred Rendering Due: Wednesday November 15 at 10pm 1 Summary This assignment uses the same application architecture

More information

Today s class. Simple shadows Shading Lighting in OpenGL. Informationsteknologi. Wednesday, November 21, 2007 Computer Graphics - Class 10 1

Today s class. Simple shadows Shading Lighting in OpenGL. Informationsteknologi. Wednesday, November 21, 2007 Computer Graphics - Class 10 1 Today s class Simple shadows Shading Lighting in OpenGL Wednesday, November 21, 27 Computer Graphics - Class 1 1 Simple shadows Simple shadows can be gotten by using projection matrices Consider a light

More information

Raytracing CS148 AS3. Due :59pm PDT

Raytracing CS148 AS3. Due :59pm PDT Raytracing CS148 AS3 Due 2010-07-25 11:59pm PDT We start our exploration of Rendering - the process of converting a high-level object-based description of scene into an image. We will do this by building

More information

Computer Graphics Fundamentals. Jon Macey

Computer Graphics Fundamentals. Jon Macey Computer Graphics Fundamentals Jon Macey jmacey@bournemouth.ac.uk http://nccastaff.bournemouth.ac.uk/jmacey/ 1 1 What is CG Fundamentals Looking at how Images (and Animations) are actually produced in

More information

Maya tutorial. 1 Camera calibration

Maya tutorial. 1 Camera calibration Maya tutorial In this tutorial we will augment a real scene with virtual objects. This tutorial assumes that you have downloaded the file Maya.zip from the course web page and extracted it somewhere. 1

More information

Reflection and Shading

Reflection and Shading Reflection and Shading R. J. Renka Department of Computer Science & Engineering University of North Texas 10/19/2015 Light Sources Realistic rendering requires that we model the interaction between light

More information

WHY WE NEED SHADING. Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something like.

WHY WE NEED SHADING. Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something like. LIGHTING 1 OUTLINE Learn to light/shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build a simple reflection model---the Phong model--- that can

More information

Introduction to Visualization and Computer Graphics

Introduction to Visualization and Computer Graphics Introduction to Visualization and Computer Graphics DH2320, Fall 2015 Prof. Dr. Tino Weinkauf Introduction to Visualization and Computer Graphics Visibility Shading 3D Rendering Geometric Model Color Perspective

More information

Photorealism: Ray Tracing

Photorealism: Ray Tracing Photorealism: Ray Tracing Reading Assignment: Chapter 13 Local vs. Global Illumination Local Illumination depends on local object and light sources only Global Illumination at a point can depend on any

More information

CSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011 CSE 167: Introduction to Computer Graphics Lecture #7: Color and Shading Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011 Announcements Homework project #3 due this Friday,

More information

Lighting. Figure 10.1

Lighting. Figure 10.1 We have learned to build three-dimensional graphical models and to display them. However, if you render one of our models, you might be disappointed to see images that look flat and thus fail to show the

More information

7: Rendering (1) COMP Computer Graphics and Image Processing. Local illumination model. Global illumination model. Direct Direct.

7: Rendering (1) COMP Computer Graphics and Image Processing. Local illumination model. Global illumination model. Direct Direct. COMP27112 Computer Graphics and Image Processing 7: Rendering (1) Toby.Howard@manchester.ac.uk Local and global illumination Direct Direct Direct Direct Indirect Local illumination model Global illumination

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

Virtual Environments

Virtual Environments ELG 524 Virtual Environments Jean-Christian Delannoy viewing in 3D world coordinates / geometric modeling culling lighting virtualized reality collision detection collision response interactive forces

More information

Introduction to Computer Graphics 7. Shading

Introduction to Computer Graphics 7. Shading Introduction to Computer Graphics 7. Shading National Chiao Tung Univ, Taiwan By: I-Chen Lin, Assistant Professor Textbook: Hearn and Baker, Computer Graphics, 3rd Ed., Prentice Hall Ref: E.Angel, Interactive

More information

CS 325 Computer Graphics

CS 325 Computer Graphics CS 325 Computer Graphics 04 / 02 / 2012 Instructor: Michael Eckmann Today s Topics Questions? Comments? Illumination modelling Ambient, Diffuse, Specular Reflection Surface Rendering / Shading models Flat

More information

The University of Calgary

The University of Calgary The University of Calgary Department of Computer Science Final Examination, Questions ENEL/CPSC 555 Computer Graphics Time: 2 Hours Closed Book, calculators are permitted. The questions carry equal weight.

More information

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

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 CSE 167: Introduction to Computer Graphics Lecture #6: Lights Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 Announcements Thursday in class: midterm #1 Closed book Material

More information

Introduction Ray tracing basics Advanced topics (shading) Advanced topics (geometry) Graphics 2010/2011, 4th quarter. Lecture 11: Ray tracing

Introduction Ray tracing basics Advanced topics (shading) Advanced topics (geometry) Graphics 2010/2011, 4th quarter. Lecture 11: Ray tracing Lecture 11 Ray tracing Introduction Projection vs. ray tracing Projection Ray tracing Rendering Projection vs. ray tracing Projection Ray tracing Basic methods for image generation Major areas of computer

More information

Content. Coordinate systems Orthographic projection. (Engineering Drawings)

Content. Coordinate systems Orthographic projection. (Engineering Drawings) Projection Views Content Coordinate systems Orthographic projection (Engineering Drawings) Graphical Coordinator Systems A coordinate system is needed to input, store and display model geometry and graphics.

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

CEng 477 Introduction to Computer Graphics Fall

CEng 477 Introduction to Computer Graphics Fall Illumination Models and Surface-Rendering Methods CEng 477 Introduction to Computer Graphics Fall 2007 2008 Illumination Models and Surface Rendering Methods In order to achieve realism in computer generated

More information

Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1)

Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1) Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1) Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Why do we need Lighting & shading? Sphere

More information

Lecture 17: Recursive Ray Tracing. Where is the way where light dwelleth? Job 38:19

Lecture 17: Recursive Ray Tracing. Where is the way where light dwelleth? Job 38:19 Lecture 17: Recursive Ray Tracing Where is the way where light dwelleth? Job 38:19 1. Raster Graphics Typical graphics terminals today are raster displays. A raster display renders a picture scan line

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

Lighting Models. CS116B Chris Pollett Mar 21, 2004.

Lighting Models. CS116B Chris Pollett Mar 21, 2004. Lighting Models CS116B Chris Pollett Mar 21, 2004. Outline Overview Light Sources Surface Lighting Effect Basic Illumination Models Overview An illumination model (lighting model) is used to calculate

More information

Illumination and Shading

Illumination and Shading Illumination and Shading Illumination (Lighting)! Model the interaction of light with surface points to determine their final color and brightness! The illumination can be computed either at vertices or

More information

Sung-Eui Yoon ( 윤성의 )

Sung-Eui Yoon ( 윤성의 ) CS380: Computer Graphics Illumination and Shading Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/cg/ Course Objectives (Ch. 10) Know how to consider lights during rendering models

More information

Understanding Variability

Understanding Variability Understanding Variability Why so different? Light and Optics Pinhole camera model Perspective projection Thin lens model Fundamental equation Distortion: spherical & chromatic aberration, radial distortion

More information

1 Affine and Projective Coordinate Notation

1 Affine and Projective Coordinate Notation CS348a: Computer Graphics Handout #9 Geometric Modeling Original Handout #9 Stanford University Tuesday, 3 November 992 Original Lecture #2: 6 October 992 Topics: Coordinates and Transformations Scribe:

More information

Computer Graphics: 3-Local Illumination Models

Computer Graphics: 3-Local Illumination Models Computer Graphics: 3-Local Illumination Models Prof. Dr. Charles A. Wüthrich, Fakultät Medien, Medieninformatik Bauhaus-Universität Weimar caw AT medien.uni-weimar.de Introduction After having illustrated

More information

Objectives. Shading II. Distance Terms. The Phong Reflection Model

Objectives. Shading II. Distance Terms. The Phong Reflection Model Shading II Objectives Introduce distance terms to the shading model. More details about the Phong model (lightmaterial interaction). Introduce the Blinn lighting model (also known as the modified Phong

More information

Illumination in Computer Graphics

Illumination in Computer Graphics Illumination in Computer Graphics Ann McNamara Illumination in Computer Graphics Definition of light sources. Analysis of interaction between light and objects in a scene. Rendering images that are faithful

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

Shading, Advanced Rendering. Week 7, Wed Feb 28

Shading, Advanced Rendering. Week 7, Wed Feb 28 University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Shading, Advanced Rendering Week 7, Wed Feb 28 http://www.ugrad.cs.ubc.ca/~cs314/vjan2007 Reading for Today and Tomorrow

More information

Contents. Graphics Library Display 2D/3D objects Coordinate Systems Window and Viewport Transformation. CAD Graphics - 1

Contents. Graphics Library Display 2D/3D objects Coordinate Systems Window and Viewport Transformation. CAD Graphics - 1 Contents Graphics Library Display 2D/3D objects Coordinate Systems Window and Viewport Transformation CAD Graphics - 1 Device Driver vs. Graphics Library Device Driver A set of codes that controls a physical

More information

Introduction Rasterization Z-buffering Shading. Graphics 2012/2013, 4th quarter. Lecture 09: graphics pipeline (rasterization and shading)

Introduction Rasterization Z-buffering Shading. Graphics 2012/2013, 4th quarter. Lecture 09: graphics pipeline (rasterization and shading) Lecture 9 Graphics pipeline (rasterization and shading) Graphics pipeline - part 1 (recap) Perspective projection by matrix multiplication: x pixel y pixel z canonical 1 x = M vpm per M cam y z 1 This

More information

OpenGl Pipeline. triangles, lines, points, images. Per-vertex ops. Primitive assembly. Texturing. Rasterization. Per-fragment ops.

OpenGl Pipeline. triangles, lines, points, images. Per-vertex ops. Primitive assembly. Texturing. Rasterization. Per-fragment ops. OpenGl Pipeline Individual Vertices Transformed Vertices Commands Processor Per-vertex ops Primitive assembly triangles, lines, points, images Primitives Fragments Rasterization Texturing Per-fragment

More information

Computer Graphics. Instructor: Oren Kapah. Office Hours: T.B.A.

Computer Graphics. Instructor: Oren Kapah. Office Hours: T.B.A. Computer Graphics Instructor: Oren Kapah (orenkapahbiu@gmail.com) Office Hours: T.B.A. The CG-IDC slides for this course were created by Toky & Hagit Hel-Or 1 CG-IDC 2 Exercise and Homework The exercise

More information

CPSC 314 LIGHTING AND SHADING

CPSC 314 LIGHTING AND SHADING CPSC 314 LIGHTING AND SHADING UGRAD.CS.UBC.CA/~CS314 slide credits: Mikhail Bessmeltsev et al 1 THE RENDERING PIPELINE Vertices and attributes Vertex Shader Modelview transform Per-vertex attributes Vertex

More information

Supplementary Material: The Rotation Matrix

Supplementary Material: The Rotation Matrix Supplementary Material: The Rotation Matrix Computer Science 4766/6778 Department of Computer Science Memorial University of Newfoundland January 16, 2014 COMP 4766/6778 (MUN) The Rotation Matrix January

More information

Computer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model

Computer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model Computer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Why do we need Lighting

More information

CPSC GLOBAL ILLUMINATION

CPSC GLOBAL ILLUMINATION CPSC 314 21 GLOBAL ILLUMINATION Textbook: 20 UGRAD.CS.UBC.CA/~CS314 Mikhail Bessmeltsev ILLUMINATION MODELS/ALGORITHMS Local illumination - Fast Ignore real physics, approximate the look Interaction of

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

CS384G Midterm Examination Spring 2008

CS384G Midterm Examination Spring 2008 CS384G Midterm Examination Spring 2008 Each problem section is worth the indicated number of points. Show all work on these pages and don t forget to put your name on one of them! 1. (15 pts) In the two

More information

Fall 2016 Semester METR 3113 Atmospheric Dynamics I: Introduction to Atmospheric Kinematics and Dynamics

Fall 2016 Semester METR 3113 Atmospheric Dynamics I: Introduction to Atmospheric Kinematics and Dynamics Fall 2016 Semester METR 3113 Atmospheric Dynamics I: Introduction to Atmospheric Kinematics and Dynamics Lecture 5 August 31 2016 Topics: Polar coordinate system Conversion of polar coordinates to 2-D

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

Computer Graphics. Illumination Models and Surface-Rendering Methods. Somsak Walairacht, Computer Engineering, KMITL

Computer Graphics. Illumination Models and Surface-Rendering Methods. Somsak Walairacht, Computer Engineering, KMITL Computer Graphics Chapter 10 llumination Models and Surface-Rendering Methods Somsak Walairacht, Computer Engineering, KMTL Outline Light Sources Surface Lighting Effects Basic llumination Models Polygon

More information

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

Image Formation. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Image Formation Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Objectives Fundamental imaging notions Physical basis for image formation

More information

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows Recollection Models Pixels Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows Can be computed in different stages 1 So far we came to Geometry model 3 Surface

More information

L1 - Introduction. Contents. Introduction of CAD/CAM system Components of CAD/CAM systems Basic concepts of graphics programming

L1 - Introduction. Contents. Introduction of CAD/CAM system Components of CAD/CAM systems Basic concepts of graphics programming L1 - Introduction Contents Introduction of CAD/CAM system Components of CAD/CAM systems Basic concepts of graphics programming 1 Definitions Computer-Aided Design (CAD) The technology concerned with the

More information

MET71 COMPUTER AIDED DESIGN

MET71 COMPUTER AIDED DESIGN UNIT - II BRESENHAM S ALGORITHM BRESENHAM S LINE ALGORITHM Bresenham s algorithm enables the selection of optimum raster locations to represent a straight line. In this algorithm either pixels along X

More information

Homework #2. Shading, Ray Tracing, and Texture Mapping

Homework #2. Shading, Ray Tracing, and Texture Mapping Computer Graphics Prof. Brian Curless CSE 457 Spring 2000 Homework #2 Shading, Ray Tracing, and Texture Mapping Prepared by: Doug Johnson, Maya Widyasari, and Brian Curless Assigned: Monday, May 8, 2000

More information

Raytracing. COSC 4328/5327 Scott A. King

Raytracing. COSC 4328/5327 Scott A. King Raytracing COSC 4328/5327 Scott A. King Basic Ray Casting Method pixels in screen Shoot ray p from the eye through the pixel. Find closest ray-object intersection. Get color at intersection Basic Ray Casting

More information

Game Engineering: 2D

Game Engineering: 2D Game Engineering: 2D CS420-2010F-07 Objects in 2D David Galles Department of Computer Science University of San Francisco 07-0: Representing Polygons We want to represent a simple polygon Triangle, rectangle,

More information

Color and Light CSCI 4229/5229 Computer Graphics Fall 2016

Color and Light CSCI 4229/5229 Computer Graphics Fall 2016 Color and Light CSCI 4229/5229 Computer Graphics Fall 2016 Solar Spectrum Human Trichromatic Color Perception Color Blindness Present to some degree in 8% of males and about 0.5% of females due to mutation

More information

2D Image Transforms Computer Vision (Kris Kitani) Carnegie Mellon University

2D Image Transforms Computer Vision (Kris Kitani) Carnegie Mellon University 2D Image Transforms 16-385 Computer Vision (Kris Kitani) Carnegie Mellon University Extract features from an image what do we do next? Feature matching (object recognition, 3D reconstruction, augmented

More information

Computer Graphics 7: Viewing in 3-D

Computer Graphics 7: Viewing in 3-D Computer Graphics 7: Viewing in 3-D In today s lecture we are going to have a look at: Transformations in 3-D How do transformations in 3-D work? Contents 3-D homogeneous coordinates and matrix based transformations

More information