1 computer graphics week2 –creating a picture. steps for creating a picture creating a model...

18
1 Computer Graphics Week2 –Creating a Picture

Upload: harold-walker

Post on 03-Jan-2016

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the

1

Computer Graphics

Week2 –Creating a Picture

Page 2: 1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the

Steps for creating a picture

• Creating a model • Perform necessary transformation• Lighting and rendering the object• The goal is the creation of an image by writing a

program instead of taking a picture with a camera

• There exists an analogy between writing graphical programs and taking pictures by a camera

2

Page 3: 1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the

Pixels

• Pixel or “Picture element” is the simplest element in computer graphics

• Single location on the computer screen or printout

• Value of each pixel is the range from white to black or range of intensities of red, green, blue (RGB) colors.

3

Page 4: 1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the

Frame buffers

• The pixels of an image are organized into two dimensional grid – frame buffer

• Multiple frame buffers can be stored in computer memory

• Double buffering – first image is drawn into frame buffer and sent to display. While the user is looking on the display, the next picture is drawing to the second buffer.

4

Page 5: 1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the

Windows

• Image don’t fill the entire screen but is drawn into a window

• Pixels are adressed within the window based on their location

• Relative position of each pixel enables moving the window and change its size

5

Page 6: 1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the

Realistic images

• Calculating pixel values to create impression of a realistic picture

• Simulation of objects from the real word• Approximation of physical properties of

objects• Limitations given by computing time and

memory space

6

Page 7: 1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the

The Graphics Pipeline

• Modeling – creates an internal representation of the objects in the scene

• Rendering – converts the screen description into image

• Display – shows the image on the output device

7

Page 8: 1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the

The Graphics Pipeline

8

Object Specification

Model

TransformationScene Description

Scene DescriptionModel

TransformationView and Light Specification

Clipping and Hidden Surface Removal

Shading Image

Page 9: 1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the

The Graphics Pipeline

9

Display TransformationImage Output

Page 10: 1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the

Applications of Computer Graphics

1. Display of information2. Design3. Simulation and animation4. User interfaces

10

Page 11: 1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the

• Display of information– Maps – GIS (geographic information system)– CT (computer tomography)– MRI (magnetic resonance imaging) – PET (positron-emission tomography)– Fluid flow, molecular biology, mathematics…

11

Page 12: 1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the

Display of Information

12

Page 13: 1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the

Applications of Computer Graphics.

• Design– CAD (computer-aided design):

VLSI (very-large-scale integrated) circuits– Together with other tools:

architecture or interior design

13

Page 14: 1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the

Interior Design

14

Page 15: 1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the

Applications of Computer Graphics

• Simulation and animation– Flight simulation – pilot training– Games and educational software– Benefits:

• Less cost• Less danger, e.g. combination with the VR (virtual

reality) techniques can help surgical interns and astronauts

15

Page 16: 1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the

Applications of Computer Graphics

• User interfaces– Friendly working environment:

windows, icons, menus, pointing devices

16

Interface for a painting program

Page 17: 1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the

Application Programmer’s Interface

17Specifications of the functions in the graphics library

•The OpenGL graphics system is an Application Programming Interface (API) to graphics hardware.

Page 18: 1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the

Three-dimensional APIs

• Objects• Viewers• Light sources• Material properties

18