Computer Graphics Techniques and Applications Chapter 1 - Graphics Fundamentals Dr Brett Stevens e-mail: Brett.Stevens@port.ac.uk phone: 023 9284 5482 address: West Wing, Eldon Building notes: http://techfaculty.port.ac.uk/cgtap
16 Hours - Lectures to take place in Mercantile House, Room 5.02. This will include computer graphics theory and discussion of relevant social and technical issues. 20 Hours - Practicals to take place in Mercantile House, Room 3.04b. This will include access to graphics production facilities for formal tutorial sessions and continuing project work. 1 Hour - Exam, which will constitute 60% of your grade. This will be an individual, open book, computer based test. Ongoing - Coursework, which will constitute 40% of your grade. There will also be an assessed, continuous practical component that will help develop practical and problem solving skills.
Unit Web Site Notes: http://techfaculty.port.ac.uk/cgtap/index.htm Books: http://techfaculty.port.ac.uk/cgtap/booklist.htm Coursework: http://techfaculty.port.ac.uk/cgtap/assessment.htm
2D vs 3D Graphics • Coordinate Systems • Cartesian Coordinates. • Axis, (pl axes). • Origin. • 2D has “x axis” and a “y axis” • 3D has “x axis”, “y axis” and a “z axis”
Piet Mondrian (circa EarlyC20th) Red, Yellow and Blue 1921 (oil on canvas)
Physiological Pictorial Monoscopic Motion Parallax Accommodation Occlusion Relative Height Relative Size (Requires Expected Size) Linear Perspective Foreshortening Texture Gradients Shading and Shadows Aerial Perspective Relative Brightness Stereoscopic Convergence Stereopsis Depth Cues
Leonardo da Vinci The Last Supper, 1498
Maurits Cornelis Escher (1898-1972) Belvedere
2D Graphics • Information stored within that framework can be subdivided into two categories. • Bitmapped (or raster) graphics created with paint programs, such as Corel’s Photopaint or Adobe’s Photoshop. • Vector graphics created and manipulated with a draw programs, such as Coreldraw or Adobe’s Illustrator
2D - Bitmapped Graphics Bitmapped (Raster) graphics use a 2D array of points (pixels). Like Pointalism. Gray Weather by George Seurat (1859-1891)
Bitmapped Graphics • The number of pixels used in a bitmap is its spatial resolution (e.g. 1024x768). • The number of bits (i.e. 0s and 1s) used to represent a colour is known as the bit depth or colour resolution. e.g. 24 bit. • This is not the number of colours itself.
Bit Depths and Colours • 1 bit = 2 Colours (Actually Black or White) • 4 bit = 16 Colours • 8 bit = 256 Colours (GIFs) • 24 bit = 16,777,216 Colours (JPGs) • 48 bit = 281,474,979,710,656 (PNGs)
File Sizes and Bit Depths File size of a bitmap is (Resolution x Bit depth + file overhead) / 8 = Size in Bytes
Greyscale to Black and White. Grey Scale Threshold Dithered
Dithering an Image. What is the theoretical file size of the image before and after dithering? Then create the display matrix again but with the dither matrix, 3,6,9,12 (ordered from the top left to the bottom right) and work through the exercise again. What do you notice.??
Aliased and Anti-Aliased Images. To display a ‘continuous’ line it must be divided amongst discrete pixels. This can lead to the line looking jagged or aliased.
Perfect and Sub-Pixel Sampling This requires enough bit depth to support the ‘extra’ colours
Bitmap Compression • The file size for storing bitmapped graphics can be very large. • codecs specify how a file should be COmpressed and DECompressed. • Lossless compression (gif, png) • Lossey compression (jpg)
File Sizes and Bit Depths (Spatial resolution * Colour resolution) + file overhead) / 8 compression ratio = File Size in Bytes (divide this by 1024 to get the size in KB). All these factors are dictated by the file type …
2D Vector Graphics Vector graphics use a mathematical representation. Primitives are the basic shapes from which drawings are constructed. The term refers to geometry, shape and position. The primitives have attributes, which specify additional display information, such as the colour of an element, its orientation
Michelangelo Buonarroti Pieta 1498-99 Marble. Basilica of St Peter, Vatican
3D - Volume or Surface Graphics • Volume uses a 3D array of points (voxels). Like bitmaps. • Surface graphics use a description of an object’s boundaries (polygons). Like vectors.