graphics-1 gentle introduction to computer graphics based on: –david brogan’s “introduction to...

Post on 19-Dec-2015

229 Views

Category:

Documents

5 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Graphics-1

Gentle Introduction to Computer Graphics

• Based on:– David Brogan’s “Introduction to Computer

Graphics” Course Slides, University of Virginia

– Jack van Wijk’s “Computer Graphics” Course Slides, University of Eindhoven.

Graphics-2

Outline

• Graphics Applications

• What is Computer Graphics

• Representations in Graphics

• Supporting Disciplines

• Introduction to 2d Modeling Transformations

• Matrix Representations

• Linear Transformations

Graphics-3

Graphics Applications

• Entertainment: Cinema

Pixar: Monster’s Inc.

A Bug’s Life (Pixar)

Graphics-4

Graphics Applications

• Medical Visualization

MIT: Image-Guided Surgery Project

Th

e V

isib

le H

um

an

Pro

jec

t

Graphics-5

Graphics Applications

• Everyday use

Graphics-6

Graphics Applications

• Scientific Visualization

Graphics-7

Graphics Applications

• Computer Aided Design (CAD)

Graphics-8

Graphics Applications

• Training

Designing Effective Step-By-Step Assembly Instructions (Maneesh Agrawala et. al)

Graphics-9

Graphics Applications

• Games

GT Racer 3

Polyphony Digital: Gran Turismo 3, A Spec

Graphics-10

Graphics Applications

• Games

Circus Atari (Atari)

Graphics-11

What is Computer Graphics?

• Computer graphics: generating 2D images of a 3D world represented in a computer.

• Main tasks:– modeling: (shape) creating and representing

the geometry of objects in the 3D world– rendering: (light, perspective) generating 2D

images of the objects– animation: (movement) describing how

objects change in time

Graphics-12

What is Computer Graphics?

ImageMath. ModelImage Analysis(pattern recognition)

Image Synthesis(Rendering)

Modeling Image processing

Graphics-13

Representations in graphics

Vector Graphics

• Image is represented by continuous geometric objects: lines, curves, etc.

Raster Graphics

• Image is represented as a rectangular grid of colored pixels

Graphics-14

Vector graphics

• Graphics objects: geometry + color

• Relatively low processing time– in terms of the number of graphic objects

• Geometric transformation possible without loss of information (zoom, rotate, …)

• Examples: PowerPoint, CorelDraw, ...

Graphics-15

Raster graphics

• Generic

• Image processing techniques

• Geometric Transformation: loss of information

• Relatively high processing time– in terms of the number of pixels

• Realistic images, textures, ...

• Examples: Paint, PhotoShop, ...

Graphics-16

Supporting Disciplines

• Computer science (algorithms, data structures, software engineering, …)

• Mathematics (geometry, numerical, …)

• Physics (Optics, mechanics, …)

• Psychology (Colour, perception)

• Art and design

Graphics-17

Introduction to Modeling Transformations

• Specify transformations for objects – Allows definitions of objects in own

coordinate systems– Allows use of object definition multiple

times in a scene

Graphics-18

2D Modeling Transformations

ScaleRotate

Translate

ScaleTranslate

x

y

World Coordinates

ModelingCoordinates

Graphics-19

Scaling

• Scaling a coordinate means multiplying each of its components by a scalar

• Uniform scaling means this scalar is the same for all components:

2

Graphics-20

• Non-uniform scaling: different scalars per component:

• How can we represent this in matrix form?

Scaling

X 2,Y 0.5

Graphics-21

Scaling

• Scaling operation:

• Or, in matrix form:

by

ax

y

x

'

'

y

x

b

a

y

x

0

0

'

'

scaling matrix

Graphics-22

2-D Rotation

(x, y)

(x’, y’)

x’ = x cos() - y sin()y’ = x sin() + y cos()

Graphics-23

2-D Rotation

• This is easy to capture in matrix form:

• Even though sin() and cos() are nonlinear functions of ,– x’ is a linear combination of x and y– y’ is a linear combination of x and y

y

x

y

x

cossin

sincos

'

'

Graphics-24

2-D Translation

(x, y)

(x’, y’)

x’ = x + txy’ = y + ty

tx

ty

top related