Computer Graphics 1, Fall 2005 - it.uu.se Graphics 1, Fall 2005 Computer Graphics 1, Fall 2005...
Transcript of Computer Graphics 1, Fall 2005 - it.uu.se Graphics 1, Fall 2005 Computer Graphics 1, Fall 2005...
Lecture 1 October 28, 2005
Ingela Nyström 1
Computer Graphics 1, Fall 2005
Computer Graphics 1, Fall 2005
Patrick KarlssonIngela NyströmErik VidholmAnders HastFilip Malmberg
[email protected]@[email protected]@[email protected]
IT-institutionen, TDB
Computer Graphics 1
What is Computer Graphics (CG)?
What can CG be used for?
What will we learn in this course?
What is a digital image?
Lecture 1 October 28, 2005
Ingela Nyström 1
Lecture 1 October 28, 2005
Ingela Nyström 2
Number of picture elements Number of grey-levels
Zindy Lena
Cell image analysis Medical images: CT, MR
Lecture 1 October 28, 2005
Ingela Nyström 2
Lecture 1 October 28, 2005
Ingela Nyström 3
Classifying aerial images Aerial image of trees
Agricultural applications Analysis of paper fibres
What is Computer Graphics (CG)?
Creating and displaying graphics and images with the aid of a computerThis can be almost anything, but usually starts with an abstract representation of numbers and ends with something that we can see
What can CG be used for?
Visualization of dataMedicine, science, economics, ...
Working toolGraphical User Interfaces (GUIs), VR, ...
EntertainmentComputer games, film, art, …
Part in telecommunicationCompression, decompression
…
Lecture 1 October 28, 2005
Ingela Nyström 3
Lecture 1 October 28, 2005
Ingela Nyström 4
Computer Graphics vs Image Analysis
They are (almost) each others inverses
In Computer Graphics,we start with a some numbers and parameters and end with an image
In Image Analysis,we start with an image and end with some numbers
What will we learn in this course?
How to draw images on a computer screen: points, polygons, objectsHow to create a 3D impression despite our restriction to flat screensHow to move around in a virtual 3D worldSome tools for modelling a 3D worldA brief introduction to the OpenGL Application Programmer’s Interface (API)
What we will not learn in this course
Esthetical aspects of CGHow to use 3D-studio, Lightwave, Renderman, …How to render photo realistic images (off-line rendering)X, DirectX, SDL, Java3D, and all other APIs out thereOlder APIs: GKS, PHIGS, etc.Hardware stuff
http://www.it.uu.se/edu/course/homepage/grafik1/ht05/
14 Lectures4 Computer ”laborationer”This is time for coding the assignments
4 Assignments They give bonus points on the examThis is probably the major part of the work
A fairly easy examIf you have done the assignments, this will hardly be of much trouble
The fast forward version
Clipping
View plane
Camera orobserver
Lightsource
Transformation
Projection3D
2D
Rasterization
Shadow
Hidden surface
View volume The Graphics Pipeline
Lecture 1 October 28, 2005
Ingela Nyström 4
Lecture 1 October 28, 2005
Ingela Nyström 5
The Display PipelineThe order may vary somewhat
•Modelling, create objects (this is not really a part of the pipeline)•Transformations, move, scale, rotate…•View transformation, put yourself in the origin of the world•Clipping, cut away things outside the view volume•Hidden surface removal - We do not see through things…•Light and illumination, shadows perhaps•Projection 3D to 2D•Rasterization, put things onto our digital screen
Texture, shading, image based HSR...
Transform Clipping HSR Light calculations ...
Polygon in
...
Images in a computer...
94 100 104 119 125 136 143 153 157 158103 104 106 98 103 119 141 155 159 160109 136 136 123 95 78 117 149 155 160110 130 144 149 129 78 97 151 161 158109 137 178 167 119 78 101 185 188 161100 143 167 134 87 85 134 216 209 172104 123 166 161 155 160 205 229 218 181125 131 172 179 180 208 238 237 228 200131 148 172 175 188 228 239 238 228 206161 169 162 163 193 228 230 237 220 199
… just a large array of numbers
To draw images
To write the right numbers at the right places in this large array (the screen buffer)
This is often done by a function called write_pixel(x,y,color)
or (if possible) by directly writing in the array buffer[y][x]=color;
Using write_pixel, we can draw lines and we can draw polygonsTessellation:
cutting polygons into smaller polygons In fact, we need solely triangles Triangularisation:
cutting polygons into trianglesTriangles are always flat, which is a nice property
Triangles
We put our triangles together to form objects
We put the objects in a 3D world
We use a camera model to view the world
Object in World
We use transformations to move around in the world, as well as to move objects around in the world
We add light to get a nice 3D effect
We remove things we cannot see
Transformations, etc.
Lecture 1 October 28, 2005
Ingela Nyström 5
Lecture 1 October 28, 2005
Ingela Nyström 6
We may speedup things using maps of different types, e.g., textures
Starting from polygons, it is tedious to build a world. We need modelling tools. Splines and fractals are two such tools
Fixing some more Visualization
New course Spring 2006:New course Spring 2006:Advanced Computer Graphics and VisualizationAdvanced Computer Graphics and Visualization
Computer Graphics 1, Fall 2005
Lecture 1 October 28, 2005
Ingela Nyström 6