Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation
Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement.Téléchargez la présentation en cliquant sur ce lien.Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.
Course Materials • dotLRN • Used resources: • “Fundamentals of Computer Graphics” by Peter Shirley, Michael Ashikhmin and Steve Marschner, Publisher: A K Peters; 3rd Revised edition • “Interactive Computer Graphics: A Top-Down Approach Using OpenGL” by Edward Ange, Publisher: Addison Wesley; 5th edition • "Computer Graphics with Open GL" by Donald D. Hearn , M. Pauline Baker and Warren Carithers. Publisher: Prentice Hall; 4th edition • "Interactive Computer Graphics: A Top-Down Approach with Shader-Based OpenGL" by Edward Angel and Dave Shreiner .Publisher: Addison-Wesley; 6th edition • “OpenGL Programming Guide: The Official Guide to Learning OpenGL, Versions 3.0 and 3.1” (7th Edition) by Dave Shreiner
Software • C++ Programming Language • Code Blocks • http://www.codeblocks.org/ • http://www.codeblocks.org/downloads/binaries • Multiplatform IDE, GNU GCC Compiler, Debugger • Windows 2000/XP/Vista/7//8 • codeblocks-12.11mingw-setup.exe • Linux 32-bit • Linux 64-bit • Mac OS X • Free • OpenGL Library • Java • C++ • Objective C, C#
OpenGL • What is OpenGL? • Provides lower-level graphics API (Application Programming Interface) • Programming Languages • Java • C++ • Objective C, C# • Versions • OpenGL 3.0 • Mac only supports 3.2 • We will need minimal functionality provided by OpenGL 2.0
OpenGL in C++ • Cross-Platform • GLFW up to date • Free GLUT not compatible with mac • GLUT outdated • Native • Windows: WGL • Linux: GLX • Mac: CGL (NSOpen GL with Object C++)
OpenGL in Java • Java OpneGL (JOGL) • Fits wit SWING /ATW libraries • More complex • Last stable version is obsolete • Lightweight Java Game Library (LWJGL) • Minimalistic and easy to use • Stable and well maintained
GLFW • Minimalistic and easy to use • Stable and well maintained • Download: • http://www.glfw.org/ • Version 2.7.7 • Binary archive for 32-bit Windows • Rename folder “lib-mingw” to “lib” • More about settings – next class
Vector Graphics • Advantages • Zoom Precision • Ideal for graphics and text • Disadvantages • Not suitable for compound objects with many details/parts • Nightmare for photorealistic images
Raster Graphics • Advantages • Do not depend on the amount of content • Ideal for photorealistic images • Disadvantages • Problem with oblique lines • Rough result in scaling • Inconvenient for graphics and text
Rasterization • Vector Data transformation to Raster Data • Before the output to the raster device • Rasterization should be made as later as possible in graphics processing • Rule • Every image that you can see on PC or mobile device display is raster graphics
Vectorization • Raster Data transformation to Vector Data • In case we need vector processing (for example, image recognition, edges …) • Heavy algorithms (time, efforts, resources consuming), sometimes bad and unusable results • Vectorization is applied only if there is not available alternative solution
Vector – Raster Transformation Vector processing Raster processing rasterization Vector Data Raster Data rasterization Vector Device Raster Device
Raster Images • (Spatial) Resolution • horizontal pixels x vertical pixels • Image Aspect Ratio • width/height • HDTV = 1920/1080 = 1.78 = 16:9 • Pixel Aspect Ratio • (H/V) / (height/width) = (H/V) x (1/A) • Square pixels are 1:1 • Color resolution • Bits per pixel • 24 bpp = 8 bits red, green and blue • 8 bpp = 3 bits red, green, 2 bits blue
3-D Coordinates Right Handed Coord. Sys. z • Points representedby 4-vectors • Need to decideorientation ofcoordinate axes y x Left Handed Coord. Sys. z y +z (lhc) x +z (rhc) y x
Algorithm “for dummies” • Point all the axises • Turn hands until they guess • With which hand do, this is the system Z Z Y Y X X Снимка: FreeDigitalPhotos.net