Summary

These lecture notes cover Computer Graphics, a third-year course at Minia University in 2023. Topics include course outlines, content, and introduction to interactive and non-interactive graphics.

Full Transcript

Computer Graphics Third Year Students Dr. Rehab Emad El-Dein Sayed Mohamed FCI- Minia University 2023 Course Outline A Survey of Computer Graphics Overview of Graphics Systems Graphics Output Primitives Attributes of Graphics...

Computer Graphics Third Year Students Dr. Rehab Emad El-Dein Sayed Mohamed FCI- Minia University 2023 Course Outline A Survey of Computer Graphics Overview of Graphics Systems Graphics Output Primitives Attributes of Graphics Primitives Geometric Transformations Two-Dimensional Viewing Three-Dimensional Viewing Three-Dimensional Object Representations Visible-Surface Detection Methods Illumination Models and Surface-Rendering Methods CONTENTS What is Computer Graphics? What are Graphic Systems? Input-Output Devices. Introduction of Computer Graphics ▪ Computer Graphics involves technology to access. The Process transforms and presents information in a visual form. The role of computer graphics is insensible. In today’s life, computer graphics has now become a common element in user interfaces, T.V. commercial motion pictures. ▪ Computer Graphics is the creation of pictures with the help of a computer. ▪ The end product of computer graphics is a picture it may be a business graph, drawing, or engineering. ▪ In computer graphics, 2 or 3-D pictures can be created that are used for research. Many hardware device algorithms have been developed to improve the speed of picture generation with the passing of time. ▪ Used in diverse fields to represent data. ▪ Scientific researches, engineering applications, medicine, business, industry, government, art, entertainment, advertising, education, and other fields make use of computer graphics. ▪ It enhances the communication between computers and users. Introduction of Computer Graphics ▪ Definition of Computer Graphics: ✓ It is the use of computers to create and manipulate pictures on a display device. It comprises software techniques to create, store, modify, and represent pictures. ✓ generating 2D images of a 3D world represented in a computer. ▪ Why Computer graphics used? ✓ Suppose a shoe manufacturing company wants to show the sale of shoes for five years. For this vast amount of information is to store. So a lot of time and memory will be needed. This method will be tough to understand by a common man. ✓ In this situation, graphics is a better alternative. Graphics tools are charts and graphs. Using graphs, data can be represented in pictorial form. A picture can be understood easily just with a single look. ✓ Interactive computer graphics work using the concept of two-way communication between computer users. The computer will receive signals from the input device, and the picture is modified accordingly. The picture will be changed quickly when we apply the command. ▪ Computer graphics deals with all aspects of creating images with a computer ✓ Hardware ✓ Software ✓ Applications Introduction of Computer Graphics ▪ Main Tasks: ✓ Modeling: (shape) creating and representing the geometry of objects in the 3D world ✓ Rendering: (light, perspective) generating 2D images of the objects ✓ Animation: (movement) describing how objects change in time Applications of Computer Graphics The Applications of Computer Graphics can be divided into 4 Major Areas: 1. Display of Information 2. Design 3. Simulation and Animation 4. User Interfaces (GUI) Applications of Computer Graphics DISPLAY OF INFORMATION: EDUCATION AND LEARNING Applications of Computer Graphics DISPLAY OF INFORMATION: VISUALISATION & 3D RECONSTRUCTION (Medical Domain) Applications of Computer Graphics DESIGN (CAD) Applications of Computer Graphics DESIGN (CAD) Applications of Computer Graphics SIMULATION & ANIMATION: VIRTUAL REALITY Applications of Computer Graphics SIMULATION & ANIMATION: ANIMATION Applications of Computer Graphics SIMULATION & ANIMATION: GAMES Applications of Computer Graphics 1. Education and Training Computer-generated model of the physical, financial, and economic system is often used as educational aids. Model of physical systems, physiological systems, population trends, or equipment can help trainees to understand the operation of the system. For some training applications, particular systems are designed. For example Flight Simulator. Flight Simulator: It helps in giving training to the pilots of airplanes. These pilots spend much of their training not in a real aircraft but on the ground at the controls of a Flight Simulator. 2. Use in Biology: Molecular biologist can display a picture of molecules and gain insight into their structure with the help of computer graphics. 3. Computer-Generated Maps: Town planners and transportation engineers can use computer-generated maps that display data useful to them in their planning work. 4. Architect: The architect can explore an alternative solution to design problems at an interactive graphics terminal. In this way, they can test many more solutions that would not be possible without the computer. 5. Presentation Graphics: Examples of presentation Graphics are bar charts, line graphs, pie charts, and other displays showing relationships between multiple parameters. Presentation Graphics is commonly used to summarize. Application of Computer Graphics 6. Computer Art: Computer Graphics are also used in the field of commercial arts. It is used to generate television and advertising commercial. 7. Entertainment: Computer Graphics are now commonly used in making motion pictures, music videos, and television shows. 8. Visualization: It is used for visualization of scientists, engineers, medical personnel, business analysts for the study of a large amount of information. 9. Educational Software: Computer Graphics is used in the development of educational software for making computer-aided instruction. 10. Printing Technology: Computer Graphics is used for printing technology and textile design. Applications of Computer Graphics IMAGE PROCESSING ▪ Some computer graphics operations involve manipulating 2D images (bitmaps) ▪ Image processing applies directly to the pixel grid and includes operations such as color correction, scaling, blurring, sharpening, etc. ▪ Common examples include digital photo processing and digital ‘painting’ programs (Adobe Photoshop…) Application of Computer Graphics IMAGE SYNTHESIS ▪ Image synthesis or image generation refers more to the construction of images from scratch, rather than the processing of existing images ▪ Synthesis of a 2D image from a 3D scene description is more commonly called rendering Application of Computer Graphics MODELING Application of Computer Graphics VISUAL REALISM Example of Computer Graphics Packages ▪ LOGO ▪ COREL DRAW ▪ AUTO CAD ▪ 3D STUDIO ▪ CORE ▪ GKS (Graphics Kernel System) ▪ PHIGS ▪ CAM (Computer Graphics Metafile) ▪ CGI (Computer Graphics Interface) Interactive and Passive Graphics A. Non-Interactive or Passive Computer Graphics: ✓ In non-interactive computer graphics, the picture is produced on the monitor, and the user does not have any control over the image, i.e., the user cannot make any change in the rendered image. ✓ One example of its Titles shown on TV. ✓ Non-interactive Graphics involve only one-way communication between the computer and the user, The User can see the produced image, and he cannot make any changes in the image. B. Interactive Computer Graphics: ✓ In interactive Computer Graphics user has some controls over the picture, i.e., the user can make any change in the produced image. ✓ One example of it is the ping-pong game. ✓ Interactive Computer Graphics requires two-way communication between the computer and the user. A User can see the image and make any change by sending his command with an input device. Interactive Graphics Advantages: 1. Higher Quality 2. More precise results or products 3. Greater Productivity 4. Lower analysis and design cost 5. Significantly enhances our ability to understand data and to perceive trends. Working of Interactive Computer Graphics The modern Graphics Display is very simple in construction. It consists of three components: 1. Frame Buffer or Digital Memory 2. A Monitor like a home T.V. set without the tuning and receiving electronics. 3. Display Controller or Video Controller: It passes the contents of the frame buffer to the monitor. Frame Buffer: A digital frame buffer is a large, contiguous piece of computer memory used to hold or map the image displayed on the screen. Frame Buffer ▪ Stores per-pixel information o Depth of a frame buffer: number of bits per pixel o E.g. for color representation, 1 bit => 2 colors, 8 bits => 256 colors, 24 bits => true color (16 million colors) ▪ At a minimum, there is 1 memory bit for each pixel in the raster. This amount of memory is called a bit plane. ▪ A 1024 x 1024 element requires 220 (210=1024;220=1024 x 1024)sq.raster or 1,048,576 memory bits in a single bit plane. ▪ The picture is built up in the frame buffer one bit at a time. ▪ ∵ A memory bit has only two states (binary 0 or 1), a single-bit plane yields a black and white (monochrome display). ▪ As frame buffer is a digital device write raster CRT is an analog device. OVERVIEW OF A GRAPHICS SYSTEM ▪ A Computer Graphics System is a computer system that must have all the components of a general-purpose computer system. Considering the high-level view of a graphics system ▪ There are six major elements in the Graphics system: 1. Input devices 2. Central Processing Unit 3. Graphics Processing Unit 4. Memory 5. Frame buffer 6. Output devices Add a titleOF A GRAPHICS SYSTEM OVERVIEW Loaded: 13.94% Display Processor [GPU]: ▪ It is an interpreter or piece of hardware that converts display processor code into pictures. ▪ It is one of the four main parts of the display processor (GPU). Parts of the Display Processor [GPU]: 1. Display File Memory 2. Display Controller 3. Display Generator 4. Display Console Display File Memory: It is used for the generation of the picture. It is used for the identification of graphic entities. Display Controller: 1. It handles interrupt 2. It maintains timings 3. It is used for interpretation of instruction. Display Generator: 1. It is used for the generation of character. 2. It is used for the generation of curves. Display Console: It contains CRT, Light Pen, and Keyboard, and a deflection system [Graphics System]. Add a titleOF A GRAPHICS SYSTEM OVERVIEW The Raster Scan System ✓ is a combination of some processing units. ✓ It consists of the control processing unit (CPU) and a particular processor called a Display Controller. ✓ The Display Controller controls the operation of the display device. It is also called a Video Controller. ▪ Raster – scan display processor: Digitizes picture definition into a set of pixel values for storage in the frame buffer (scan conversion). ▪ Working: The video controller in the output circuitry generates the horizontal and vertical drive signals so that the monitor can sweep. It beams across the screen during raster scans. ▪ As Fig shows that, 2 registers (X register and Y register) are used to store the coordinates of the screen pixels. Assume that y values of the adjacent scan lines increased by 1 in an upward direction starting from 0 at the bottom of the screen to ymax at the top and along each scan line the screen pixel positions or x values are incremented by 1 from 0 at the leftmost position to xmax at the rightmost position. ▪ The origin is at the lowest left corner of the screen as in a standard Cartesian coordinate system. Raster-Scan Basics Raster-scan basics: The screen is a rectangular array of picture elements or pixels 1. Resolution: Use to describe the number of pixels that are used on the display image (determines the details you can see). 2. Aspect Ratio: It is the ratio of width to its height. Its measure is unit in length or number of pixels Aspect Ratio = 4. Aspect ratio, which is the horizontal size compared to the vertical size, e.g. 4:3 is the standard aspect ratio so that a screen with a width of 1024 pixels will have a height of 768 pixels. 5. The formula to calculate the video memory required at a given resolution and bit-depth is:- Size (in MB) = (Resolution in pixels) x (Color depth in bits) / 8 / 1024 / 1024 Memory (in MB) = (X-resolution * Y-resolution * Bit per pixel) / (8*1024*1024) 6. The number of pixels in an image, ✓ e.g., 1024×768, 1280×1024, 1366 × 768, etc. ✓ also in ppi or dpi – pixel or dot per inch Raster-Scan Basics Resolution Number of Pixels Aspect Ratio 320*200 64000 8:5 640*480 307200 4:3 800*600 480000 4:3 1024*768 786432 4:3 1280*1024 1310720 5:4 1600*1200 1920000 4:3 Table 1: Common Resolution, respective Number of Pixels, and standard Aspect Ratios. Examples For a 1920x800 image with a color depth of 24 bits (8 bits per channel), the size would be approximately: ▪ Size (in MB) = (1920 x 800) x 24 / 8 / 1024 / 1024 = 4.61 MB ▪ Note: The actual size may vary depending on the compression used, and the formula assumes that there is no compression applied to the image. Consider three different raster systems with resolutions of 640 x 480, 1280 x 1024, and 2560 x 2048. What size frame buffer (in bytes) is needed for each of these systems to store 12 bits per pixel? How much storage is required for each system if 24 bits per pixel are to be stored? Solution: ▪ Because eight bits constitute a byte, frame-buffer sizes of the systems are as follows: ▪ 640 x 480 x 12 bits / 8 = 450KB; ▪ 1280 x 1024 x 12 bits / 8 = 1920KB; ▪ 2560 x 2048 x 12 bits / 8 = 7680KB; ▪ The storage is required for each system if 24 bits per pixel are to be stored Similarly, each of the above results is just doubled for 24 (12×2) bits of storage per pixel. How much time is spent scanning across each row of pixels during screen refresh on a raster system with a resolution of 1280 X 1024 and a refresh rate of 60 frames per second? Solution: ▪ Here, resolution = 1280 X 1024 ▪ That means the system contains 1024 scan lines and each scan line contains 128 pixels refresh rate = 60 frame/sec. ▪ So, 1 frame takes = 1/60 sec. Since resolution = 1280 X 1024 ▪ 1 frame buffer consists of 1024 scan lines ▪ It means that 1024 scan lines take 1/60 sec Therefore, 1 scan line takes = 1 / 60 X 1024 ▪ Sec = 0.058 sec Display Devices Display Devices: ▪ The most commonly used display device is a Video Monitor. ▪ The operation of most video monitors is based on CRT (Cathode Ray Tube). The following display devices are used: ▪ Refresh Cathode Ray Tube ▪ Random Scan and Raster Scan ▪ Color CRT Monitors ▪ Direct View Storage Tubes ▪ Flat Panel Display ▪ Lookup Table Cathode Ray Tube Cathode Ray Tube Cathode Ray Tube (CRT): ▪ CRT stands for Cathode Ray Tube. ▪ CRT is a technology used in traditional computer monitors and televisions. ▪ The image on the CRT display is created by firing electrons from the back of the tube of phosphorus located towards the front of the screen. ▪ Once the electron heats the phosphorus, they light up, and they are projected on a screen. ▪ The color you view on the screen is produced by a blend of red, blue, and green light. Main Components of CRT are: 1. Electron Gun: Electron gun consists of a series of elements, primarily a heating filament (heater) and a cathode. The electron gun creates a source of electrons which are focused into a narrow beam directed at the face of the CRT. 2. Control Electrode: It is used to turn the electron beam on and off. 3. Focusing system: It is used to create a clear picture by focusing the electrons into a narrow beam. 4. Deflection Yoke: It is used to control the direction of the electron beam. It creates an electric or magnetic field that will bend the electron beam as it passes through the area. In a conventional CRT, the yoke is linked to a sweep or scan generator. The deflection yoke which is connected to the sweep generator creates a fluctuating electric or magnetic potential. 5. Phosphorus-coated screen: The inside front surface of every CRT is coated with phosphors. Phosphors glow when a high-energy electron beam hits them. Phosphorescence is the term used to characterize the light given off by a phosphor after it has been exposed to an electron beam. Cathode Ray Tube CRT basics: ▪ The screen output [image] is stored in the frame buffer and is converted into voltages across the deflection plates via a digital-to-analog converter (DAG) ▪ Light is emitted when electrons hit the phosphor. ✓ But light output from the phosphor decays exponentially with time, typically in 10 – 60 microseconds. ✓ Thus the screen needs to be redrawn or refreshed. ✓ Refresh Rate is typically 60 Hz (60 frames per second [FPS]) to avoid flicker (“twinkling”). ✓ Flicker: when the eye can no longer integrate individual light pulses from a point on the screen, e.g., due to a low refresh rate. ✓ Refresh Rate: The number of times a display is illuminated in a second. Power consumption, measured in watts (W). ✓ Persistence: Persistence is the duration of phosphorescence. Different kinds of phosphors are available for use in CRT. Besides color, a major difference between phosphor in their persistence how they continue to emit light after the electron beam is removed. Random Scan and Raster Scan Display 1. Random Scan Display [Vector Scan Display]: ▪ The picture is “painted” on the screen one scan line at a time. ▪ Random Scan System uses an electron beam which operates like a pencil to create a line image on the CRT screen. ▪ The picture is constructed out of a sequence of straight-line segments. ▪ Each line segment is drawn on the screen by directing the beam to move from one point on the screen to the next, where its x & y coordinates define each point. ▪ After drawing the picture. The system cycles back to the first line and design all the lines of the image 30 to 60 time each second. ▪ The process is shown in fig: Random Scan and Raster Scan Display 2. Raster Scan Display: ▪ A Raster Scan Display is based on intensity control of pixels in the form of a rectangular box called Raster on the screen. ▪ Information of on and off pixels is stored in refresh buffer or Frame buffer. ▪ Televisions in our house are based on the Raster Scan Method. ▪ The raster scan system can store information of each pixel position, so it is suitable for the realistic display of objects. ▪ Raster Scan provides a refresh rate of 60 to 80 frames per second. ▪ Frame Buffer is also known as Raster or bit map. In Frame Buffer the positions are called picture elements or pixels. ▪ Beam refreshing is of two types: First is horizontal retracing and second is vertical retracing. ▪ When the beam starts from the top left corner and reaches the bottom right scale, it will again return to the top left side called at vertical retrace. Then it will again more horizontally from top to bottom call as horizontal retracing shown in fig: Random Scan and Raster Scan Display Difference between Random and Raster Scan Display: Add aScan Random titleand Raster Scan Display Types of Scanning or traveling of the beam in Raster Scan: 1. Interlaced Scanning ▪ This problem can be solved by Interlaced scanning. In this first of all odd numbered lines are traced or visited by an electron beam, and then in the next circle, the even number of lines are located. ▪ In an interlaced monitor, the electron beam takes two passes to form a complete image: it skips every other row on the first pass, and then goes back and fills in the missing rows. ▪ For interlaced display refresh rate of 60 frames per second is used. 2. Non-Interlaced Scanning ▪ A non-interlaced monitor does the whole job in one pass, tracing each row consecutively. ▪ Due to which fading of display of object may occur. ▪ In non-interlaced scanning, each horizontal line of the screen is traced from top to bottom. ▪ For non-interlaced display refresh rate of 30 frames per second is used. But it gives flickers. Advantages: 1. Realistic image 2. Million Different colors to be generated 3. Shadow Scenes are possible. Disadvantages: 1. Low Resolution 2. Expensive Random Scan and Raster Scan Display 2. Raster Scan Display: Raster-Scan Pattern ▪ Horizontal scan rate: # scan lines per second ▪ Interlaced (TV) vs. non-interlaced displays Random Scan and Raster Scan Display S.NO Interlaced Scan Non-Interlaced Scan In interlaced scan, scanning takes place over dividing While in Non-Interlaced scan, scanning takes 1. one frame. place by scanning all frames promptly. Interlaced scan is less efficient than Non-Interlaced While Non-Interlaced scan is more efficient 2. scan. than interlaced scan. In interlaced scan, the displaying video speed is lesser While in a Non-Interlaced scan, the displaying 3. than Non-Interlaced scan. video speed is quicker than interlaced scan. While there is not present combing effect in 4. There is present the combing effect in interlaced scan. Non-Interlaced scan. While in Non-Interlaced scan, the video 5. In interlaced scan, the video quality is vulgarized. quality is superior than the interlaced scan. Interlaced scan is less promoted than Non-Interlaced While Non-Interlaced scan is more promoted 6. scan. than interlaced scan. Color CRT Monitors Color CRT Monitors: The CRT Monitor displays by using a combination of phosphors. The phosphors are different colors. There are two popular approaches for producing color displays with a CRT are: 1. Beam Penetration Method 2. Shadow-Mask Method Beam Penetration Method: ▪ The Beam-Penetration method has been used with Random-Scan Monitors. ▪ In this method, the CRT screen is coated with two layers of phosphor, red and green and the displayed color depends on how far the electron beam penetrates the phosphor layers. ▪ This method produces four colors only, red, green, orange, and yellow. ▪ A beam of slow electrons excites the outer red layer only; hence screen shows a red color only. ▪ A beam of high-speed electrons excites the inner green layer, Thus screen shows a green color. Advantages: 1. Inexpensive Disadvantages: 1. Only four colors are possible 2. Quality of pictures is not as good as with another method. Color CRT Monitors 2. Shadow-Mask Method: ▪ The Shadow Mask Method is commonly used in the Raster-Scan System because it produces a much wider range of colors than the beam-penetration method. ▪ It is used in the majority of color TV sets and monitors. Construction: A shadow mask CRT has 3 phosphor color dots at each pixel position. ▪ One phosphor dot emits: red light ▪ Another emits: green light ▪ Third emits: blue light ▪ This type of CRT has 3 electron guns, one for each color dot, and a shadow mask grid just behind the phosphor coated screen. ▪ Shadow mask grid is pierced with small round holes in a triangular pattern. ▪ Figure shows the delta-delta shadow mask method commonly used in color CRT system. Color CRT Monitors 2. Shadow-Mask Method: ▪ Working: Triad arrangement of red, green, and blue guns. ▪ The deflection system of the CRT operates on all 3 electron beams simultaneously; the 3 electron beams are deflected and focused as a group onto the shadow mask, which contains a sequence of holes aligned with the phosphor- dot patterns. ▪ When the three beams pass through a hole in the shadow mask, they activate a dotted triangle, which occurs as a small color spot on the screen. ▪ The phosphor dots in the triangles are organized so that each electron beam can activate only its corresponding color dot when it passes through the shadow mask. ▪ Inline arrangement: Another configuration for the 3 electron guns is an Inline arrangement in which the 3 electron guns and the corresponding red-green-blue color dots on the screen, are aligned along one scan line rather of in a triangular pattern. ▪ This inline arrangement of electron guns in easier to keep in alignment and is commonly used in high-resolution color CRT’s. Advantage: 1. Realistic image 2. Million different colors to be generated 3. Shadow scenes are possible Disadvantage: 1. Relatively expensive compared with the monochrome CRT. 2. Relatively poor resolution 3. Convergence Problem Flat-Panel Display The Flat-Panel display refers to a class of video devices that have reduced volume, weight, and power requirements compared to CRT. Example: Small T.V. monitor, calculator, pocket video games, laptop computers, an advertisement board in the elevator. 1. Emissive Display: The emissive displays are devices that convert electrical energy into light. Examples are Plasma Panel, thin film electroluminescent display and LED (Light Emitting Diodes). 2. Non-Emissive Display: The Non-Emissive displays use optical effects to convert sunlight or light from some other source into graphics patterns. Examples are LCD (Liquid Crystal Device). Flat-Panel Display LED (Light Emitting Diode): In an LED, a matrix of diodes is organized to form the pixel positions in the display, and picture definition is stored in a refresh buffer. Data is read from the refresh buffer and converted to voltage levels that are applied to the diodes to produce the light pattern in the display. LCD (Liquid Crystal Display): Liquid Crystal Displays are devices that produce a picture by passing polarized light from the surroundings or from an internal light source through a liquid-crystal material that transmits the light. Computer Graphics Software COMPUTER GRAPHICS SOFTWARE Two broad categories: ▪ Special purpose packages (e.g. CAD systems and painting programs) Photoshop, PowerPoint, AutoCAD, StudioMax, Maya, Blender, PovRay,… ▪ General programming packages (e.g. Graphics Library (GL), OpenGL, Virtual Reality Modeling Language (VRML), Java2D, Java3D ▪ Computer Graphics Application Programming Interface (CG API) Computer Graphics Software 2.1 COORDINATE REPRESENTATIONS ▪ General graphics packages require geometric descriptions to be specified in a standard, right handed, Cartesian-coordinate reference frame Computer Graphics Software Computer Graphics Software Summary Example of Computer Graphics Packages Basic terms related to display devices Basic terms related to display devices: ▪ Pixel: A pixel is defined as the smallest size object or color spot that can be displayed and addressed on a monitor. Pixels are normally arranged in a regular 2-dimensional grid, and are often represented using dots or squares. ▪ Resolution: There are two types: 1) Image Resolution: It refers to pixel spacing. In a normal PC monitor it ranges between 25 to 80 pixels per inch. 2) Screen Resolution: It is the number of distinct pixels in each dimension that can be displayed. ▪ Dot: The internal surface of the coated monitor screen is arranged into millions of tiny cells (red, green, blue) called Dots. ▪ Dot pitch: It is the distance between any two dots of the same color. It is the measure of screen resolution. The smaller the dot pitch, the higher will be the resolution, sharpness, and detail. ✓ Note: If the image resolution is more compared to the inherent resolution, then the displayed image quality gets reduced. ▪ Aspect ratio: It is the ratio of the number of X pixels to the Y pixels. The standard aspect ratio for PCs is 4:3 and 5:4. ✓ Note: The 5:4 aspect ratio distorts the image a bit. Basic terms related to display devices Bit Planes, Colour Depth and Colour Palette ▪ The appearance and colour of a pixel of an image is the result of the interaction of three primary colours. ▪ When the intensity of all the 3 electron beams is high it results in a white pixel. ▪ When the intensity of all the 3 electron beams is low it results in a black pixel. ▪ When the intensity of all the 3 electron beams is in any other combination it results in an intermediate-coloured pixel. ▪ Colour Depth: The number of memory bits required to store colour information(intensity value for all three primary colour components) about a pixel is called colour depth or bit depth. Corresponding to the intensity value 0 or 1, the pixel can be black or white. ▪ Bit plane or bitmap: The block of memory which stores bi-level intensity values for each pixel of a full-screen pure black and white image is called a bit map or bit-plane. NOTE: ▪ Colour or grey levels can be achieved using additional bit planes. Hence n-bits per pixel means colour depth=n and it is a collection of n- bit planes allowing 2^n colours at every pixel. Basic terms related to display devices Figure: For color depth=n, n number of bit planes are used, and each bit plane contributes to the gray shade of pixel. Add a titleOF A GRAPHICS SYSTEM OVERVIEW ▪ Virtually all modern graphics systems are raster-based. ▪ The image we see on the output device is an array—the raster—of picture elements, or pixels, produced by the graphics system. ▪ An image that is presented on the computer screen is made up of pixels. ▪ The screen consists of a rectangular grid of pixels, arranged in rows and columns. ▪ The pixels are small enough that they are not easy to see individually. ▪ At a given time, each pixel can show only one color. ▪ Most screens these days use 24-bit color, where a color can be specified by three 8-bit numbers, giving the levels of red, green, and blue in the color. ▪ Any color that can be shown on the screen is made up of some combination of these three “primary” colors. ▪ Other formats are possible, such as grayscale, where each pixel is some shade of gray and the pixel color is given by one number that specifies the level of gray on a black-to-white scale. Typically, 256 shades of gray are used. Early computer screens used indexed color, where only a small set of colors, usually 16 or 256, could be displayed. ▪ The color values for all the pixels on the screen are stored in a large block of memory known as a frame buffer. ▪ Changing the image on the screen requires changing color values that are stored in the frame buffer. ▪ The screen is redrawn many times per second, so that almost immediately after the color values are changed in the frame buffer, the colors of the pixels on the screen will be changed to match, and the displayed image will change. ▪ Its resolution—the number of pixels in the frame buffer—determines the detail that you can see in the image. ▪ The depth, or precision, of the frame buffer, defined as the number of bits that are used for each pixel, determines properties such as how many colors can be represented on a given system. ▪ For example, a 1-bit-deep frame buffer allows only two colors, whereas an 8-bit-deep frame buffer allows 28 (256) colors. ▪ In full-color systems, there are 24 (or more) bits per pixel. ▪ Such systems can display sufficient colors to represent most images realistically. They are also called true-color systems, or RGB-color systems because individual groups of bits in each pixel are assigned to each of the three primary colors—red, green, and blue—used in most displays. ▪ High dynamic range (HDR) systems use 12 or more bits for each color component. Until recently, frame buffers stored colors in integer formats. ▪ Recent frame buffers use floating point and thus support HDR colors more easily. OVERVIEW OF A GRAPHICS SYSTEM ▪ At the start of a Refresh Cycle: ▪ X register is set to 0 and y register is set to ymax. This (x, y') address is translated into a memory address of frame buffer where the color value for this pixel position is stored. ▪ The controller receives this color value (a binary no) from the frame buffer, breaks it up into three parts and sends each element to a separate Digital-to-Analog Converter (DAC). ▪ These voltages, in turn, controls the intensity of 3 e-beam that are focused at the (x, y) screen position by the horizontal and vertical drive signals. ▪ This process is repeated for each pixel along the top scan line, each time incrementing the X register by Y. ▪ As pixels on the first scan line are generated, the X register is incremented through xmax. ▪ Then x register is reset to 0, and y register is decremented by 1 to access the next scan line. ▪ Pixel along each scan line is then processed, and the procedure is repeated for each successive scan line units pixels on the last scan line (y=0) are generated. ▪ For a display system employing a color look-up table frame buffer value is not directly used to control the CRT beam intensity. ▪ It is used as an index to find the three pixel-color value from the look-up table. This lookup operation is done for each pixel on every display cycle. OVERVIEW OF A GRAPHICS SYSTEM ▪ As the time available to display or refresh a single pixel in the screen is too little, accessing the frame buffer every time for reading each pixel intensity value would consume more time than what is allowed: ▪ Multiple adjacent pixel values are fetched to the frame buffer in a single access and stored in the register. ▪ After every allowable time gap, the one-pixel value is shifted out from the register to control the warm intensity for that pixel. ▪ The procedure is repeated with the next block of pixels, and so on, thus the whole group of pixels will be processed. Thank you

Use Quizgecko on...
Browser
Browser