Mathematical Elements of Computer Graphics: Assignment On Unit 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

MATHEMATICAL ELEMENTS OF COMPUTER GRAPHICS

ASSIGNMENT ON UNIT 1

PRASHANTH G L (1MS10EC083) PRAVEEN NAYAK M (1MS10EC084) PRIYANKA MOHAN (1MS10EC087) SIDDHARTH SRIVATSA (1MS10EC120) SANTHOSH SHETTY (1MS10EC107) PRAJWAL S (1MS10EC079) MAYUKH S (1MS10EC054) NISCHAL K N (1MS10EC068)

Contents
1 Shadow Mask CRT 2 CRT display device 3 NAPLP 3.1 History of Graphics Adapter: . . . . . . 3.2 CRT . . . . . . . . . . . . . . . . . . . . 3.3 VGA . . . . . . . . . . . . . . . . . . . . 3.4 NIVIDIA . . . . . . . . . . . . . . . . . 3.5 SVGA . . . . . . . . . . . . . . . . . . . 3.6 MODE of Graphic Adapter Operation 4 5 6 6 7 7 7 7 8 8 8 9 9 9 9 10 10 10 10 11 11 11 12 12 13 14 14 15 15 15 16 16 16 16 16

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

4 Raster Scan System vs Random Scan System 4.1 Raster Scan Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Random Scan Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Basic Denitions 5.1 Pixel . . . . . 5.2 Voxel . . . . 5.3 CGA . . . . . 5.4 VGA . . . . . 5.5 SVGA . . . . 5.6 NVIDIA . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

6 Input/Output devices 6.1 Introduction . . . 6.2 Data Glove . . . . 6.3 Digitizers . . . . . 6.4 Joystick . . . . . . 6.5 Mouse . . . . . . . 6.6 Light Pen . . . . . 6.7 Touch Screen . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

7 Applications of Computer Graphics 7.1 Simulation . . . . . . . . . . . . . . . . . . . . . . 7.2 Entertainment . . . . . . . . . . . . . . . . . . . . 7.3 User Interface . . . . . . . . . . . . . . . . . . . . 7.4 Display of Information in Industry and Business 7.5 Design . . . . . . . . . . . . . . . . . . . . . . . . 7.6 Simulation . . . . . . . . . . . . . . . . . . . . . . 8 Conceptual Framework for Interactive Graphics

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

MECG OE-1 9 Digital Camera 9.1 Introduction . . . . . . . . . . . . . . 9.2 Construction . . . . . . . . . . . . . . 9.3 Parameters of a Digital Camera . . . 9.4 Working Principle . . . . . . . . . . . 9.5 Color Filtering Algorithm . . . . . . 9.6 Digital Cameras v/s Analog Camera

Unit 1

3 17 17 17 19 19 19 20 21 21 21 21

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

10 Open GL and Graphics Pipeline 10.1 Open GL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2 Graphics Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2.1 Stages of a Graphics Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

MECG OE-1

Unit 1

Shadow Mask CRT

Denition: The shadow mask is one of the technologies used to manufacture cathode ray tube (CRT) televisions and computer displays that produce color images. Another approach is the aperture grille, better known by its trade name, Trinitron. All early color televisions and the majority of CRT computer monitors used shadow mask technology. Both of these technologies are largely obsolete, having been increasingly replaced since the 1990s by the liquid-crystal display (LCD). Working Principle: A shadow mask is a metal plate punched with tiny holes that separate the colored phosphors in the layer behind the front glass of the screen. Three electron guns at the back of the screen sweep across the mask, with the beams only reaching the screen if they pass through the holes-the guns, arranged in a triangle (called a triad) at the back of the tube, were aimed to focus on the metal plate and scanned it as normal. For much of the time during the scan, the beams would hit the back of the plate and be stopped. However, when the beams passed a hole they would continue to the phosphor in front of the plate. In this way, the plate ensured that the beams were perfectly aligned with the colored phosphor dots. This still left the problem of focusing on the correct colored dot. Normally the beams from the three guns would each be large enough to light up all three colored dots on the screen. The mask helped by mechanically attenuating the beam to a small size just before it hit the screen. The beams are made to approach the metal plate from dierent angles. After being cut o by the mask, the beams would continue forward at slightly dierent angles, hitting the screens at slightly dierent locations. The spread was a function of the distance between the guns at the back of the tube, and the distance between the mask plate and the screen. By painting the colored dots at the correct locations on the screen, and leaving some room between them to avoid interactions, the guns would be guaranteed to hit the right colored spot. . For instance, the blue phosphor dots are hit by the beam from the blue gun" after passing through a particular hole in the mask. The other two guns do the same for the red and green dots. This arrangement allows the three guns to address the individual dot colors on the screen, even though their beams are much too large and too poorly aimed to do so without the mask in place. For television use, modern displays (starting in the late 1960s) use rectangular slots instead of circular holes, improving brightness.

Figure 1: Shadow Mask CRT Practical Problems: As the beam swept the mask, the vast majority of its energy was deposited on the mask, not the screen in front of it. A typical mask of the era might have only 15% of its surface open. To produce an image as bright as the one on a traditional B&W television, the electron guns in this hypothetical shadow mask system would have to be ve times more powerful. Additionally, the dots on the screen were deliberately separated in order to avoid being hit by the wrong gun, so much of the screen was black. This required even more power in order to light up the resulting image. And as the power was divided up among three of these much more powerful guns, the cost of implementation was much higher than a similar B&W set. The amount of power deposited on the color screen was so great that thermal loading was a serious

MECG OE-1

Unit 1

problem. The energy the shadow mask absorbs from the electron gun in normal operation causes it to heat up and expand, which leads to blurred or discolored images (see doming). Signals that alternated between light and dark caused cycling that further increased the diculty of keeping the mask from warping. Furthermore, the geometry required complex systems to keep the three beams properly positioned across the screen. If you consider the beam when it is sweeping across the middle area of the screen, the beams from the individual guns are each traveling the same distance and meet the holes in the mask at equal angles. In the corners of the screen some beams have to travel further and all of them meet the hole at a dierent angle than at the middle of the screen. These issues required additional electronics and adjustments to maintain correct beam positioning.

CRT display device

Denition: The cathode ray tube (CRT) is a vacuum tube containing one or more electron guns (a source of electrons or electron emitter) and a uorescent screen used to view images. It has a means to accelerate and deect the electron beam(s) onto the screen to create the images. The images may represent electrical wave forms (oscilloscope), pictures (television, computer monitor), radar targets or others. Working Principle: The CRT uses an evacuated glass envelope which is large, deep (i.e. long from front screen face to rear end), fairly heavy, and relatively fragile. As a matter of safety, the face is typically made of thick lead glass so as to be highly shatter-resistant and to block most X-ray emissions, particularly if the CRT is used in a consumer product. CRTs have largely been superseded by newer display technologies such as LCD, plasma display, and OLED, which have lower manufacturing costs, power consumption, weight and bulk. The vacuum level inside the tube is high vacuum on the order of 0.01 Pa to 133 nPa. In television sets and computer monitors, the entire front area of the tube is scanned repetitively and systematically in a xed pattern called a raster. An image is produced by controlling the intensity of each of the three electron beams, one for each additive primary color (red, green, and blue) with a video signal as a reference. In all modern CRT monitors and televisions, the beams are bent by magnetic deection, a varying magnetic eld generated by coils and driven by electronic circuits around the neck of the tube, although electrostatic deection is commonly used in oscilloscopes, a type of diagnostic instrument. Color tubes use three dierent phosphors which emit red, green, and blue light respectively. They are packed together in stripes (as in aperture grille designs) or clusters called "triads" (as in shadow mask CRTs). Color CRTs have three electron guns, one for each primary color, arranged either in a straight line or in an equilateral triangular conguration (the guns are usually constructed as a single unit). (The triangular conguration is often called "delta-gun", based on its relation to the shape of the Greek letter delta.) A grille or mask absorbs the electrons that would otherwise hit the wrong phosphor. A shadow mask tube uses a metal plate with tiny holes, placed so that the electron beam only illuminates the correct phosphors on the face of the tube; the holes are tapered so that the electrons that strike the inside of any hole will be reected back, if they are not absorbed (e.g. due to local charge accumulation), instead of bouncing through the hole to strike a random (wrong) spot on the screen. Another type of color CRT uses an aperture grille of tensioned vertical wires to achieve the same result. Practical Problems: Large size and weight, especially for bigger screens (a 20-inch (51 cm) unit weighs about 50 lb (23 kg)). Geometric distortion caused by variable beam travel distances.

MECG OE-1

Unit 1

High power consumption. On average, a CRT monitor consumes 2?10 times the power that an identically sized LCD monitor would consume, depending on the type of back light used in the LCD screen, and its brightness setting. A lot of heat can be emitted during operation, due to relatively high power consumption. Can suer screen burn-in, though not as quickly as Plasma displays. Produces noticeable icker at refresh rates lower than 85 Hz.

Figure 2: CRT

NAPLP

NAPLPS (North American Presentation Layer Protocol Syntax) was designed as an information transfer protocol rather than as a le format. However, because NAPLPS data is occasionally written to disk and saved in le form, it is only a matter of time before an actual format stabilizes. NAPLPS is used by a number of Videotex services, is supported by special NAPLPS terminals, and is used by Prodigy, a well-known commercial online service. NAPLPS was designed to extend ASCII to provide ecient transmission of text and picture information. It was specically designed to provide usable information transfer rates even at 2400 baud. Data is sent as a stream of 7-bit or 8-bit ASCII characters to provide maximum compatibility with all ASCII-based operating platforms, network hardware, and network software. NAPLPS denes line, box, circle, arc, polyline, polygon, spline, bitmaps, and fonts, both in palette and 24-bit color. The coordinate model is right-handed Cartesian, meaning that X and Y coordinates increase toward the upper-right of the screen. A NAPLPS code sequence begins with the characters ESC 25 41 and ends with the sequence ESC 25 40. NAPLPS code sequences are designed with an eye toward avoiding standard terminal escape sequences such as those provided by VT100 and ANSI. NAPLPS les are basically segments of the NAPLPS data stream redirected to a le. Properly formatted, NAPLPS data les are not unlike unencoded binary les. Proponents of NAPLPS claim great eciencies from the encoding scheme. Much of the burden for image reconstruction falls on the rendering application, so a combination of low-bandwidth transmission channels and high-performance workstations would work well with NAPLPS. Unfortunately, the trend in recent years has been for data to be sent in bitmap format across channels of increasing bandwidth, so its not clear what the future of NAPLPS will be. A number of terminal programs currently support NAPLPS on both the PC and the Macintosh platforms.

3.1

History of Graphics Adapter:

A graphics adapter is a video card that ts into the video slot or interface on a computer motherboard. Video interfaces have evolved over the years, most recently from Advanced Graphics Port (AGP) and all its 6

MECG OE-1

Unit 1

avors, to Peripheral Component Interconnect Express, or PCI Express (PCIe). The newer interface allows for faster rendering of images to meet standards that are becoming increasingly demanding.

3.2

CRT

The Color Graphics Adapter (CGA), originally also called the Color/Graphics Adapter or IBM Color/Graphics Monitor Adapter, introduced in 1981, was IBMs rst color graphics card, and the rst color computer display standard for the IBM PC. The standard IBM CGA graphics card was equipped with 16 kilobytes of video memory, and could be connected either to a NTSC-compatible monitor or television via an RCA jack, or to a dedicated 4-bit "RGBI" interface CRT monitor, such as the IBM 5153 color display. Built around the Motorola MC6845 display controller, the CGA card featured several graphics and text modes. The highest resolution of any mode was 640200, and the highest color depth supported was 4-bit (16 colors).

3.3

VGA

Video Graphics Array (VGA) refers specically to the display hardware rst introduced with the IBM PS/2 line of computers in 1987, but through its widespread adoption has also come to mean an Analog computer display standard, the 15-pin D-sub-miniature VGA connector or the 640480 resolution itself. While this resolution was superseded in the personal computer market in the 1990s, it is becoming a popular resolution on mobile devices. VGA was the last graphical standard introduced by IBM that the majority of PC clone manufacturers conformed to, making it today (as of 2010) the lowest common denominator that all PC graphics hardware can be expected to implement without device-specic driver software.[citation needed] For example, the Microsoft Windows splash screen appears while the machine is still operating in VGA mode, which is the reason that this screen always appears in reduced resolution and color depth. VGA was ocially superseded by IBMs Extended Graphics Array (XGA) standard, but in reality it was superseded by numerous slightly dierent extensions to VGA made by clone manufacturers that came to be known collectively as Super VGA .

3.4

NIVIDIA

Nvidia is a multinational corporation which specializes in the development of graphics processing units and chipset technologies for workstations, personal computers, and mobile devices. Based in Santa Clara, California, the company has become a major supplier of integrated circuits (ICs), designing graphics processing units (GPUs) and chipsets used in graphics cards, in personal-computer motherboards, and in video game consoles.

3.5

SVGA

Super Video Graphics Array or Ultra Video Graphics Array, almost always abbreviated to Super VGA, Ultra VGA or just SVGA or UVGA is a broad term that covers a wide range of computer display standards Originally, it was an extension to the VGA standard rst released by IBM in 1987. Unlike VGA- a purely IBM-dened standard- Super VGA was dened by the Video Electronics Standards Association (VESA), an open consortium set up to promote interoperability and dene standards. When used as a resolution specication, in contrast to VGA or XGA for example, the term SVGA normally refers to a resolution of 800600 pixels. Though Super VGA cards appeared in the same year as VGA, it wasnt until 1989 that Super VGA was dened by VESA. In that rst version, it called for a resolution of 800600 4-bit pixels. Each pixel could therefore be any of 16 dierent colors. It was quickly extended to 1024768 8-bit pixels, and well beyond

MECG OE-1

Unit 1

that in the following years. Although the number of colors was dened in the original specication, this soon became irrelevant as (in contrast to the old CGA and EGA standards) the interface between the video card and the VGA or Super VGA monitor uses simple analog voltages to indicate the desired color. In consequence, so far as the monitor is concerned, there is no theoretical limit to the number of dierent colors that can be displayed. Note that this applies to any VGA or Super VGA monitor. While the output of a VGA or Super VGA video card is analog, the internal calculations the card performs in order to arrive at these output voltages are entirely digital. To increase the number of colors a Super VGA display system can reproduce, no change at all is needed for the monitor, but the video card needs to handle much larger numbers and may well need to be redesigned from scratch. Even so, the leading graphics chip vendors were producing parts for high-color video cards within just a few months of Super VGAs introduction. On paper, the original Super VGA was to be succeeded by Super XGA, but in practice the industry soon abandoned the attempt to provide a unique name for each higher display standard, and almost all display systems made between the late 1990s and the early 2000s are classed as Super VGA.

3.6

MODE of Graphic Adapter Operation

Many video adapters support several dierent modes of resolution, all of which are divided into two general categories: character mode and graphics mode. Of the two modes, graphics mode is the more sophisticated. Programs that run in graphics mode can display an unlimited variety of shapes and fonts, whereas programs running in character mode are severely limited. Programs that run entirely in graphics mode are called graphics-based programs. In character mode, the display screen is treated as an array of blocks, each of which can hold one ASCII character. In graphics mode, the display screen is treated as an array of pixels. Characters and other shapes are formed by turning on combinations of pixels.

4
4.1

Raster Scan System vs Random Scan System


Raster Scan Display

Raster Scan methods have increasingly become the dominant technology since about 1975. These methods use the TV type raster scan. The growth in the use of such methods has been dependent on rapidly decreasing memory prices and on the availability of cheap scan generating hardware from the TV industry. The screen is coated with discrete dots of phosphor, usually called pixels, laid out in a rectangular array. The image is then determined by how each pixel is intensied. The representation of the image used in servicing the refresh system is thus an area of memory holding a value for each pixel. This memory area holding the image representation is called the frame buer. The values in the frame buer are held as a sequence of horizontal lines of pixel values from the top of the screen down. The scan generator then moves the beam in a series of horizontal lines with y-back (non-intensied) between each line and between the end of the frame and the beginning of the next frame. This is illustrated in Fig. 3. Unlike random-scan which is a line drawing device, refresh CRT is a pointplotting device. Raster displays store the display primitives (lines, characters, shaded and patterned areas) in a refresh buer. Refresh buer (also called frame buer) stores the drawing primitives in terms of points and pixels components This scan is synchronized with the access of the intensity values held in the frame buer. The maximum number of points that can be displayed without overlap by a system is called the resolution and is quoted as the number of points per horizontal line versus the number of horizontal lines. Typical resolutions are 640480, 1024768, and 12801024. The maximum resolution is determined by the characteristics of the monitor and/or by the memory capacity available for storing the frame buer.

MECG OE-1

Unit 1

Figure 3: Raster scan Display

(a) Deection in random scan display

(b) Random scan Display

Figure 4

4.2

Random Scan Display

Random scan displays, often termed vector Vector, Stroke, and Line drawing displays, came rst and are still used in some applications. Here the characters are also made of sequences of strokes (or short lines). The electron gun of a CRT illuminates straight lines in any order. The display processor repeatedly reads a variable display le dening a sequence of X,Y coordinate pairs and brightness or color values, and converts these to voltages controlling the electron gun. In random scan display an electron beam is deected from endpoint to end-point (Fig .4a). The order of deection is dictated by the arbitrary order of the display commands. The display must be refreshed at regular intervals -minimum of 30 Hz (fps) for icker-free display. The dierences between the raster scan display system and random scan display system is gured out in Table 1.

5
5.1

Basic Denitions
Pixel

It is a minute area of illumination on a display screen. Images are made up of many pixels.

5.2

Voxel

In computer-based modeling or graphic simulation, a voxel is an array of elements of volume that constitute a notional three-dimensional space, especially each of an array of discrete elements into which a representation of a three-dimensional object is divided.

MECG OE-1

Unit 1 Table 1: Dierences between Raster scan system and Random scan system

10

Base of Dierence Electron Beam Resolution

Picture Denition Realistic Display

Refresh Rate Line Drawing Image Drawing Cost

Raster Scan System The electron beam is swept across the screen, one row at a time, from top to bottom. Its resolution is poor because raster system in contrast produces zig-zag lines that are plotted as discrete point sets. Picture denition is stored as a set of intensity values for all screen points, called pixels in a refresh buer area. The capability of this system to store intensity values for pixel makes it well suited for the realistic display of scenes contain shadow and color pattern. Refreshing on raster-scan displays is carried out at the rate of 60 to 80 frames per second Zig-Zag line is produced because plotted value are discrete. Screen points/pixels are used to draw an image. Raster Scan Systems are less expensive.

Random Scan System The electron beam is directed only to the parts of screen where a picture is to be drawn. Its resolution is good because this system produces smooth lines drawings because CRT beam directly follows the line path. Picture denition is stored as a set of line drawing instructions in a display le. These systems are designed for line-drawing and cant display realistic shaded scenes. Refreshing on random-scan displays is carried out at the rate of 30 to 60 frames per second. Smooth line is produced because directly the line path is followed by electron beam. Mathematical functions are used to draw an image. Random-scan systems are generally costlier.

5.3

CGA

Abbreviation of color graphics adapter, an old graphics system for PCs. Introduced in 1981 by IBM, CGA was the rst color graphics system for IBM PCs. Designed primarily for computer games, CGA does not produce sharp enough characters for extended editing sessions. CGAs highest-resolution mode is 2 colors at a resolution of 640200.

5.4

VGA

Abbreviation of video graphics array, a graphics display system for PCs developed by IBM. VGA has become one of the de facto standards for PCs. In text mode, VGA systems provide a resolution of 720400 pixels. In graphics mode, the resolution is either 640480 (with 16 colors) or 320200 (with 256 colors). The total palette of colors is 262,144. Unlike earlier graphics standards for PCs MDA, CGA, and EGA VGA uses analog signals rather than digital signals.

5.5

SVGA

Short for Super VGA, a set of graphics standards designed to oer greater resolution than VGA. SVGA supports 800600 resolution, or 480,000 pixels. The SVGA standard supports a palette of 16 million colors, but the number of colors that can be displayed simultaneously is limited by the amount of video memory installed in a system. One SVGA system might display only 256 simultaneous colors while another displays the entire palette of 16 million colors. The SVGA standards are developed by a consortium of monitor and graphics manufacturers called VESA.

5.6

NVIDIA

Nvidia Corporation is an American global technology company based in Santa Clara, California. Nvidia manufactures graphics processing units (GPUs), as well as having a signicant stake in manufacture of system-on-a-chip units (SOCs) for the mobile computing market. Nvidias primary GPU product line labeled "Ge Force" is in direct competition with AMDs "Radeon" products. Nvidia also joined the gaming industry with its handheld Nvidia Shield. In addition to GPU manufacturing, Nvidia provides parallel processing capabilities to researchers and scientists that allow them to eciently run high-performance

10

MECG OE-1

Unit 1

11

applications. They are deployed in super computing sites around the world. More recently, Nvidia has moved into the mobile computing market, where it produces Terra mobile processors for smart phones and tablets, as well as vehicle infotainment systems. In addition to AMD, its other competitors include Intel and Qualcomm.

6
6.1

Input/Output devices
Introduction

Input/Output devices are hardware elements: Connection between the physical human eectors (hands, vocal cords) and sensors (eyes, ears), and the input and output channels of computers. Also enable communication between users and software. Usually their properties and behavior can be adapted through software. Task demands and user preferences aect the choice of input and output devices to use, for e.g., the needs for hands-free or silent operation or special devices or setups for users with disabilities. The purpose of the input devices is enter data into a system and also to issue commands to the system. Input devices transform data from the user into a form that a computer system can process. A few of the Input Devices are discussed below:

6.2

Data Glove

A data glove is an interactive device, resembling a glove worn on the hand, which facilitates tactile sensing and ne-motion control in robotics and virtual reality thereby achieving human-computer interaction. Data gloves are one of several types of electromechanical devices used in haptics applications. Various sensor technologies are used to capture physical data such as bending of ngers. Often a motion tracker, such as a magnetic tracking device or inertial tracking device, is attached to capture the global position/rotation data of the glove. These movements are then interpreted by the software that accompanies the glove, so any one movement can mean any number of things. Tactile sensing incorporates the simulation of the sense of human touch and includes the ability to perceive pressure, linear force, torque, temperature, and surface texture. Fine-motion control involves the use of sensors to detect the movements of the users hand and ngers, and the translation of these motions into signals that can be used by a virtual hand (for example, in gaming) or a robotic hand (for example, in remote-control surgery). The glove has been hand carved and modeled from wax, working directly on the performers hand to create a custom t as shown in Fig.5a. It is fully jointed for comfortable, natural movement, and includes cutting and digging tools at the ends of the ngertips. The joints will allow for the transfer of input signals via a series of ex sensors that will produce varied electrical signals to drive other suit elements. The wax original has been dismantled, molded with silicon and duplicated using wax injection. The individual parts are now being cast in titanium. The resulting units will eventually be jointed with ber composites. The nal product will have an organic appearance, mechanical movement and functional input. 11

MECG OE-1

Unit 1

12

(a) Data Glove

(b) Digitizer

Figure 5

6.3

Digitizers

A graphics tablet (or digitizing tablet, graphics pad, drawing tablet) is a computer input device that allows one to hand-draw images and graphics, similar to the way one draws images with a pencil and paper. Fig.5b shows a digitizer and its parts. These devices can be used to input co-ordinate values in either a 2D or 3D space. One type of digitizer is the graphics tablet which is used to input 2D co-ordinates by activating a hand cursor at selected positions on a at surface. A hand cursor contains cross hairs for sighting positions, while a stylus is a pencil shaped device that is pointed at positions on the tablet. The working of a digitizer in similar to that of a mouse with some major dierences. Actually the input from a mouse is relative to the cursor position on the screen and that is why if you draw a line with a mouse and then pick it up and move to a dierent place on desk you will nd that the input continues from the last position of the cursor on the screen, where it was. But in case of a digitizer each position on the tablet relates to a specic position on the screen. So it traces the existing drawing more accurately and it can easily create original drawing such as architectural drawing with precise dimensions.

6.4

Joystick

The working of the joystick shown in FIg.12 is explained as follows. A joystick is an input device consisting of a stick that pivots on a base and reports its angle or direction to the device it is controlling. A joystick consists of a small, vertical lever (called the stick) mounted on a base that is used to steer the screen cursor around. ) A joystick consists of a small, vertical lever (called the stick) mounted on a base that is used to steer the screen cursor around. The distance that the stick is moved in any direction from its center position corresponds to screen-cursor movement in that direction. Potentiometers mounted at the base of the joystick measure the amount of the movement, and springs return the stick to the centre position when it is released. One or more buttons can be programmed to act as

12

MECG OE-1

Unit 1

13

(a) Joystick

(b) Mouse

Figure 6 input switches. One or more buttons can be programmed to act as input switches to signal certain actions once a screen position has been detected. Joysticks are often used to control video games, and usually have one or more push-buttons whose state can also be read by the computer. Joysticks are also used for controlling machines such as cranes, trucks, underwater unmanned vehicles, wheelchairs, surveillance cameras and zero turning radius lawn mowers. Miniature nger-operated joysticks have been adopted as input devices for smaller electronic equipment such as mobile phones.

6.5

Mouse

A mouse is a small device that a computer user pushes across a desk surface in order to point to a place on a display screen and to select one or more actions to take from that position. Fig.6b shows a mouse and its parts.

(a) Mouse Ball and its Working

(b) Light Pen

Figure 7

13

MECG OE-1

Unit 1

14

Clicking or hovering (stopping movement while the cursor is within the bounds of an area) can select les, programs or actions from a list of names, or (in graphical interfaces) through small images called "icons" and other elements. Wheels or rollers on the bottom of the mouse can be used to record the amount and direction of movement. Another method for detecting mouse motion is with an optical sensor. For these systems, the mouse is moved over a special mouse pad that has a grid of horizontal and vertical lines. The optical sensor detects movement across the lines in the grid. Since a mouse can be picked up and put down at another position without change in cursor movement, it is used for making relative changes in the position of the screen cursor. One, two, or three buttons are usually included on the top of the mouse for signaling the execution of some operation, such as recording cursor position or invoking a function. From ohms law, we know that V=IR, where V is the voltage, I is the current and R is the resistance. The mouse ball is simply assumed to be connected to two variable resistors, one in the direction of the x axis and one in the direction of the y axis as shown in Fig.7a. The mouse ball is simply assumed to be connected to two variable resistors, one in the direction of the x axis and one in the direction of the y axis.

6.6

Light Pen

A light pen is a computer input device in the form of a light-sensitive wand used in conjunction with a computers CRT display. It allows the user to point to displayed objects or draw on the screen in a similar way to a touchscreen but with greater positional accuracy. Fig.7b shows a lightpen. A light pen is fairly simple to implement. Just like a light gun, a light pen works by sensing the sudden small change in brightness of a point on the screen when the electron gun refreshes that spot. By noting exactly where the scanning has reached at that moment, the X,Y position of the pen can be resolved. This is usually achieved by the light pen causing an interrupt, at which point the scan position can be read from a special register, or computed from a counter or timer. The pen position is updated on every refresh of the screen. It works because the monitor contains a light sensitive detector which picks up light emitted from the pen and calculates its position on the screen.

6.7

Touch Screen

(a) Touch Screen

(b) Touch Screen and Coordinate System

Figure 8

14

MECG OE-1

Unit 1

15

A touchscreen is an electronic visual display that the user can control through simple or multi-touch gestures by touching the screen with one or more ngers. Some touchscreens can also detect objects such as a stylus or ordinary or specially coated gloves. The user can use the touchscreen to react to what is displayed and to control how it is displayed (for example by zooming the text size). A typical touchscreen is shown in Fig.8a. A touch screen is a display which can detect the presence and location of a touch within the display area. The term generally refers to touch or contact to the display of the device by a nger or hand. Touch screens can also sense other passive objects, such as a stylus. The components of touch screen with respect to co ordinate system is shown in Fig.8b. The touch screen has two main attributes. First, it enables one to interact with what is displayed directly on the screen, where it is displayed, rather than indirectly with a mouse or touchpad. Secondly, it lets one do so without requiring any intermediate device, again, such as a stylus that needs to be held in the hand. They play a prominent role in the design of digital appliances such as the personal digital assistant (PDA), satellite navigation devices, mobile phones, and video games.

Applications of Computer Graphics

Computer Graphics has wide spread applications and they are growing rapidly day by day. This is because computers with major graphic abilities have become a common household product. Some applications of Computer Graphics are: Virtual Reality Augmented reality-Immersive and Non-Immersive environment, Virtual Surgery, Virtual meeting etc Design Simulation Display of information in many devices Oce automation and electronic publishing(DTP) Arts and Drawing Process Control Cartography

7.1

Simulation

Interactive computer graphics aects our lives in a number of indirect ways. For example, it helps train the pilots of our airplanes. These pilots spend much of their training in virtual environment (VE) (rather than in a real aircraft) on the ground at the controls of a ight simulator. The ight simulator is a mock up of an aircraft ight deck containing all the usual controls and surrounded by screens on, which are projected computer-generated views of the terrain visible on takeo and landing. As the trainee pilot maneuvers his Aircraft these views change; as to maintain an accurate impression of the planes motion.

7.2

Entertainment

A major chunk of the creation and manipulation of images is for animations. Here, we have two types interactive and non-interactive applications. The applications in which the user has no control over the Text/Image/Animation is called as non-interactive applications. The titles shown in TV and other forms 15

MECG OE-1

Unit 1

16

of computer art are examples of non-interactive or passive computer graphics. At times, the user is given control over the Image/Animation with the help of input devices such as joystick, mouse, keyboard etc. These applications are called the interactive applications, and enables the user can to send requests to the computer and get immediate responses. It involves two-way communication between computer and the user. Gaming is one of the familiar examples.

7.3

User Interface

Computers cannot function without a user interface. These interfaces rely mainly onon desktop window systems(to manage multiple simulation activities) and on point and click facilities(to allow users to select menu items, icons, dialogue boxes and objects on screen). Typing is necessary to input the text to be stored and manipulated. Word processing, spreadsheet, desktop-publishing programs are typical applications make use of user-interface techniques.

7.4

Display of Information in Industry and Business

Computer Graphics is used for creating 2D and 3D graphics of mathematical fubctions(histograms bar and pie-charts), physical functions(task scheduling charts, inventory charts) and economic functions(production charts) which are used to present the trends from data in a meaningful and consistent fashion. This is done to help clarify complex phenomena and facilitate informed decision making in industry and business.

7.5

Design

In Computer Aided Design(CAD), interactive graphics is used to design components and systems of mechanical, electrical, electro-mechanics and electronic devices including structures such as building automobile bodies, airplane and ship hulls, VLSI chips etc. At times, the user may want precise drawings of components and assemblies, for online drafting or architectural blue prints. Also for testing the emphasis is given to interaction with a computer-based model of the component or system being designed.

7.6

Simulation

Simulation of real world and practical issues is another major application of Computer Graphics. Interactive computer graphics aects our lives in a number of indirect ways. For example, it helps train the pilots of our airplanes. These pilots spend a lot of their training in virtual environment(VE), rather than in a real aircraft This is on the ground at the controls of a ight simulator. The ight simulator is a mock set up of an aircraft ight deck containing all the usual controls and surrounded by screens, on which the computergenerated views of the terrain visible on takeo and landing are projected. As the trainee pilot maneuvers his Aircraft these views change, so as to maintain an accurate impression of the planes motion.

Conceptual Framework for Interactive Graphics

A Graphics library/package/system is intermediary between the application and display hardware (Graphics System). The High-level conceptual framework of Interactive Graphics can be used to describe almost any Graphics System as show in in Fig. 9. At the hardware level, a computer receives input from the interaction devices, and outputs images to a display device. The software has three components - Application program, Application model and the Graphics system. The rst component, the application program creates, stores into, and retrieves information and data to and from the second component. The application program also handles user input. The second component, the application model, represents the data or objects which are to be pictured on the screen. This component produces views and pictures on the the screen by sending information to the graphics system, the third component. A series of graphics output 16

MECG OE-1

Unit 1

17

commands that contain both the detailed geometric description of the object to be viewed and the attributes describing the way the objects should appear is essentially the graphics system. It is responsible for actually producing the picture from the detailed descriptions and for passing the users input to the application program for processing. The graphics system is thus an intermediary between the application program and the

Figure 9: Touch Screen and Coordinate System display hardware that eects an output transformation from objects in the application model to a view of the model. Symmetrically, it eects an input transformation from user actions to inputs to the application program that will cause the application to make changes in the model and/or picture. The fundamental task of the designer of an interactive graphics application program is to specify the classes of data items or objects that are to be generated and represented pictorially, and how the user and the application program are to interact in order to create and modify the model and its visual representation. Most of the programmers task concerns creation and editing of the model and handling user interaction, not actually creating views, since the Graphics System handles it. Any modications to the animations/pictures/images are the result of user interaction. This hardware and software framework is more than 4 decades old, but is still useful.

9
9.1

Digital Camera
Introduction

Photography is the technique of recording x images on a light sensitive surface. Light sensitive surface this phrase dierentiate analogue and digital cameras. In analogue cameras this light sensitive surface is a lm coated with chemical substances that are sensitive to the light; in contrast digital camera uses sensors to process image and stores it in digital les. A digital camera (or digicam) is a camera that encodes digital images and videos digitally and stores them for later reproduction. Most cameras sold today are digital, and digital cameras are incorporated into many devices ranging from PDAs and mobile phones (called camera phones) to vehicles. Digital and lm cameras share an optical system, typically using a lens with a variable diaphragm to focus light onto an image pickup device. The diaphragm and shutter admit the correct amount of light to the imager, just as with lm but the image pickup device is electronic rather than chemical. However, unlike lm cameras, digital cameras can display images on a screen immediately after being recorded, and store and delete images from memory. Many digital cameras can also record moving video with sound. Some digital cameras can crop and stitch pictures and perform other elementary image editing.

9.2

Construction

A digital camera consists of the following basic parts: 17

MECG OE-1

Unit 1

18

Figure 10: Parts of a Digital Camera Lenses: It focuses the image, refracting the light rays comes from the object so that they converge into a coherent image. Diaphragm: It determines the amount light enters through the lenses. It measures as f-number, the greater the f-number the smaller the opening of the diaphragm. Shutter: It determines the amount of time of exposure. It is measured in fractions of a second. The faster the shutter the smaller the exposure. CCD (Charge Coupled Device): These are a group of sensors that converts light into corresponding electric charge. Sensors are made of light sensitive diodes called photosites that convert photons into electrons (electric charges). The amount of photons exposed by these photosites produce proportional amount of charges. CCD also includes lters that generate a color images, a series of lter must unpack the image into discrete values of Red, Green and Blue (RGB).

Figure 11: CCD or CMOS Image Sensor

18

MECG OE-1

Unit 1

19

9.3

Parameters of a Digital Camera

A digital camera has certain parameters. These parameters decide the clarity of the image. First of all, the amount of light that enters through the lens and hits the sensor has to be controlled. For this, the parameters are Aperture Aperture refers to the diameter of the opening in the camera. This can be set in automatic as well as the manual mode. Professionals prefer manual mode, as they can bring their own touch to the image. Shutter Speed Shutter speed refers to the rate and amount of light that passes through the aperture. This can be automatic only. Both the aperture and the shutter speed play important roles in making a good image. Focal Length The focal length is a factor that is designed by the manufacturer. It is the distance between the lens and the sensor. It also depends on the size of the sensor. If the size of the sensor is small, the focal length will also be reduced by a proportional amount. Lens There are mainly four types of lenses used for a digital camera. They dier according to the cost of the camera, and also focal length adjustment.

9.4

Working Principle

The basic principle of capturing an image by a camera is shown.

Figure 12: Capturing of Image by Camera Capturing image: lenses focused the light rays come from the object made into a coherent image. Diaphragm determines amount of light to be entered and shutter speed determines time of exposure. Then lights made fall onto sensor (CCD) to get corresponding electric charge. Binary system processing: Where there is word digital, the word binary also found there. To convert analogue signal (electric charge from photosites) to Digital signal in binary form a ADC converter is used. Each of the charge stored in photosites assigns to a binary value, storing them as pixels. A pixel is a point sample of an image which contains three basic color (RGB) components. Pixel per square inches determines the resolution of the camera, which indicates the size and quality of image. In next post Ill discuss more about pixel and resolution. Compression and storage: Once the image is digitalized, it is compressed by a microprocessor and stores as image le (JPEG, TTF etc.)

9.5

Color Filtering Algorithm

The sensors used in digital cameras are actually coloured blind. All it knows is to keep a track of the intensity of light hitting on it. To get the colour image, the photosites use lters so as to obtain the three primary colours. Once these colours are combined the required spectrum is obtained. For this, a mechanism called interpolation is carried out. A colour lter array is placed over each individual photosite. Thus, the sensor is divided into red, green and blue pixels providing accurate result of the true colour at a particular location. The lter most commonly used for this process is called Bayer lter pattern. In this pattern an alternative row of red and green lters with a row of blue and green lters. 19

MECG OE-1

Unit 1

20

Figure 13: Block Diagram of a Digital Camera The number of green pixels available will be equal to the number of blue and red combined. It is designed in a dierent proportion as the human eye is not equally sensitive to all three colours. Our eyes will percept a true vision only if the green pixels are more. The main advantage of this method is that only one sensor is required for the recording of all the colour information. Thus the size of the camera as well as its price can be lessened to a great extent. Thus by using a Bayer Filter a mosaic of all the main colours are obtained in various intensities. These various intensities can be further simplied into equal sized mosaics through a method called demosaicing algorithms. For this the three composite colours from a single pixel are mixed to form a single true colour by nding out the average values of the closest surrounding pixels.

9.6

Digital Cameras v/s Analog Camera

Digital versus lm photography has been a topic of debate in the photography world, as well as the lm industry since the availability of digital cameras towards the end of the 20th Century. 21st century photography is now dominated by digital operation, but the older photochemical methods continue to serve many users and applications. The picture quality obtained in a lm camera is much better than that in a digital camera.

Figure 14: Color Imaging Array Technology

20

MECG OE-1

Unit 1

21

The rise of technology has made lming the help of digital techniques easier as well as popular. Since the digtal copy can be posted in websites, photos can be sent to anyone in this world.

10
10.1

Open GL and Graphics Pipeline


Open GL

OpenGL stands for Open Graphics Library. It is an application programming interface (API) (An API is code that acts as an interface between dierent software programs and facilitates their interaction). Open GL is cross-language and multi-platform. It is used for rendering 2D and 3D computer graphics. Its designed to be implemented mostly in hardware.

10.2

Graphics Pipeline

Graphics pipeline or rendering pipeline refers to the sequence of steps used to create a 2D raster representation of a 3D scene. the graphics pipeline is the process of turning that 3D model into what the computer displays. 10.2.1 Stages of a Graphics Pipeline

1. 3D geometric primitives: First, the scene is created out of geometric primitives. Traditionally this is done using triangles, which are particularly well suited to this as they always exist on a single plane. 2. Modeling and transformation: Transform from the local coordinate system to the 3d world coordinate system. 3. Camera transformation: Transform the 3d world coordinate system into the 3d camera coordinate system, with the camera as the origin. 4. Lighting: Illuminate according to lighting and reectance. 5. Projection transformation: Transform the 3d world coordinates into the 2d view of the camera 6. Clipping: Geometric primitives that now fall completely outside of the viewing frustum will not be visible and are discarded at this stage. 7. Scan conversion or rasterization: Rasterization is the process by which the 2D image space representation of the scene is converted into raster format and the correct resulting pixel values are determined. 8. Texturing, fragment shading: At this stage of the pipeline individual fragments (or pre-pixels) are assigned a color based on values interpolated from the vertices during rasterization, from a texture in memory, or from a shader program.

21

MECG OE-1

Unit 1

22

Figure 15: Open GL pipeline

22

You might also like