Скачать презентацию CS 559 Computer Graphics Prof Stephen Chenney Fall Скачать презентацию CS 559 Computer Graphics Prof Stephen Chenney Fall

3a5b5d99dfad42d399eaaf69db951547.ppt

  • Количество слайдов: 29

CS 559: Computer Graphics Prof Stephen Chenney Fall 2002 http: //www. cs. wisc. edu/~cs CS 559: Computer Graphics Prof Stephen Chenney Fall 2002 http: //www. cs. wisc. edu/~cs 559 -1 09/03/02 © 2002 University of Wisconsin

Today • Course overview and information • Getting started on images • Programming assignment Today • Course overview and information • Getting started on images • Programming assignment 1 (off class home page) 09/03/02 © 2002 University of Wisconsin

What is Computer Graphics? • Technically, it’s about the production, manipulation and display of What is Computer Graphics? • Technically, it’s about the production, manipulation and display of images using computers • Practically, it’s about movies, games, art, training, advertising, communication, design, … 09/03/02 © 2002 University of Wisconsin

Is 2 D Graphics Important? Compositing in movies: images are created in layers, and Is 2 D Graphics Important? Compositing in movies: images are created in layers, and then combined 09/03/02 Sprites in games: Images are built by overlaying characters and objects on a background © 2002 University of Wisconsin

3 D is Sometimes Essential Virtual Reality Augmented Reality Iowa Driving Simulator http: //www. 3 D is Sometimes Essential Virtual Reality Augmented Reality Iowa Driving Simulator http: //www. nads-sc. uiowa. edu/ W. Eric L. Grimson at MIT 09/03/02 http: //www. ai. mit. edu/projects/medicalvision/surgery/surgical_navigation. html © 2002 University of Wisconsin

Computer Graphics? The Wooden Mirror, by Daniel Rozin It consists of many small wooden Computer Graphics? The Wooden Mirror, by Daniel Rozin It consists of many small wooden blocks with a camera in the center. The camera takes an image, it is converted to intensities, and each block is rotated to reflect an appropriate amount of light. 09/03/02 © 2002 University of Wisconsin

This Course: Building Blocks • Images and computers – Sampling, Color, Filters, … • This Course: Building Blocks • Images and computers – Sampling, Color, Filters, … • Drawing in 2 D – Drawing lines and polygons, clipping, transformations • Drawing in 3 D – Viewing, transformations, lighting, the standard pipeline • Modeling in 3 D – Describing volumes and surfaces, drawing them effectively • Miscellaneous interesting stuff – Raytracing, animation, … 09/03/02 © 2002 University of Wisconsin

People • Prof. Stephen Chenney – Room 6387 – Office Hours Tues 2 -3, People • Prof. Stephen Chenney – Room 6387 – Office Hours Tues 2 -3, Thurs 11 -12 – [email protected] wisc. edu • TA: Matt Allen – Office Hour TBD – [email protected] wisc. edu • TA: David Gekiere – Office hours TBD – [email protected] wisc. edu Send all class email to cs 559 [email protected] It is read by both Prof Chenney and the TAs and gets the fastest response 09/03/02 © 2002 University of Wisconsin

Web and Email • The class web site is http: //www. cs. wisc. edu/~cs Web and Email • The class web site is http: //www. cs. wisc. edu/~cs 559 -1 – – It is updated very frequently Lecture notes are put online before class, and updated after class Additional resources and links are provided Reading for future classes is listed • The class mailing list is cs 559 -1 [email protected] wisc. edu – I assume that you check this email regularly – All notices are sent out on the mailing list, including things not mentioned in class – The mail goes to your cs class account, so make sure you check that or set up forwarding 09/03/02 © 2002 University of Wisconsin

Textbooks and Reader • Peter Shirley, “Fundamentals of Computer Graphics”, A. K. Peters, 2002 Textbooks and Reader • Peter Shirley, “Fundamentals of Computer Graphics”, A. K. Peters, 2002 • Woo et. al. , "Open. GL Programming Guide", Third Edition, Adison-Wesley, 1999 – The definitive guide to Open. GL, and a reasonable description of general real-time 3 D graphics • Class reader: Available at DOIT – A collection of papers, textbook chapters, and other documents – Some essential material not contained in the textbook 09/03/02 © 2002 University of Wisconsin

Projects • There will be three projects for the course, spread evenly through the Projects • There will be three projects for the course, spread evenly through the semester • Project 1: Image editing • Project 2: Running a maze • Project 3: Building a virtual theme park • You must submit all three in order to pass the course 09/03/02 © 2002 University of Wisconsin

Homeworks • There will be a homework every two weeks or so • They Homeworks • There will be a homework every two weeks or so • They are intended primarily to explore topics further and to prepare you for the exams • They will be graded, but only the best five will count • Some essential techniques will be presented only in homework – For example, an review of linear algebra 09/03/02 © 2002 University of Wisconsin

Grading (approximate) • • • 45% Midterm and Final 45% Projects 10% Homework Everyone Grading (approximate) • • • 45% Midterm and Final 45% Projects 10% Homework Everyone must write up their own homework For the projects, you have the option of working in pairs 09/03/02 © 2002 University of Wisconsin

Lab Facilities • Room B 240 contains machines for use in this class • Lab Facilities • Room B 240 contains machines for use in this class • They have high performance hardware and the software to make it work • Students in CS 559 have priority in the lab, but it shouldn’t be a problem • Don’t underestimate the benefits of working in a lab with your classmates – For instance, the blackboards frequently display useful hints • But they also sometimes have incorrect information!! 09/03/02 © 2002 University of Wisconsin

Software Infrastructure • FLTK will be the user interface toolkit – Provides windows, buttons, Software Infrastructure • FLTK will be the user interface toolkit – Provides windows, buttons, menus, etc – C++ class library, completely portable – We are currently at version 1. 1. 0 rc 6, available for free: www. fltk. org • Open. GL will be the 3 D rendering toolkit – Provides an API for drawing objects specified in 3 D – Included as part of Windows, available for Linux either as Mesa (software) or hardware drivers • Visual C++ 6. 0 will be the programming environment for grading • To be graded, your projects must compile under Visual C++ on the machines in room B 240 09/03/02 © 2002 University of Wisconsin

C++ • This is probably the first, and only, class in which you must C++ • This is probably the first, and only, class in which you must complete large software projects in C++ without step by step instructions • There is a great deal of freedom in the projects, which requires that you do your own software design • If you are not comfortable in C++, you will have to take action • There are tutorials intended to teach you C++ assuming you know Java: – http: //www. cs. wisc. edu/~hasti/cs 368/Cpp. Tutorial/index. html – These are intended for the course CS 368, but just do the tutorials • The transition to C++ was one of the biggest issues for past CS 559 students 09/03/02 © 2002 University of Wisconsin

Adding the Class • To go on the waiting list, email schenney@cs. wisc. edu Adding the Class • To go on the waiting list, email [email protected] wisc. edu with your name, ID and major • Do it again even if you have already send me email • People who add in this manner will have to wait a couple of days for accounts 09/03/02 © 2002 University of Wisconsin

Programming Assignment 1 • • Do the Visual C++ and FLTK demo off the Programming Assignment 1 • • Do the Visual C++ and FLTK demo off the class web page Will get you started with C++ and FLTK Do it NOW, don’t wait until the project comes up There will be another assignment in a week or so continuing your preparation for the first project • Not graded. Questions during office hours or on the class mailing list 09/03/02 © 2002 University of Wisconsin

Images • Information presented in a flat (2 D) format to be examined visually Images • Information presented in a flat (2 D) format to be examined visually • We are familiar with many forms of image: – – – Photographs Paintings Sketches Television Computer screens • Each form has its own way of obtaining and storing the information content 09/03/02 © 2002 University of Wisconsin

Digital Images • Images can be stored on a computer in one of many Digital Images • Images can be stored on a computer in one of many forms • There are some conflicting goals: – – The storage cost should be minimized The amount of information stored should be maximized It should be easy to perform editing operations Tracking copyrights may be important • There are two abstract types of digital images: Raster images and Vector images 09/03/02 © 2002 University of Wisconsin

Raster Images • A raster is a regular grid of pixels (picture elements) • Raster Images • A raster is a regular grid of pixels (picture elements) • Raster image formats store the intensity (brightness) and color information at each pixel – Simplest is to use a 2 D array of pixel values – Some formats store the pixel information in very different ways • A 6 x 3 image • Aspect ratio is width/height, 2 09/03/02 © 2002 University of Wisconsin

Vector Images • Store images as collections of geometric primitives – E. g. Lines, Vector Images • Store images as collections of geometric primitives – E. g. Lines, polygons, circles, … • Called vector images for historical reasons • Postscript (PDF) is the most famous vector image format • It is possible to go from a vector image to a raster image • It is very hard to go the other way 09/03/02 © 2002 University of Wisconsin

Obtaining Digital Images • What are some methods for obtaining a digital image? 09/03/02 Obtaining Digital Images • What are some methods for obtaining a digital image? 09/03/02 © 2002 University of Wisconsin

Obtaining Digital Images • What are some methods for obtaining a digital image? – Obtaining Digital Images • What are some methods for obtaining a digital image? – – – – 09/03/02 Digital camera Scanning another image Medical scanning Editing existing digital images Paint or drawing programs Created from abstract data (e. g. math function plot) Rendered from a scene description … © 2002 University of Wisconsin

Displaying Images • Display is not the same as storage – A monitor displays Displaying Images • Display is not the same as storage – A monitor displays an image, but does not store it – The same image may look different on different monitors • Typically, the display is taken into account when creating images, but not always • Different display techniques have very different properties • What are some common display techniques? 09/03/02 © 2002 University of Wisconsin

Displaying Images • What are some common display techniques? – – – – 09/03/02 Displaying Images • What are some common display techniques? – – – – 09/03/02 Cathode Ray Tube (CRT): Computer monitor / Television Liquid Crystal Display (LCDs) Printing: many variations Vector displays Holographic displays Plasma displays … © 2002 University of Wisconsin

Trade-Offs • Which is preferred: Raster or Vector? – – – For display on Trade-Offs • Which is preferred: Raster or Vector? – – – For display on an LCD? For display on a plotter (a printer that draws lines with pens)? For images from digital cameras? For CAD (Computer Aided Design)? For high-quality text? • Which is easier to: – Resize? – Rotate? – Crop? 09/03/02 © 2002 University of Wisconsin

Trade-Offs • Which is preferred: Raster or Vector? – – – For display on Trade-Offs • Which is preferred: Raster or Vector? – – – For display on an LCD? Raster For display on a plotter (a printer that draws lines with pens)? Vector For images from digital cameras? Raster For CAD (Computer Aided Design)? Vector For high-quality text? Vector • Which is easier to: – Resize? Vector – Rotate? Vector – Crop? Raster 09/03/02 © 2002 University of Wisconsin

Next Time • We focus on raster images • Some human perception stuff (always Next Time • We focus on raster images • Some human perception stuff (always fun) 09/03/02 © 2002 University of Wisconsin