




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































Unit I Introduction Computer Graphics and Primitive Algorithms : Introduction to Image and Objects, Image Representation, Basic Graphics Pipeline, Bitmap and Vector-Based Graphics, Applications of Computer Graphics, Display Devices, Cathode Ray Tubes, Raster-Scan Display, Random-Scan Display, Flat Panel Display, Input Technology, Coordinate System Overview, Scan-Conversion of graphics primitives : Scan-Conversion of a Lines (Digital Differential Analyzer Algorithm, Bresenham's Line- Drawing Algorithm, Scan-Conversion of Circle and Ellipse (Bresenham's Method of Circle Drawing, Midpoint Circle Algorithm), Drawing Ellipses and Other Conics. Unit II Two Dimensional Transformation : Introduction to transformations, Transformation Matrix, Types of Transformations in Two-Dimensional Graphics: Identity Transformation, Scaling, Reflection, Shear Transformations, Rotation, Translation, Rotation about an Arbitrary Point, Combined Transformation, Homogeneous Coordinates, 2D Transformations using Homogeneous Coordinates Unit III Three-dimensional transformations, Objects in Homogeneous Coordinates; Three-Dimensional Transformations: Scaling, Translation, Rotation, Shear Transformations, Reflection, World Coordinates and Viewing Coordinates, Projection, Parallel Projection, Perspective Projection. Unit IV Viewing and Solid Area Scan-Conversion : Introduction to viewing and clipping, viewing Transformation in Two Dimensions, Introduction to Clipping, Two-Dimensional Clipping, Point Clipping, Line Clipping, Introduction to a Polygon Clipping, Viewing and Clipping in Three Dimensions, Three-Dimensional Viewing Transformations, Text Clipping Introduction to Solid Area Scan-Conversion, Inside - Outside Test, Winding Number Method and Coherence Property, Polygon Filling, Seed Fill Algorithm, Scan-Lino Algorithm, Priority Algorithm, Scan Conversion of Character, Aliasing, Anti-Aliasing, Halftoning, Thresholding and Dithering
Unit V Introduction to curves, Curve Continuity, Conic Curves, Piecewise Curve Design, Parametric Curve Design, Spline Curve Representation, Bezier Curves, B-Spline Curves, Fractals and its applications. Surface Design : Bilinear Surfaces, Ruled Surfaces, Developable Surfaces, Coons Patch, Sweep Surfaces, Surface of Revolution, Quadric Surfaces, Constructive Solid Geometry, Bezier Surfaces, B-Spline Surfaces, Subdivision Surfaces. Visible Surfaces : Introduction to visible and hidden surfaces, Coherence for visibility, Extents and Bounding Volumes, Back Face Culling, Painter’s Algorithm, Z-Buffer Algorithm, Floating Horizon Algorithm, Roberts Algorithm. Unit VI Object Rendering : Introduction Object-Rendering, Light Modeling Techniques, illumination Model, Shading, Flat Shading, Polygon Mesh Shading, Gaurand Shading Model, Phong Shading, Transparency Effect, Shadows, Texture and Object Representation, Ray Tracing, Ray Casting, Radiosity, Color Models. Introduction to animation, Key-Frame Animation, Construction of an Animation Sequence, Motion Control Methods, Procedural Animation, Key-Frame Animation vs. Procedural Animation, Introduction to Morphing, Three-Dimensional Morphing. Books : Computer Graphics, R. K. Maurya, John Wiley. Mathematical elements of Computer Graphics, David F. Rogers, J. Alan Adams, Tata McGraw-Hill. Procedural elements of Computer Graphics, David F. Rogers, Tata McGraw-Hill. Reference: Computer Graphics, Donald Hearn and M. Pauline Baker, Prentice Hall of India. Computer Graphics, Steven Harrington, McGraw-Hill. Computer Graphics Principles and Practice, J.D. Foley, A Van Dam, S. K. Feiner and R. L. Phillips, Addision Wesley. Principles of Interactive Computer Graphics, William M. Newman, Robert F. Sproull, Tata McGraw-Hill. Introduction to Computer Graphics, J.D. Foley, A. Van Dam, S. K. Feiner, J.F. Hughes and R.L. Phillips, Addision Wesley.
Unit Structure 1.0 Objectives 1.1 Introduction 1.2 Introduction to Image and Objects 1.3 Image Representation 1.4 Basic Graphics Pipeline 1.5 Bitmap and Vector-Based Graphics 1.6 Applications of Computer Graphics 1.7 Display Devices 1.7.1 Cathode Ray Tubes 1.7.2 Raster-Scan Display 1.7.3 Random-Scan Display 1.7.4 Flat Panel Display 1.8 Input Technology 1.9 Coordinate System Overview 1.10 Let us sum up 1.4 References and Suggested Reading 1.5 Exercise
The objective of this chapter is To understand the basics of computer graphics. To be aware of applications of computer graphics. To know the elements of computer graphics.
Computer graphics involves display, manipulation and storage of pictures and experimental data for proper visualization using a computer. It provides methods for producing images and animations (sequence of images). It deals with the hardware as well as software support for generating images.
Basically, there are four major operations that we perform in computer graphics: Imaging: refers to the representation of 2D images. Modeling: refers to the representation of 3D images. Rendering: refers to the generation of 2D images from 3D models. Animation: refers to the simulation of sequence of images over time.
An image is basically representation of a real world object on a computer. Itcan be an actual picture display, a stored page in a video memory, or a source code generated by a program. Mathematically, an image is a two - dimensional array of data with intensity or a color value at each element of the array. Objects are real world entities defined in three – dimensional world coordinates. In computer graphics we deal with both 2D and 3D descriptions of an object. We also study the algorithms and procedures for generation and manipulation of objects and images in computer graphics. Check your Progress :
Image representation is the approximations of the real world displayed in a computer. A picture in computer graphics is represented as a collection of discrete picture elements termed as pixels. A pixel is the smallest element of picture or object that can be represented on the screen of a device like computer.
The real world objects are represented in world coordinate system. It is then projected onto a view plane. The projection is done from the viewpoint of the position of a camera or eye. There is an associated camera coordinate system whose z axis specifies the view direction when viewed from the viewpoint. The infinite volume swept by the rays emerging from the viewpoint and passing through the window is called as view volume or view pyramid. Clipping planes (near and far) are used to limit the output of the object. The mapping of an object to a graphic device requires the transformation of view plane coordinates to physical device coordinates. There are two steps involved in this process. (i) The window to a viewport transformation. The viewport is basically a sub – rectangle of a fixed rectangle known as logical screen. (ii) The transformation of logical screen coordinates to physical device coordinates. Figure : Sequence of transformation in viewing pipeline Figure 1.2: 2D coordinate system to physical device coordinates transformation. The figures above depict the graphic pipeline and the 2D coordinate transformation to physical device coordinates. Representation of 3D world objects Clip against view volume Transform to physical device coordinates Transform to viewport Project to view plane Transform into camera coordinates Clip against window Transform to physical device coordinates Transport to viewport Representation of 2D world objects
Check your Progress :
Computer graphics can be classified into two categories: Raster or Bitmap graphics and Vector graphics. Bitmap graphics : It is pixel based graphics. The position and color information about the image are stored in pixels arranged in grid pattern. The Image size is determined on the basis of image resolution. These images cannot be scaled easily. Bitmap images are used to represent photorealistic images which involve complex color variations. Figure 1. (a) An arrow image (b) magnified arrow image with pixel grid The above figure shows a bitmap arrow image in its actual size and magnified image with pixel grid. Vector graphics : The images in vector graphics are basically mathematically based images. Vector based images have smooth edges and therefore used to create curves and shapes.
Computer graphics finds its application in various areas; some of the important areas are discussed below: Computer-Aided Design : In engineering and architectural systems, the products are modeled using computer graphics commonly referred as CAD (Computer Aided Design). In many design applications like automobiles, aircraft, spacecraft, etc., objects are modeled in a wireframe outline that helps the designer to observe the overall shape and internal features of the objects. CAD applications are also used in computer animations. The motion of an object can be simulated using CAD. Presentation graphics : In applications like summarizing of data of financial, statistical, mathematical, scientific and economic research reports, presentation graphics are used. It increases the understanding using visual tools like bar charts, line graphs, pie charts and other displays. Computer Art : A variety of computer methods are available for artists for designing and specifying motions of an object. The object can be painted electronically on a graphic tablet using stylus with different brush strokes, brush widths and colors. The artists can also use combination of 3D modeling packages, texture mapping, drawing programs and CAD software to paint and visualize any object. Entertainment : In making motion pictures, music videos and television shows, computer graphics methods are widely used. Graphics objects can be combined with live actions or can be used with image processing techniques to transform one object to another (morphing). Education and training : Computer graphics can make us understand the functioning of a system in a better way. In physical systems, biological systems, population trends, etc., models makes it easier to understand. In some training systems, graphical models with simulations help a trainee to train in virtual reality environment. For example, practice session or training of ship captains, aircraft pilots, air traffic control personnel.
Visualization : For analyzing scientific, engineering, medical and business data or behavior where we have to deal with large amount of information, it is very tedious and ineffective process to determine trends and relationships among them. But if it is converted into visual form, it becomes easier to understand. This process is termed as visualization. Image processing : Image processing provides us techniques to modify or interpret existing images. One can improve picture quality through image processing techniques and can also be used for machine perception of visual information in robotics. In medical applications, image processing techniques can be applied for image enhancements and is been widely used for CT (Computer X-ray Tomography) and PET (Position Emission Tomography) images. Graphical User Interface : GUI commonly used these days to make a software package more interactive. There are multiple window system, icons, menus, which allows a computer setup to be utilized more efficiently. Check your progress:
There are various types of displays like CRT, LCD and Plasma. We will discuss each of these three in brief.
o There are two types of LCD displays: o Active Matrix LCD : Electric field is retained by a capacitor so that the crystal remains in a constant state. Transistor switches are used to transfer charge into the capacitors during scanning. The capacitors can hold the charge for significantly longer than the refresh period Crisp display with no shadows. More expensive to produce. o Passive matrix LCD : LCD slowly transit between states. In scanned displays, with a large number of pixels, the percentage of the time that LCDs are excited is very small. Crystals spend most of their time in intermediate states, being neither "On" or "Off". These displays are not very sharp and are prone to ghosting. Plasma display : Figure1.8 (showing the basic structure of plasma display) o These are basically fluorescent tubes. o High- voltage discharge excites gas mixture (He, Xe), upon relaxation UV light is emitted, UV light excites phosphors. o Some of its features are Large view angle Large format display Less efficient than CRT, more power Large pixels: 1mm (0.2 mm for CRT) Phosphors depletion In CRT monitors there are two techniques of displaying images.
o Raster scan displays : A rectangular array of points or dots.In a raster scan system, the electron beam is swept across the screen, one row at a time from top to bottom.As the electron beam moves across each row, the beam intensity is turned on and off to create a pattern of illuminated spots. See the figure below. Figure 1.9 : Raster scan display Horizontal retrace : The return to the left of the screen, after refreshing each scan line. Vertical retrace : At the end of each frame (displayed in 1/80th to 1/60th of a second) the electron beam returns to the top left corner of the screen to begin the next frame. Figure 1.10 (showing horizontal and vertical retrace)
Aspect ratio : It is the ratio of the number of vertical points to the number of horizontal points necessary to produce equal- length lines in both directions on the screen. Frame buffer : Frame buffer also known as refresh buffer is the memory area that holds the set of intensity values for all the screen points. Pixel : It refers a point on the screen. It is also known as pel and is shortened form of ‘picture element’. Bitmap or pixmap : A frame buffer is said to be bitmap on a black and white system with one bit per pixel. For systems with multiple bits per pixel, the frame buffer is referred to as pixmap. Graphical images - used to add emphasis, direct attention, illustrate concepts, and provide background content. Two types of graphics: o Draw-type graphics or vector graphics – represent an image as a geometric shape o Bitmap graphics – represents the image as an array of dots, called pixels Three basic elements for drawing in graphics are: o Point : A point marks a position in space. In pure geometric terms, a point is a pair of x, y coordinates. It has no mass at all. Graphically, however, a point takes form as a dot, a visible mark. A point can be an insignificant fleck of matter or a concentrated locus of power. It can penetrate like a bullet, pierce like a nail, or pucker like a kiss. A mass of points becomes texture, shape, or plane. Tiny points of varying size create shades of gray. o Line : A line is an infinite series of points. Understood geometrically, a line has length, but no breadth. A line is the connection between two points, or it is the path of a moving point. A line can be a positive mark or a negative gap. Lines appear at the edges of objects and where two planes meet. Graphically, lines exist in many weights; the thickness and texture as well as the path of the mark determine its visual presence. Lines are drawn with a pen, pencil, brush, mouse, or digital code. They can be straight or curved, continuous or broken. When a line reaches a certain thickness, it becomes a plane. Lines multiply to describe volumes, planes, and textures. o Plane : A plane is a flat surface extending in height and width. A plane is the path of a moving line; it is a line with breadth. A line closes to become a shape, a bounded plane. Shapes are
planes with edges. In vector–based software, every shape consists of line and fill. A plane can be parallel to the picture surface, or it can skew and recede into space. Ceilings, walls, floors, and windows are physical planes. A plane can be solid or perforated, opaque or transparent, textured or smooth. Check your progress:
There are different techniques for information input in graphical system. The input can be in the form of text, graphic or sound. Some of the commonly used input technologies are discussed below. 1.8.1Touch Screens A touch screen device allows a user to operate a touch sensitive device by simply touching the display screen. The input can be given by a finger or passive objects like stylus. There are three components of a touch screen device: a touch sensor, a controller and a software driver. A touch sensor is a touch sensitive clear glass panel. A controller is a small PC card which establishes the connection between a touch sensor and the PC. The software driver is a software that allows the touch screen to work together with the PC. The touch screen technology can be implemented in various ways like resistive, surface acoustic, capacitive, infrared, strain gauge, optical imaging, dispersive signal technology, acoustic pulse recognition and frustrated total internal reflection. 1.8.2Light pen A light pen is pen shaped pointing device which is connected to a visual display unit. It has light sensitive tip which detects the light from the screen when placed against it which enables a computer to locate the position of the pen on the screen. Users can
Figure 1.12: Cartesian coordinate system In the above figure, there are two points (2, 3) and (3, 2) are specified in Cartesian coordinate system 1.9.2 Polar coordinate system In polar coordinate system, the position of a point is defined by specifying the distance (radius) from a fixed point called as origin and the angle between the line joining the point and the origin and the polar axis (horizontal line passing through the origin). Figure 1.13: Polar coordinate system The above figure shows a point (r, θ) in polar coordinates.
Check your Progress : Fill in the blanks
We learnt about computer graphics, its application in different areas. We studied various display and input technologies. We also studied basic graphic pipeline, bitmap and vector based graphics. Then we learnt the elements of computer graphics in which came to know about the terms like persistence, resolution, aspect ratio, frame buffer, pixel and bitmap. Finally we studied about the coordinate system.
(1) Computer Graphics, Donald Hearn, M P. Baker, PHI. (2) Procedural elements of Computer Graphics, David F. Rogers, Tata McGraw Hill. (3) Computer Graphics, Rajesh K. Maurya, Wiley - India