Computer Graphics Introduction - PDF

Summary

This document provides an introduction to computer graphics (CG). It covers topics such as the definition of CG, CG types (passive and interactive), 2D vs 3D graphics, image types, and the relationship between CG and other related fields like image processing and computer vision. It also discusses the applications of CG in various areas such as CAD/CAM, simulators, entertainment, medical visualization, and the hardware and software used in graphics systems.

Full Transcript

Contents 1) Introduction 2) What is Computer graphics (CG)? 3) CG Types 4) Computer graphics and other related fields 5) Why study Computer Graphics? 6) Computer Graphics Applications 7) Graphics System 8) CG Main Tasks Introduction  Computer graphics is the art and science of modeling, editin...

Contents 1) Introduction 2) What is Computer graphics (CG)? 3) CG Types 4) Computer graphics and other related fields 5) Why study Computer Graphics? 6) Computer Graphics Applications 7) Graphics System 8) CG Main Tasks Introduction  Computer graphics is the art and science of modeling, editing, animating, and rendering complex virtual environments (VE) using a formal mathematical description of everything in the VE.  This includes 3D object shapes, material properties, lights, dynamic behavior of objects, physical properties, and many other aspects. What is Computer Graphics (CG) ? CG are pictures that are generated by a computer or The computer`s ability to draw or to produce images from some given geometrical models Computer Graphics = Geometric description + Graphics algorithms + Programming Language 4 2D Vs. 3D Stands for two-dimensional. Two- dimensional objects are always flat because 2D they have only two dimensions: width and height Stands for three-dimensional. Three- dimensional objects are exist in a volume and 3D have dimensions of width, height, and depth. For example, a rectangle drawn on a piece of paper is 2D, whereas a cardboard box is 3D CG Types  Passive computer graphics: – it is the creation, storage, and manipulation of models of object and their picture. Interactive computer graphics: – it is the important case in which users dynamically control the pictures content, format, size, or colors on a display surface by means of graphics input devices such as keyboard, joystick, or mouse. 6 What is mean by an Image? Image = 2D array of pixels  Point  Line  Polylines  Polygon  Filled regions  Text Image Types  Gray-Scale (Monochrome) Image  Colored Image CG and Other Related fields 9 Is the methodology of the creation of images using a Computer computer (Computer graphics does synthesis: from Graphics models to images) is the subfield of computer graphics that attempts to Image Synthesis produce realistic pictures Image Processing Is the manipulation of an image to produce another image which is in some way different from the input image (Image processing does analysis: from images to images) Example: Pattern recognition, Image enhancement Computer Vision (Sometimes is the extraction of information from an image (from called Image images to models) Understanding) Why Study CG? Graphics is cool  I like to see what I’m doing  I like to show people what I’m doing Graphics is fun  See TV, Movies, Games, … Graphics is interesting  Involves animation, art, simulation of natural phenomena (trees, mountain, …) Graphics has a lot of applications 11 Advantages of Computer CG  It is a tool for generating realistic pictures as well as visualization of natural phenomena  The ability to show moving pictures and thus it is possible to produce animations  CG provides tool called motion dynamics, with it user can move objects with respect to a stationary observer or make objects stationary and the viewer moving around them (walk through made by builder to show flat interior and building surroundings)  CG provides facility called update dynamics in which it is possible to change the shape, color or other properties of the objects being viewed.  In digital signal processing and audio synthesis, interactive CG can provide audio feedback along with the graphical feedbacks to make the simulated environment more realistic CG Applications  CAD/CAM  Simulators (flight, driving, etc.)  Cartoons and artwork, including advertisements  Virtual reality VR  Movie production and special effects  Computer games and Scientific visualization  Art and entertainment  3D Animation  Graphical User Interface  Visualization of natural phenomena 13 Graphics Applications Entertainment: Cinema. Graphics Applications Entertainment: Games GT Racer 3 Graphics Applications Medical Visualization Graphics Applications Graphics Applications Computer Aided Design (CAD) Graphics Applications CAD/CAM  Graphics Applications (Art) Graphics Applications Visualization of Natural Phenomena Example#1 22 Example#2 Example#3 Example#4 Example#5 Bone Deformation  Bone Deformation is the technique of animating an object (usually a character) by defining and animating an internal skeleton that automatically deforms the surrounding mesh  Facial animation can be created with bone deformation Graphics System  Is any collection of hardware and software designed to make it easier to use graphics input and output in compute programs 28 Graphics Software  There are two broad classifications for computer-graphics software: – Special-purpose packages Examples of such applications include artist’s painting programs and various architectural, business, medical, and engineering CAD systems – General programming packages Some examples of general graphics programming packages are GL (Graphics Library), OpenGL, VRML (Virtual-Reality Modeling language), Java 2D and Java 3D. 29 Graphics Hardware  Video monitor is a display device that converts electrical signals into visible images; How ? Using Cathode Ray Tube CRT  Display controller : sits between the computer and the display device, receiving information from the computer program and converting it into signals. 30 Input Devices  Keyboard  Joystick and Trackball  Light pen  Mouse  Data Gloves  A graphics tablet  Light pen  Voice Systems  Touch Panels Output Devices Video Monitors (Graphics display) Printers Inkjet Plotters Film recorder Components of Interactive CG System CPU Update Frame Refresh Display Process Buffer Process Controller Pixel information Video Monitor TV Monitor and Display Controller  TV Monitor helps to view the display and they make us of CRT  Display Controller is an interface between memory buffer and TV monitor. Its function is to pass the contents of FM to the monitor What is CRT  Is the screen part where you see the picture.  CRT consists of : – Electron gun which produce electron beam – Deflection system (pairs of horizontal and vertical) – Focusing system: direct the beam toward specified point on the screen – Phosphor-coated screen Color CRT  Displays color pictures by using a combination of phosphors that emit different colored light  Three electron guns are exist in this case one for each of the three main colors: red, green, and blue (RGB) Raster Display  Most displays used for CG are raster displays – The most famous raster display is the Video Monitor – Raster displays are always connected to some region of memory sufficiently large to hold all of the pixel values for the display called Frame Buffer Frame buffer (FM)  It is a place where images are stored as an array (matrix of 0 and 1)  FM is the video RAM (V-RAM) that is used to hold or map the image displayed on the screen  The amount of memory required to hold the image depends on the resolution of the screen and the color depth used per pixel  Memory = (X-resolution * y-resolution * bits per pixel)/ (8 * 1024 * 1024) Different images with various color depth CD =8 bits CD =4 bits CD =2 bits Color depth (CD)=24 bits Frame Buffer Types  Single buffer (No animation just drawing )  Double buffer (Animation)  Draw on back buffer while front buffer is being displayed  When finished drawing, swap the two and begin work on the new back buffer Graphics Primitives and Attributes  In computer graphics, a graphic primitive is something we know how to draw directly into a bitmap, such as a line, a point, and some polygons  Points and straight line segments are the simplest geometric components of pictures.  For each primitive there is an attribute associated with it. The attributes of a graphic primitive are the characteristics that affect how it appears, such as color and thickness Graphics Primitives  The different graphics primitives are: – Point – Polyline – Polygon – Text – Triangle Strip – Quad Mesh – Filled-Regions Graphics Primitives Examples A polyline drawing of A wireframe picture of a chess pawn a dinosaur contains many polylines that outline its shape 43 Graphics Primitives Examples More complicated objects are drawn by using multiple primitives Simple compound object More complicated compound object drawn from 12 polygons 44 CG Main Tasks  Coordinate system  Geometrical transformation  Projection transformation  Viewing transformation  Modeling: (shape) creating and representing the geometry of objects in the 3D world  Rendering: generating 2D images of the objects  Lighting  Shading & shadow  Texture, etc.  Animation: (movement) describing how objects change in time