computer graphics nv1 (1dt383) computer graphics (1tt180)

24
Computer Graphics NV1 (1DT383) Computer Graphics (1TT180) Cary Laxer, Ph.D. Visiting Lecturer

Upload: tamber

Post on 19-Jan-2016

65 views

Category:

Documents


0 download

DESCRIPTION

Computer Graphics NV1 (1DT383) Computer Graphics (1TT180). Cary Laxer, Ph.D. Visiting Lecturer. Today’s class. Introductions Graphics system overview. Introductions. Instructor. Cary Laxer Visiting lecturer - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Computer Graphics NV1 (1DT383)Computer Graphics (1TT180)

Cary Laxer, Ph.D.

Visiting Lecturer

Page 2: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 2

Today’s class

Introductions Graphics system overview

Page 3: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Introductions

Page 4: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 4

Instructor Cary Laxer Visiting lecturer Home institution is Rose-Hulman Institute of

Technology, Terre Haute, Indiana, USA Professor and Head of Computer Science and

Software Engineering Bachelor’s degree in computer science and

mathematics from New York University Ph.D. in biomedical engineering from Duke

University

Page 5: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 5

Lab instructors

Tony Meijer Martin Ericsson

Page 6: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 6

Course Information is maintained on the course

website: www.it.uu.se/edu/course/homepage/grafik1/ht07 14 lecture meetings and 4 lab meetings Text is Interactive Computer Graphics: A Top-

Down Approach Using OpenGL (Fourth Edition) by Edward Angel

We will cover chapters 1-8 and 11 I will try to have some in-class exercises to help

reinforce the material and to break up the long lecture periods

Page 7: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 7

Introduce yourselves

Tell us: Your name Your hometown Your computer background Something interesting about yourself

Page 8: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Graphics system overview

Page 9: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 9

Computer graphics

Definition from Foley & van Dam The creation, storage, and manipulation

of models of objects and their pictures via computer

It takes hardware and software to accomplish this

Page 10: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 10

Examples and applications

Graphs and charts (can be done using simple programming in your favorite language)

CAD (computer aided design) Presentation graphics and computer slide

shows Process control

Page 11: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 11

Examples and applications

Image processing satellite medical spacecraft

Computer user interfaces (icons) Video games Flight simulation and other training

Page 12: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 12

Examples and applications Computer art and animation Virtual reality Others you can think of? Watch “Surly Squirrel” from SIGGRAPH

2005 Animation Theatre (available online at YouTube: http://www.youtube.com/watch?v=5y5ZRcsYP5o)

Page 13: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 13

Output devices

Definitions pixel: picture element resolution: # of points displayable in a

direction without overlap aspect ratio: # points vertically divided by #

points horizontally to give equal length lines in both directions

Page 14: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 14

Cathode ray tubes (CRTs) Electron flow: cathode control grid (intensity)

focusing system vertical deflection horizontal deflection phosphor coating

Light emitted (just for a few milliseconds) when excited electrons of the phosphor coating return to unexcited state

Need to refresh image at least 50 times per second for human to see a steady image

Page 15: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 15

Raster scan CRTs

Electron beam covers the entire screen Image is a set of intensity values for all

points on the screen Memory to hold this image is called a

frame buffer

Page 16: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 16

Frame buffer

Usually implemented with a special type of memory VRAM (video random-access memory) DRAM (dynamic random-access memory)

The number of bits used for each pixel is the depth of the frame buffer

Page 17: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 17

Interlacing Image drawn one row (scan line) at a time Sometimes scan lines are interlaced - even

numbered rows drawn first, then odd numbered rows

Thus, only half the image is updated on each refresh

Non-interlaced CRTs draw all scan lines on each refresh

Page 18: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 18

Display processing units (DPUs)

Special purpose CPUs Decode opcodes and data Instruction counters and registers present

Page 19: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 19

Raster display CPU image creation system frame buffer

image display system CRT Image creation system - scan conversion

algorithms to load image into frame buffer Image display system - an autoincrement

system in x, y addresses; when scan completed, CPU is interrupted, image modifications are made (in flyback time, about 1.3 ms)

Page 20: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 20

How fast does memory need to be?

A typical workstation display can have a resolution of 1280 x 1024 pixels.

If it is refreshed 72 times per second, how fast does memory need to be? (How much time can we take to read one pixel from memory?)

Page 21: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 21

Pipeline architectures

Increase throughput by allowing multiple arithmetic operations to occur in one clock cycle

Have multiple adders and multipliers Consider how this can speed up

multiplication of 44 matrices, the size used for projection of points to the screen in computer graphics

Page 22: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 22

The graphics pipeline

Vertex processing – coordinate transformations and color

Clipping and primitive assembly – determines what can be seen

Rasterization – determining which pixels go with each primitive

Fragment processor – fragments are potential pixels that convey location, color, depth

Page 23: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 23

Installing GLUT on your Windows computer The three GLUT files you need are on the

course web site Place copies of them as follows (for Visual C+

+): glut.h in C:\Program Files\ Microsoft Visual Studio 8\VC\Include\GL

glut32.lib in C:\Program Files\ Microsoft Visual Studio 8\VC\Lib

glut32.dll in C:\Windows\System

Page 24: Computer Graphics NV1 (1DT383) Computer Graphics (1TT180)

Info

rmat

ions

tekn

olog

i

Thursday, October 25, 2007 Computer Graphics - Class 1 24

Making Visual C++ do OpenGL graphics Launch Visual C++ Create a new console project - call it testline

Download file testline.c from the course web site to your testline project folder

Add the file to the project Build and run the project as you normally

would in Visual C++