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

Post on 03-Jan-2016

225 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1

Computer Graphics

Week2 –Creating a Picture

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

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

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

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

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

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

The Graphics Pipeline

8

Object Specification

Model

TransformationScene Description

Scene DescriptionModel

TransformationView and Light Specification

Clipping and Hidden Surface Removal

Shading Image

The Graphics Pipeline

9

Display TransformationImage Output

Applications of Computer Graphics

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

10

• 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

Display of Information

12

Applications of Computer Graphics.

• Design– CAD (computer-aided design):

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

architecture or interior design

13

Interior Design

14

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

Applications of Computer Graphics

• User interfaces– Friendly working environment:

windows, icons, menus, pointing devices

16

Interface for a painting program

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.

Three-dimensional APIs

• Objects• Viewers• Light sources• Material properties

18

top related