Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 1: Graphics Systems and Models www.themegallery.com Instructor: Shih-Shinh Huang 1.

Similar presentations


Presentation on theme: "Chapter 1: Graphics Systems and Models www.themegallery.com Instructor: Shih-Shinh Huang 1."— Presentation transcript:

1 Chapter 1: Graphics Systems and Models www.themegallery.com Instructor: Shih-Shinh Huang 1

2 Outlines  Introduction  Image Formation  Programmer Interface  Graphics Architecture 2

3 Introduction  What is Computer Graphics?  Concern with all aspects of producing pictures or images using computer. 3 where did this image come from?

4 Introduction  Applications  Information Display : Graphics for Scientific, Engineering, and Medical Data 4 Medical ImageNebula

5 Introduction  Applications  Design : Graphics for Engineering and Architectural System 5 AutoCAD 2002Interior Design

6 Introduction  Applications  Simulation and Animation: Computer- Generated Models of Physical, Financial and Economic Systems for Educational Aids 6 Flight SimulatorMars Rover Simulator

7 Introduction  Applications  User Interfaces : Graphics for Artist 7 Painter

8 Introduction  Applications  Entertainment: Graphics for Movie, Game, VR 8 Final FantasyOnline Game

9 Introduction  Graphics System 9 Input devices Output device Image formed in FB

10 Introduction  Graphics System  Input Devices The system is usually equipped with pointing devices (location + buttons). The common devices are mouse, joystick, and data tablet. Data gloves or computer vision system can provide higher-dimensional data. 10

11 Introduction  Graphics System  Input Devices 11

12 Introduction  Graphics System  Input Devices 12

13 Introduction  Graphics System  Processors In a simple system, there are only one processor for normal processing and graphical processing. Today, all graphics system are characterized by special-purpose graphical processing unit (GPU) It takes charge of a conversion of geometric entities to pixel in the frame buffer (Rasterization). 13

14 Introduction  Graphics System  Pixels An image is produced as an array (raster) of picture elements (pixel). 14 row column

15 Introduction  Graphics System  Frame Buffer It is a part of memory to store the set of pixels. It is usually implemented with special type of memory chips to enable redisplaying. Resolution: the number of pixels in frame buffer Depth or Precision: the number of bits used for each pixel. 15

16 Introduction  Graphics System  Output Device The general display is cathode-ray tube (CRT) 16

17 Image Formation  Description  Image formation is a process analogous to how images are formed by physical systems Human Visual System Camera  The process combining the specification of objects with viewers to produce 2D image. Object is an entity existing in space independent of any image-formation process and any viewer. Viewers is a way to from images from objects. 17

18 Image Formation 18 Images seen by three different views Camera View Object

19 Image Formation  Light Description  Light is a form of electromagnetic radiation Wavelengths Frequencies  The wavelengths in the range of 350 (nm) to 780 nm is called visible spectrum 19

20 Image Formation  Pinhole Camera Model  A pinhole camera is a box with a small hole in the center of one side.  The film is placed inside the box on the side opposite the pinhole 20

21 Image Formation  Pinhole Camera Model  Point Projection 21

22 Image Formation  Pinhole Camera Model  Field or View of Angle The angle made by the largest object that our image can image on its film plane. 22

23 Image Formation  Pinhole Camera Model  Depth of Field The longest distance that the objects can appear on its film plane. The ideal pinhole camera model has an infinite depth of field.  Limitations The pinhole is so small that it admits only a single ray from a point source The camera cannot be adjusted to have different angle of view. 23

24 Image Formation  Human Visual System 24 視網膜上兩種視覺接受器: 錐細胞錐細胞 (cone): 6~7 million 桿細胞桿細胞 (rod):75~150 million

25 Image Formation  Human Visual System 25 人類的視覺神經路徑人類的視覺神經路徑 網膜 → 視交叉 → 側膝核 → 視皮質網膜 → 視交叉 → 側膝核 → 視皮質

26 Image Formation  Synthetic-Camera Model  The image plane is moved in front of camera.  The limitation of field can be expressed by placing a clipping window. 26 Clipping Window Projection Plane Center of Projection (COP)

27 Programmer Interface  Description  There are numerous ways that a user can interact with a graphics system. A user develops images through interactions with display using input devices. Someone develops the code for the application 27

28 Programmer Interface  API Functions  It is to provide interfaces between an application program and a graphics system.  API in OpenGL It is to specify how to form an image: (1) Objects, (2) Viewer, (3) Light Source(s), (4) Materials  The APIs provided by OpenGL is based on the synthetic-camera model. 28

29 Programmer Interface  Objects  Objects are usually defined by sets of vertices  Most APIs provide sets of primitive objects (primitives) for the user. Points (0D object) Line segments (1D objects) Polygons (2D objects) Some curves and surfaces  OpenGL programs define primitives through lists of vertices. 29

30 Programmer Interface  Example 30 glBegin(GL_POLYGON) glVertex3f(0.0, 0.0, 0.0); glVertex3f(0.0, 1.0, 0.0); glVertex3f(0.0, 0.0, 1.0); glEnd( ); type of object location of vertex end of object definition

31 Programmer Interface  Example  glBegin() and glEnd() brackets the calls to define the object to be drawn.  OpenGL Commands Prefix: gl Initial capital letters for each word Optional Character: number of arguments or type  OpenGL Constants Prefix: GL All characters are capitilized Underscores among Words. 31 glVertex3f(0.0, 0.0, 0.0); glBegin(GL_POLYGON)

32 Programmer Interface  Viewer  Available APIs differ in how much flexibility in camera selection.  Camera Specifications Position Orientation Focal Length Film Plane. 32

33 Programmer Interface  Light  Point sources v.s distributed sources  Spot lights  Near and far sources  Color properties  Material Properties  Absorption: color properties  Scattering 33

34 Graphics Architecture  General Description  Two Sides of API Application Program Combination of hardware and software that implements the functionality of the API.  Various approaches are to develop graphics architectures for supporting graphics APIs. 34

35 Graphics Architecture  Early Graphics System  It used general-purposed computers characterized by a CPU.  CPU Task Run the application program Compute the endpoints of line segment. 35

36 Graphics Architecture  Display Processors  The display processors include instructions to display primitives.  The display primitives are stored in its own memory denoted as display list. 36

37 Graphics Architecture  Pipeline Architecture  The creation of special-purpose VLSI chips enables the pipeline technology.  The pipeline is workable in graphics because it processes data in the same manner.  For two stage pipeline, the throughput of the system has been doubled. 37 a+(b*c)

38 Graphics Architecture  Scene Geometry  Scene geometry is the collection of primitives and vertices. A scene consists of a set of objects. Each object comprises a set of primitives. A primitive comprises a set of vertices.  In a complex scene, there are may be thousands of vertices.  We must process all these vertices in a similar manner to form an image in the frame buffer. 38

39 Graphics Architecture  Graphics Pipeline  The imaging processing includes four steps. Vertex Processing Clipping and Primitive Assembly Rasterization Fragment Processing  These four steps can be performed in a pipeline manner. 39

40 Graphics Architecture  Vertex Processing  Coordinate Transformation: imaging process is a transformation between different coordinate system.  Vertex Coloring Program Specification Computation from a realistic shading model. 40

41 Graphics Architecture  Clipping and Primitive Assembly  Determine the area in the world that can be seen by the camera.  Clipping Volume The projection in this volume appear in the image. Those that are outside are to be clipped out.  The clipping is done in primitive level rather than vertex level.  The output of this stage is a set of primitives whose projections can appear in the image. 41

42 Graphics Architecture  Clipping and Primitive Assembly 42 3D Clipping Volume 2D Clipping Volume

43 Graphics Architecture  Rasterization (Drawing)  It converts the primitives in terms of vertices to pixels in the frame buffer.  The output is a set of fragments for each primitive, that is, pixel with color or location  Fragment Processing  It takes the generated fragments to update the pixels in the frame buffer.  The pixels in frame buffer can be read to blend with the fragment. 43

44 44


Download ppt "Chapter 1: Graphics Systems and Models www.themegallery.com Instructor: Shih-Shinh Huang 1."

Similar presentations


Ads by Google