1 Jinxiang Chai CSCE 441 Computer Graphics. 2 Midterm Time: 10:10pm-11:20pm, 10/20 Location: HRBB 113.

Slides:



Advertisements
Similar presentations
CS 4731: Computer Graphics Lecture 20: Raster Graphics Part 1 Emmanuel Agu.
Advertisements

CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
Graphics Pipeline.
10/10/02 (c) 2002 University of Wisconsin, CS 559 Last Time Finished viewing: Now you know how to: –Define a region of space that you wish to view – the.
3D Graphics Rendering and Terrain Modeling
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Hidden Surface Removal 고려대학교 컴퓨터 그래픽스 연구실.
Jinxiang Chai CSCE441: Computer Graphics Coordinate & Composite Transformations 0.
1 CSCE 441 Computer Graphics: 2D Transformations Jinxiang Chai.
1 CSCE 441: Computer Graphics Hidden Surface Removal (Cont.) Jinxiang Chai.
IAT 3551 Computer Graphics Overview Color Displays Drawing Pipeline.
Graphics Systems I-Chen Lin’s CG slides, Doug James’s CG slides Angel, Interactive Computer Graphics, Chap 1 Introduction to Graphics Pipeline.
1 Chapter 5 Viewing. 2 Perspective Projection 3 Parallel Projection.
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)
Graphics Pipeline Rasterization CMSC 435/634. Drawing Terms Primitive – Basic shape, drawn directly – Compare to building from simpler shapes Rasterization.
2D Transformations x y x y x y. 2D Transformation Given a 2D object, transformation is to change the object’s Position (translation) Size (scaling) Orientation.
2D Transformations Unit - 3. Why Transformations? In graphics, once we have an object described, transformations are used to move that object, scale it.
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
2/26/04© University of Wisconsin, CS559 Spring 2004 Last Time General Orthographic Viewing –Specifying cameras in world coordinates –Building world  view.
Basic graphics. ReviewReview Viewing Process, Window and viewport, World, normalized and device coordinates Input and output primitives and their attributes.
Basics of Rendering Pipeline Based Rendering –Objects in the scene are rendered in a sequence of steps that form the Rendering Pipeline. Ray-Tracing –A.
Computer Graphics Panos Trahanias ΗΥ358 Spring 2009.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Computer Graphics (fall 2009)
02/26/02 (c) 2002 University of Wisconsin, CS 559 Last Time Canonical view pipeline Orthographic projection –There was an error in the matrix for taking.
Week 2 - Wednesday CS361.
MIT EECS 6.837, Durand and Cutler Graphics Pipeline: Projective Transformations.
CS559: Computer Graphics Lecture 9: Projection Li Zhang Spring 2008.
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 Going-through.
Graphics Graphics Korea University cgvr.korea.ac.kr 3D Viewing 고려대학교 컴퓨터 그래픽스 연구실.
OpenGL Conclusions OpenGL Programming and Reference Guides, other sources CSCI 6360/4360.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 2D Viewing 고려대학교 컴퓨터 그래픽스 연구실.
COMPUTER GRAPHICS CSCI 375. What do I need to know?  Familiarity with  Trigonometry  Analytic geometry  Linear algebra  Data structures  OOP.
CAP4730: Computational Structures in Computer Graphics 3D Transformations.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Jinxiang Chai Composite Transformations and Forward Kinematics 0.
OpenGL: Introduction Yanci Zhang Game Programming Practice.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
1Computer Graphics Implementation II Lecture 16 John Shearer Culture Lab – space 2
CS559: Computer Graphics Lecture 9: Rasterization Li Zhang Spring 2008.
Implementation II.
Jens Krüger & Polina Kondratieva – Computer Graphics and Visualization Group computer graphics & visualization 3D Rendering Praktikum: Shader Gallery The.
Basic Perspective Projection Watt Section 5.2, some typos Define a focal distance, d, and shift the origin to be at that distance (note d is negative)
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Jinxiang Chai CSCE 441 Computer Graphics 3-D Viewing 0.
Subject Name: Computer Graphics Subject Code: Textbook: “Computer Graphics”, C Version By Hearn and Baker Credits: 6 1.
Rendering Pipeline Fall, D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination.
Computer Graphics I, Fall 2010 Implementation II.
Jens Krüger & Polina Kondratieva – Computer Graphics and Visualization Group computer graphics & visualization GameFX C# / DirectX 2005 The Rendering Pipeline.
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
CS 445 / 645: Introductory Computer Graphics Review.
Lecture 13: Raster Graphics and Scan Conversion
Midterm Review. Overall No OpenGL programming questions, but programming pipeline and concepts of important OpenGL functions are required. – Parameter.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Jinxiang Chai CSCE441: Computer Graphics Coordinate & Composite Transformations 0.
CSCE 441 Computer Graphics: 2D Transformations
Outline 3D Viewing Required readings: HB 10-1 to 10-10
Computer Graphics Overview
Rendering Pipeline Fall, 2015.
3D Viewing cgvr.korea.ac.kr.
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics
Graphics Fundamentals
Clipping Polygon Clipping Polygon : Area primitive
CSCE 441 Computer Graphics 3-D Viewing
Modeling 101 For the moment assume that all geometry consists of points, lines and faces Line: A segment between two endpoints Face: A planar area bounded.
3D Graphics Rendering PPT By Ricardo Veguilla.
CSCE 441: Computer Graphics Hidden Surface Removal
CSCE441: Computer Graphics Coordinate & Composite Transformations
CSCE441: Computer Graphics 2D/3D Transformations
Rendering – Matrix Transformations and the Graphics Pipeline
Presentation transcript:

1 Jinxiang Chai CSCE 441 Computer Graphics

2 Midterm Time: 10:10pm-11:20pm, 10/20 Location: HRBB 113

3 What you’ve learned in this class? 2D Graphics  Drawing lines, polygons  Color 3D Graphics  Transformations Hidden surface removals

4 Scan Line Conversion How to draw a line? - Digital Differential Analyzer (DDA) - Midpoint algorithm - Understand both algorithms - Strengths and limitations

5 Scan Conversion of Polygons How to draw a polygons? - Active edge list - Boundary fill - Flood fill - Understand three algorithms - Limitations and strengths

6 Clipping Lines

7

8 Given a line with end-points (x 0, y 0 ), (x 1, y 1 ) and clipping window (x min, y min ), (x max, y max ), determine if line should be drawn and clipped end-points of line to draw. (x 0, y 0 ) (x 1, y 1 ) (x min, y min ) (x max, y max )

9 Line Clipping How to clip a line? - Simple line clipping algorithm - Cohen--Sutherland - Liang-Barsky

10 Clipping Polygons Clipping polygons is more complex than clipping the individual lines  - Input: polygon

11 Clipping Polygons Clipping polygons is more complex than clipping the individual lines  - Input: polygon  - Output: original polygon, new polygon, or nothing

12 Polygon Clipping How to clip a polygon? - Sutherland-Hodgman Clipping (convex polygons) - Weiler-Atherton Algorithm (general polygons)

13 2D/3D Transformation Various transform matrices - 2D/3D rotation - 2D/3D translation - 2D/3D scaling - 2D affine transform

14 Arbitrary Rotation Center To rotate about an arbitrary point P (px,py) by  : (px,py)

15 Arbitrary Rotation Center To rotate about an arbitrary point P (px,py) by  :  Translate the object so that P will coincide with the origin: T(-px, -py) (px,py)

16 Arbitrary Rotation Center To rotate about an arbitrary point P (px,py) by  :  Translate the object so that P will coincide with the origin: T(-px, -py)  Rotate the object: R(  ) (px,py)

17 Arbitrary Rotation Center To rotate about an arbitrary point P (px,py) by  :  Translate the object so that P will coincide with the origin: T(-px, -py)  Rotate the object: R(  )  Translate the object back: T(px,py) (px,py)

18 Translate the object so that P will coincide with the origin: T(-px, -py) Rotate the object: R(  ) Translate the object back: T(px,py) Put in matrix form: T(px,py) R(  ) T(-px, -py) * P x’ 1 0 px cos(  ) -sin(  ) px x y’ = 0 1 py sin(  ) cos(  ) py y Arbitrary Rotation Center

19 The standard scaling matrix will only anchor at (0,0) Sx Sy What if I want to scale about an arbitrary pivot point? Scaling Revisit

20 2D/3D Coordinate Transformation Various transform matrix - 2D/3D rotation - 2D/3D translation - 2D/3D scaling - 2D affine transform How to do 2D/3D matrix composition

21 2D Coordinate Transformation Transform object description from to p 21

22 2D Coordinate Transformation 2D translation p

23 2D Coordinate Transformation 2D translation&rotation p 23

24 2D Coordinate Transformation 2D translation & scaling p 24

25 Hierarchical Modeling: Lamp What’s the current coordinate A ? 25 How to do opengl implementation?

26 A More Complex Example: Human Figure How to do opengl implementation?

27 Image space 3D->2D Geometry Pipeline 27 Normalized project space View space World spaceObject space Aspect ratio & resolution Focal length Rotate and translate the camera

28 3D Geometry Pipeline Before being turned into pixels by graphics hardware, a piece of geometry goes through a number of transformations Model space (Object space)

29 3D Geometry Pipeline Before being turned into pixels by graphics hardware, a piece of geometry goes through a number of transformations World space (Object space)

30 3D Geometry Pipeline Before being turned into pixels by graphics hardware, a piece of geometry goes through a number of transformations Eye space (View space)

31 Camera Coordinate 31

32 3D Coordinate Trans. Transform object description from camera to world 32

33 Viewing Trans: gluLookAt 33 gluLookAt (eye x,eye y,eye z,at x,at y,at z,up x, up y,up z )

34 Mapping from world to eye coordinates Viewing Trans: gluLookAt How to determine ? gluLookAt (eye x,eye y,eye z,at x,at y,at z,up x, up y,up z )

35 Mapping from world to eye coordinates Viewing Trans: gluLookAt gluLookAt (eye x,eye y,eye z,at x,at y,at z,up x, up y,up z )

36 Mapping from world to eye coordinates Viewing Trans: gluLookAt gluLookAt (eye x,eye y,eye z,at x,at y,at z,up x, up y,up z )

37 Mapping from world to eye coordinates Viewing Trans: gluLookAt H&B equation (7-1) gluLookAt (eye x,eye y,eye z,at x,at y,at z,up x, up y,up z )

38 3D Geometry Pipeline Before being turned into pixels by graphics hardware, a piece of geometry goes through a number of transformations Normalized projection space

39 Consider the projection of a point on the camera plane 3D->2D 39 By similar triangles, we can compute how much the x and y coordinates are scaled

40 Now we can rewrite the perspective projection equation as matrix-vector multiplications The Perspective Matrix 40 After the division by w, we have

41 Projections Parallel projection - definition - properties Perspective projection - definition - homogeneous coordinates - vanishing point - properties

42 3D Geometry Pipeline Before being turned into pixels by graphics hardware, a piece of geometry goes through a number of transformations Image space, window space, raster space, screen space, device space

43 Scan conversion 3D Rendering pipeline Modeling transformation lighting Viewing transformation Project transformation Clipping Image Transform into 3D world system Illuminate according to lighting and reflectance Transform into 3D camera coordinate system Transform into 2D camera system Clip primitives outside camera’s view Draw pixels (includes texturing, hidden surface, etc.)

44 Hidden Surface Removals Backface Culling Painter’s algorithm BSP Z-buffer Scan line Ray casting

For Example, BSP Tree Traversal order? 1->6->(5-2)->(7-2)->3->4->(5-1)->(7-1)->2 b b bf f f b b

46 Color Understanding chromaticity diagram and its concept Understanding various color models: - RGB - CMY/CMYK - YUV/YIQ - HSV - XYZ, etc.

47 Chromaticity Diagram How to obtain chromaticity diagram? Where are spectral colors and non- spectral colors located? How to determine purity/saturation and dominant wave length/hues for a given color? How to identify complementary colors? How to compare color gamuts for different primaries? Why three primary colors are not sufficient to represent all colors? Image taken from /color1/node27.html

48 What you’ve learned in this class? 2D Graphics  Drawing lines, polygons Color 3D Graphics  Transformations