Presentation is loading. Please wait.

Presentation is loading. Please wait.

In the name of God Computer Graphics.

Similar presentations


Presentation on theme: "In the name of God Computer Graphics."— Presentation transcript:

1 In the name of God Computer Graphics

2 Overview Introduction Geometry Interaction Graphic systems
Graphics Standards

3 Is Computer Graphics Important?

4 Graphics Systems Interface between users and application software
Consists of input subroutines and output subroutines accepting input data or commands from a user and converting internal representations into external pictures on screen, respectively

5 Software Portability and Graphics Standards
It used to be low-level and device dependent packages supplied by the vendor, making it very difficult to port the software. We have now moved to high-level device independent packages, which allow much easier porting of software. Several standard device-independent graphics libraries are based on geometric modeling.

6 Graphics Software History(1)
Graphics Software Standards: CORE -- 3D Core Graphics Systems -- a specification produced by an ACM SIGGRAPH committee in 1977. GKS - Graphical Kernel System -- (1985) cleaned up and implemented the 2D portion of CORE. GKS-3D (1988) -- implemented CORE’s 3D portions. Permitted the grouping of primitives (such as lines, polygons, and character strings -- and their attributes) into collections.

7 Graphics Software History(2)
PHIGS - Programmers Hierarchical Interactive Graphics System (1988) PHIGS also supports a retained database of structures, and automatically updated the screen when the database had been altered. PHIGS+ (1992) added features for photorealistic rendering. Other standards Postscript X-Windows OpenGL PEX

8 3D Graphics Goal: To produce 2D images of a mathematically described 3D environment Issues: Describing the environment: Modeling Computing the image: Rendering What does it take to describe a scene?

9 Graphics Toolkits Graphics toolkits typically take care of the details of producing images from geometry Input (via API functions): Where the objects are located and what they look like Where the camera is and how it behaves Parameters for controlling the rendering Functions (via API): Perform well defined operations based on the input environment Output: Pixel data in a framebuffer – an image in a special part of memory Data can be put on the screen Data can be read back for processing (part of toolkit)

10 OpenGL OpenGL is an open standard graphics toolkit
Derived from SGI’s GL toolkit Provides a range of functions for modeling, rendering and manipulating the framebuffer Why use it? Alternatives: Direct3D, Java3D - more complex and less well supported respectively

11 Coordinate Systems(1) The use of coordinate systems is fundamental to computer graphics Coordinate systems are used to describe the locations of points in space Multiple coordinate systems make graphics algorithms easier to understand and implement

12 Coordinate Systems (2) Different coordinate systems represent the same point in different ways Some operations are easier in one coordinate system than in another For instance, given a point and a box, which coordinate system makes it easy to determine if the point is in the box? (2,3) (1,2) v v y y u u x x

13 Transformations Transformations convert points between coordinate systems (2,3) u=x-1 v=y-1 (1,2) v v y y u x=u+1 y=v+1 u x x

14 Transformations (Alternate Interpretation)
Transformations modify an object’s shape and location in one coordinate system The previous interpretation is better for some problems, this one is better for others (2,3) x’=x-1 y’=y-1 y y (1,2) x=x’+1 y=y’+1 x x

15 2D Translation Moves an object y y by x bx x

16 2D Translation Moves an object y y by x bx x

17 2D Scaling Resizes an object in each dimension y y syy y x x sxx x

18 2D Scaling Resizes an object in each dimension y y syy y x x sxx x

19 2D Rotation Rotate counter-clockwise about the origin by an angle  y
x x

20 2D Rotation Rotate counter-clockwise about the origin by an angle  y
x x

21 X-Axis Shear Shear along x axis (What is the matrix for y axis shear?)

22 X-Axis Shear Shear along x axis (What is the matrix for y axis shear?)

23 Reflect About X Axis x x What is the matrix for reflect about Y axis?

24 Reflect About X Axis x x What is the matrix for reflect about Y axis?

25 Rotating About An Arbitrary Point
What happens when you apply a rotation transformation to an object that is not at the origin? y ? x

26 Rotating About An Arbitrary Point
What happens when you apply a rotation transformation to an object that is not at the origin? It translates as well y x x

27 How Do We Fix it? How do we rotate an about an arbitrary point?
Hint: we know how to rotate about the origin of a coordinate system

28 Rotating About An Arbitrary Point
x x y y x x

29 Rotate About Arbitrary Point
Say you wish to rotate about the point (a,b) You know how to rotate about (0,0) Translate so that (a,b) is at (0,0) x’=x–a, y’=y–b Rotate x”=(x-a)cos-(y-b)sin, y”=(x-a)sin+(y-b)cos Translate back again xf=x”+a, yf=y”+b

30 Scaling an Object not at the Origin
What also happens if you apply the scaling transformation to an object not at the origin? Based on the rotating about a point composition, what should you do to resize an object about its own center?

31 Back to Rotation About a Pt
Say R is the rotation matrix to apply, and p is the point about which to rotate Translation to Origin: Rotation: Translate back: The translation component of the composite transformation involves the rotation matrix. What a mess!

32 Basic Transformations
Translation: Rotation: Scaling:

33 3D Translation


Download ppt "In the name of God Computer Graphics."

Similar presentations


Ads by Google