Computer Graphics Multimedia Applications Class BCA III Presentation

Computer Graphics & Multimedia Applications Class: BCA – III Presentation by: Gaurav Dutt Email: gauravdut@gmail. com Dept. of Computer Science & Information Technology Post Graduate Government College, Sector – 11, Chandigarh.

SYLLABUS

SECTION-A Computer Graphics : 1. A Survey of Computer Graphics : Computer Aided Design, Presentation Graphics, Computer art, Entertainment, Education and Training, Visualization, Image Pressing, Graphical User Interfaces. (No. of Periods : 15) 2. Overview of Graphics Systems : Video Display Devices, Raster Scan Systems, Random Scan Systems. Graphics Monitors and Workstations, Input Devices, Hard-copy devices, Graphics Software. (No. of Periods : 10) SECTION-B 3. Studying the Features and Developing Computer Graphics Using Standard Graphics packages like Auto CAD and Paint Brush. (No. of Periods : 10) 4. Developing Computer Graphics Using 'C' : Input-output primitives, Setting character and text attributes, Changing line styles, Using fill styles to fill images. Use the above primitives to develop programs like drawing concentric circles, Ellipses, Sine surves, Histograms, Pie charts and human face. (No. of Periods : 15)

SECTION-C Multimedia Applications : 5. Multimedia in use Introducing multimedia, What is multimedia ? using multimedia. SYLLABUS FOR BACHELOR OF COMPUTER APPLICATIONS 39 6. Technology System Components, Multimedia Platforms, Development Tools, Image, Audio, Video, Storage for multimedia, Communications. (No. of Periods : 25) SECTION-D 7. Applications : Multimedia in the Real World, Training and Education, Image Processing. 8. Studying features and use of Multimedia Image Processing authoring tools like photoshop, Macromedia Director. (No. of Periods : 25)

Computer Graphics n Computer graphics deals with all aspects of creating images with a computer • • • Hardware Software Applications

Applications of Computer Graphics Computer-Aided Design for engineering and architectural systems etc. n Objects maybe displayed in a wireframe outline form. Multi-window environment is also favoured for producing various zooming scales and views. Animations are useful for testing performance. Presentation Graphics n n To produce illustrations which summarize various kinds of data. Except 2 D, 3 D graphics are good tools for reporting more complex data. It is used to produce illustrations for reports or to generate slide for with projections. Examples of presentation graphics are bar charts, line graphs, surface graphs, pie charts and displays showing relationships between parameters. 3 -D graphics can provide more attraction to the presentation.

Computer Art n n n n Computer graphics methods are widely used in both fine are and commercial art applications. The artist uses a combination of 3 D modelling packages, texture mapping, drawing programs and CAD software. Pen plotter with specially designed software can create “automatic art”. “Mathematical Art” can be produced using mathematical functions, fractal procedures. These methods are also applied in commercial art. Photorealistic techniques are used to render images of a product. Animations are also used frequently in advertising, and television commercials are produced frame by frame. Film animations require 24 frames for each second in the animation sequence. A common graphics method employed in many commercials is morphing, where one object is transformed into another.

Entertainment n n n Motion pictures, Music videos, and TV shows, Computer games. CG methods are now commonly used in making motion pictures, music videos and television shows. Many TV series regularly employ computer graphics method. Graphics objects can be combined with a live action. Education and Training n n Training with computer-generated models of specialized systems such as the training of ship captains and aircraft pilots. Computer-generated models of physical, financial and economic systems are often used as educational aids. For some training applications, special systems are designed. E. g. Training of ship captains, aircraft pilots etc. , Some simulators have no video screens, but most simulators provide graphics screen for visual operation. Some of them provide only the control panel.

Visualization n n n For analyzing scientific, engineering, medical and business data or behaviour. Converting data to visual form can help to understand mass volume of data very efficiently. The numerical and scientific data are converted to a visual form for analysis and to study the behaviour called visualization. Producing graphical representation for scientific data sets are calls scientific visualization. And business visualization is used to represent the data sets related to commerce and industry. The visualization can be either 2 D or 3 D.

Image Processing n n n Image processing is to apply techniques to modify or interpret existing pictures. It is widely used in medical applications. Computer graphics is used to create a picture. Image processing applies techniques to modify or interpret existing pictures. To apply image processing methods, the image must be digitized first. Medical applications also make extensive use of image processing techniques for picture enhancements, simulations of operations, etc.

Graphical User Interface n n n n Multiple window, icons, menus allow a computer setup to be utilized more efficiently. Nowadays software packages provide graphics user interface (GUI) for the user to work easily. A major component in GUI is a window. Multiple windows can be opened at a time. To activate any one of the window, the user needs just to check on that window. Menus and icons are used for fast selection of processing operations. Icons are used as shortcut to perform functions. The advantages of icons are which takes less screen space. And some other interfaces like text box, buttons, and list are also used.

Vector Graphics and Raster Graphics Vector Graphics � � � Generation of images from mathematical descriptions that determine the position, length, and direction in which lines are drawn. Vector graphics is also called stroke or line drawing. Oscilloscopes and some plotters are vector graphics devices. Raster Graphics � � � Generation of images as a collection of small, independently controlled dots (pixels) arranged in rows and columns. Raster graphics is also referred to as pixel graphics. Almost all current computer output devices, including CRTs, LCDs, LEDs, and plasma screens, use raster graphics. Raster graphics cannot draw perfect curved or slopping lines. The appearance of curved or sloping lines improves as the size of the pixels decreases. Software techniques can also be used to improve the visual appearance of pixel based lines.

Computer-Aided Design (CAD) n n n Use of computer systems to assist in the creation, modification, analysis, and optimization of a design Typical tools: • Tolerance analysis • Mass property calculations Finite-element modeling and visualization Computer-Aided Manufacturing (CAM) n n Use of computer systems to plan, manage, and control manufacturing operations Direct or indirect computer interface with the plant’s production resources Numerical control of machine tools Programming of robots

Computer-Aided Design Process n n n Two types of activities: synthesis and analysis Synthesis is largely qualitative and hard to capture on computer Analysis can be greatly enhanced with computers Once analysis is complete, design evaluation- rapid prototyping Software packages for design optimization Components of CAD/CAM/CAE Systems n Major component is hardware and software allowing shape manipulation. Hardware includes graphic devices and their peripherals for input and output operations. Software includes packages that manipulate or analyze shapes according to user interaction

Components of CAD/CAM/CAE Systems

Hardware Components n n Graphic device is composed of a display processing unit, a display device, and one or more input devices Input devices: • • n Mouse Space ball Data tablet with a puck or stylus Keyboard Output Devices: • Plotters • Color laser printers

Software Components n n n CAD: software allows the designer to create and manipulate a shape interactively and store it CAM: software plans, manages and controls the operations of a manufacturing site CAE: software analyzes design geometry, allowing designer to study product behavior

Windows-Based CAD Systems n n n User interface is similar to Windows Employs component technology, in which best key software elements are selected from among available software Use object-oriented technology, which modularizes the program Capable of either parametric or variation modeling Internet support

DISPLAY DEVICES • Video display systems (CRT’s) – Raster-scan displays (refresh) – Random-scan displays (vector refresh) – Color CRT monitors – Flat-panel displays – Plasma panels – LCD’s (Liquid Crystal Display) – Electroluminescent displays – Flat-panel characteristics – 3 D Viewing devices – VR-systems (Virtual Reality)

CRT Principle

Cathode Ray Tube

CRT contains -Electrons “boil off” the heated cathode and shoot towards the anode. Electrons striking the phosphors create light through: n – fluorescence (fraction of usec) n – phosphorescence (10 to 60 usec) Different phosphors have different: n – color n – persistence (as long as a few seconds) n The image must be refreshed to avoid flicker: n – typically need at least 60 Hz (why 60 Hz? ) n – exact frequency depends on: n Persistence, image intensity, ambient, lighting, wavelength

Color CRT monitors Most color monitors employ shadow mask technology: – uses triads of red, green, and blue phosphors at each pixel – uses three electron guns, one per color – shadow mask used to make each kind of phosphor only “visible” from one gun. These are also known as RGB monitors.

A graphics processor accepts graphics commands from the CPU and executes the graphics commands which may involve drawing into the frame buffer. The frame buffer acts as a temporary store of the image and also as a decoupler to allow the graphics processor and the display controller to operate at different speeds. The display controller reads the frame buffer line by line and generates the control signals for the screen. Block diagram of a CRT graphics

Raster-Scan System n 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. Picture definition is stored in memory area called the refresh buffer or frame buffer. This memory area holds the set of intensity values for all the screen points. Stored intensity values are then retrieved from the refresh buffer and “painted” on the screen one row (scan line) at a time (Fig. 4). Each screen point is referred to as a pixel or pel (shortened forms of picture element).

Raster Displays Electron beam traces over screen in raster scan order. – Each left-to-right trace is called a scan line. – Each spot on the screen is a pixel. – When the beam is turned off to sweep back, that is a retrace, or a blanking interval.

Random-Scan Technique � � � Random scan monitors draw a picture one line at a time and for this reason are also referred to as vector displays (or stroke-writing or calligraphic displays). The component lines of a picture can be drawn and refreshed by a randomscan system in any specified order. Refresh rate on a random-scan system depends on the number of lines to be displayed. Picture definition is now stored as a set of line-drawing commands in an area of memory referred to as the refresh display file. Sometimes the refresh display file is called the display list, display program, or simply the refresh buffer. To display a specified picture, the system cycles through the set of commands in the display file, drawing each component line in turn. After all line- drawing commands have been processed, the system cycles back to the first line command in the list. Random-scan displays are designed to draw al the component lines of a picture 30 to 60 times each second.

Shadow-Mask n Shadow-mask methods are commonly used in raster-scan systems (including color TV) because they produce a much wider range of color than the beam penetration method. A shadow-mask CRT has three phosphor color dots at each pixel position. One phosphor dot emits a red light, another emits a green light, and the third emits a blue light. This type of CRT has three electron guns, one for each color dot, and a shadow- mask grid just behind the phosphor –coated screen. Figure 6 below illustrates the delta-delta shadow-mask method, commonly used in color CRT systems. The three electron beam are deflected and focused as a group onto the shadow mask, which contains a series of holes aligned with the phosphordot patterns. When the three beams pass through a hole in the shadow mask, they activate a dot triangle, which appears as a small color spot the screen the phosphor dots in the triangles are arranged so that each electron beam can activate only its corresponding color dot when it passes through the shadow mask

Shadow Mask – color CRT

Liquid- Crystal Displays (LCDs) � � Liquid- crystal displays (LCDs) are commonly used in systems, such as calculators and portable, laptop computers. These non-emissive devices produce a picture by passing polarized light from the surrounding or from an internal light source through a liquid- crystal material that can be aligned to either block or transmit the light. The term liquid crystal refers to the fact that these compounds have a crystalline arrangement of molecules, yet they flow like a liquid. Flat-panel displays commonly use nematic (threadlike) liquid-crystal compounds that tend to keep the long axes of the rod-shaped molecules aligned. A flat-panel display can then be constructed with a nematic liquid crystal. Two glass plates, each containing a light polarizer at right angles to the other palate, sandwich the liquid-crystal material. Rows of horizontal transparent conductors are built into one glass plate, and columns of vertical conductors are put into the other plate. The intersection of two conductors defines a pixel position. Polarized light passing through the material is twisted so that it will pass through the opposite polarizer. The light is reflected back to the viewer. To turn off the pixel, we apply voltage to the two intersecting conductors to align the molecules so that the light is not twisted. This type of flatpanel device is referred to as a passive matrix LCD.

Liquid Crystal Display (LCD)

Flat Panel Display

Plasma Display Large format displays (pixels ~1 mm compared to 0. 2 mm for CRT) • Large viewing angle • Basically fluorescent tubes

Light Emitting Display

Raster Graphics

Frame Buffer

Frame Buffer Refresh n Refresh Rate Usually 30~75 Hz

Monitors A monitor is also called video display terminal (VDT). The visual display of the processed data, which the users can view is got through the monitor. Computer monitors come in a variety of screen sizes and not to forget visual resolutions. There are two types of computer monitors available, namely CRT and flat panel. All monitors rely in a video card, which is located on the motherboard to display the information. It is the video card, which processes the data into images, which is eventually displayed on the monitor.

Workstations n n A type of computer used for engineering applications (CAD/CAM), desktop publishing, software development, and other types of applications that require a moderate amount of computing power and relatively high quality graphics capabilities. Workstations generally come with a large, high-resolution graphics screen, at least 64 MB (megabytes) of RAM, built-in network support, and a graphical user interface. Most workstations also have a mass storage device such as a disk drive, but a special type of workstation, called a diskless workstation, comes without a disk drive. The most common operating systems for workstations are UNIX and Windows NT.

Input Devices n n n n Keyboard - good for text, awkward for graphics. Mouse - popular and convenient for graphics. Data tablet - good for accurate digitalization of existing hard copies as vector sets. Scanner - - good for digitalization of existing hard copies as pixel sets. Light pen - usually not as convenient as a mouse. Touch screen - more useful for menu selection than for graphics. Joystick - useful for interactive graphics (games).

Graphics Tablet or Digitizer n n n A graphics tablet or digitizer is a computer input device that enables a user to hand-draw images and graphics, similar to the way a person draws images with a pencil and paper. These tablets may also be used to capture data or handwritten signatures. It can also be used to trace an image from a piece of paper which is taped or otherwise secured to the surface. Capturing data in this way, either by tracing or entering the corners of linear polylines or shapes is called digitizing. The device consists of a flat surface upon which the user may "draw" or trace an image using an attached stylus, a pen-like drawing apparatus. The image generally does not appear on the tablet itself but, rather, is displayed on the computer monitor. Some tablets are intended as a general replacement for a mouse as the primary pointing and navigation device for desktop computers.

Data Glove � � While most input devices offer one, two or three degrees of freedom, the glove is unique in that it offers multiple degrees of freedom for each finger and hand as well. This permits the user to communicate to the computer , a far richer picture of his or her intentions than most other devices. A glove is generally quite lightweight , with flexible sensors which accurately and repeatedly measure the position and movements of the fingers and wrist. Pressure sensors on the gloves palms measure occurring during object grasping. Gloves can have a varying number of sensors depending the application they are used for. Most common models have in -between 12 and 24 sensors. These sensors are bend sensitive and their resistance varies linearly with the bend. Sensors are extremely thin and flexible and provide an undetectable resistance to bending. Since the sensors exhibit low sensitivity to their positions over finger joint and to the joint radii of curvature, gloves provide high quality measurements over a wide range.

n Glove variations include ones with open finger tips, which enable users to type, write and grab objects while wearing the glove. The glove is connected to the computer via an instrumentation unit. This instrumentation unit is connected to the computer by a serial cable. The instrumentation unit provides a variety of convenient functions and features, including time -stamp , data glove status, external sampling synchronisation and analogue sensor outputs. Software is necessary or calibration of the glove and is used to display event virtually. .

Virtual Reality n n Virtual reality is an artificial environment that is created with software and presented to the user in such a way that the user suspends belief and accepts it as a real environment. On a computer, virtual reality is primarily experienced through two of the five senses: sight and sound. The simplest form of virtual reality is a 3 -D image that can be explored interactively at a personal computer, usually by manipulating keys or the mouse so that the content of the image moves in some direction or zooms in or out. More sophisticated efforts involve such approaches as wraparound display screens, actual rooms augmented with wearable computers, and heptices devices that let you feel the display images.

Speaker � Speaker A speaker is a hardware device, that is connected to a computer's sound card, which outputs sound generated by the card. Audio data generated by the computer is sent to the audio card, that is located in the expansion slot. The card translates the data into audio signals, which are then sent to either the speakers or headphones. In the initial phase, computers had on-board speakers, which generated series of different tones and beeps. When the popularity of multimedia and computer games grew, higher quality computer speakers came into the market. These new speakers were known for higher quality sound effects and music. � Projector It is a hardware device, with which an image like a computer screen is projected onto a flat screen. Image data is sent to the video card, by the computer which is then translated into a video image and sent to the projector. A projector is often used in meetings or to make presentations, because they allow for a large image to be shown, with which the display is available for a large audience.

Hard copy devices - Printers A printer is an output device that produces a hard copy of data. The resolution of printer output is expressed as DPI Printers can be classified into different types in several ways. First, the printers can be divided into three categories by the way they print. Serial Printers: Also called a character printer. Print a single character at a time. They are usually inexpensive and slow. Line Printers: Print a line at a time. They are expensive and very fast. Line printers use a band, a chain, etc. Page Printers: Also called a laser printer. Print a page at a time. They usually use a laser to produce page images. Quality is best. This is a little bit expensive, but the price of the personal laser printer is decreasing. The price range of the personal laser printer is around $400, today. Second, printers can be classified into two forms according to the use of a hammer. Impact Printers: Hammer hits ribbons, papers or print head. Dot-matrix and daisy -wheel printers are the example. Noisy. Nonimpact Printers: They do not have the hammer and do not hit. An example is an ink-jet and laser printer.

� � Daisy-Wheel Printer Daisy-Wheel is a printer mechanism that uses any kind of hub (wheel) having a set of spokes at the margin of the hub. The wheel can be removed to use a different character set. The end of each spoke is a raised image of a type character. When the wheel is turned and the required character is aligned to the print hammer, the character is then struck into a ribbon and onto a paper with the hammer. Chain Printer A chain printer uses a printing mechanism that uses character typefaces linked together in a chain. The chain spins horizontally around a set of hammers aligned with each position. When the required character is in front of the selected print position, hammer in that position hits the paper into the ribbon against the character in the chain.

n n Dot-Matrix Printer Dot-matrix printers are printers that write characters and form graphic images using one or two columns of tiny dots on a print head. The dot hammer moving serially across the paper strikes an inked-ribbon and creates images on paper. Dot matrix printers are popular printers used with microcomputers, because the printers are highly reliable and inexpensive. Ink-Jet Printer Ink-jet is a printer mechanism that sprays one or more color of ink at high speed onto the paper and produces high-quality printing. This printer also produces color printing as well as high-quality image. That is, ink-jet printers can be used for variety of color printing at a relatively low cost. Ink-jet printing has two methods: Continuous stream method and drop-on- demand method.

n n n Laser Printer A laser printer is a printer that uses the electro-photographic method used in a copy machine. The printer uses a laser beam light source to create images on a photographic drum. Then the images on the drum are treated with a magnetically charged toner and then are transferred onto a paper. A heat source is usually applied to make the images adhere. In 1984, Hewlett-Packard introduced the first desktop laser printer, called the Laser. Jet. Plotters A plotter is a special-purpose output device that draws images with ink pens. That is, the plotter is a graphics printer for making sophisticated graphs, charts, maps, and three-dimensional graphics as well as highquality colored documents. It can also produce larger size of documents. Plotters require data in a vector graphics format that can produce images with a series of lines. There are two main types of plotters. Drum Plotter, Flatbed Plotter.

Voice-Output Devices n n Voice-Output Devices This device produces a human speech like sound, but actually is prerecorded vocalized sounds. Voice output is used in the telephone information system, where the requested number is reported using a voice output system. For example, when a student enrolls courses using a telephone registration system, he or she hears voice output upon your request. Voice output is becoming common in voice messaging systems.

Output Primitives � � � Points Lines DDA Algorithm Bresenham’s Algorithm Polygons Scan-Line Polygon Fill Inside-Outside Tests Boundary-Fill Algorithm Antialiasing

Points n Single Coordinate Position • Set the bit value(color code) corresponding to a specified screen position within the frame buffer y x

Lines n Intermediate Positions between Two Endpoints • DDA, Bresenham’s line algorithms
- Slides: 53