Computer Graphics (CS). Handouts (pdf) / Powerpoint Slides (PPTs). Handouts / Power Point Slides. Lessons () (pdf format) · Power Point Slides ( Computer Graphics (CS). VU. © Copyright Virtual 1. Computer Graphics. CS Virtual University of Pakistan. Knowledge beyond the boundaries. CS Computer Graphics Handouts download in PDF format for Free. VU ( Virtual University of Pakistan. Computer Graphics (CS).

Cs602 Handouts Pdf

Language:English, Portuguese, Hindi
Genre:Science & Research
Published (Last):20.03.2016
ePub File Size:15.37 MB
PDF File Size:13.71 MB
Distribution:Free* [*Sign up for free]
Uploaded by: GAYE

CS Computer Graphics PDF Handouts Virtual University - Ebook download as PDF File .pdf), Text File .txt) or read book online. Programming Book. Computer Graphics - CS VU Video Lectures, Handouts, Power Point Slides, Solved Assignments, Solved Quizzes, Past Papers and Recommended Books. Download VU Computer Graphics - CS VU Lecture Handouts. Computer Graphics - CS tailamephyli.tk VUTube. Administrator. Quote post.

In interlaced display beam completes scanning in two passes. Random-scan can refresh the screen in any fashion by repeating line drawing mechanism. Interlacing provides effect of double refresh rate by completing half of the lines in half of the time. Similarly after completing all lines in horizontal fashion it again reaches the top left corner to start redrawing the image that is for refreshing and this is called vertical retrace.

In these systems image consists of a set of line drawing commands referred to as Refresh Display File. The frame buffer stores information in a two dimensional matrix.

Now with the information in frame buffer. The lines drawn in vector displays are smoother whereas in raster-scan lines often become jagged. With the combination of phosphor a range of colours can be displayed. In colour pictures obviously multiple bits are required for each pixel position depending on the possible number of colours for example to show colours 8 bits will be required for each pixel and in case if multiple bits are used for one pixel frame buffer will be referred as pixmap.

Random-scan displays draw a picture one line at a time and are also called vector displays or stroke-writing or calligraphic displays. When a small set of lines is to be displayed. In one pass only odd lines are drawn and in the second pass even lines are drawn. Random-scan displays are designed for line-drawing applications and cannot display complex pictures. There are two further methods to scan the image: High-quality vector systems are capable of handling approximately They are: By varying intensity at each dot a wide range of colours can be generated.

Three phosphor dots have different colors i. Beam penetration is an inexpensive way to produce colours as only a few colours are possible and the quality of picture is also not impressive. At intermediate beam speeds. Two electron guns are used in this system as shown in the following figure.

Shadow mask methods can display a wide range of colours. Three guns are used to throw beam at the three dots of the same pixel. In this technique each pixel position is made up of three phosphor dots called triads as shown in the following figure. A shadow-mask is used which has holes aligned with the dots so that each gun can fire beam to corresponding dot only. A series of vertical conducting ribbons is placed on one glass panel. Picture definition is stored in a refresh buffer.

Plasma panels. There are two categories of flat panel displays: The erasing and redrawing process can take several seconds for a complex picture. Firing voltages applied to a pair of horizontal and vertical conductors cause the gas at the intersection of the two conductors to break down into glowing plasma of electrons and ions. The flat-panel displays have following properties: Plasma-panel Displays Plasma panels also called gas-discharge displays are constructed by filling the region between two glass plates with a mixture of gases that usually includes neon.

Non-emissive displays non-emitters use optical effects to convert sunlight or light from some other source into graphics patterns. To eliminate a picture section. The most important example of a non-emissive flat-panel display is a liquid-crystal device. Flat panel displays use nematic liquid crystal. Two glass plates. The light is then reflected back to the viewer. The intersection of two conductors defines a pixel position. To turn off the pixel. Rows of horizontal transparent conductors are built into one glass plate.

Polarized light passing through the material is twisted so that it will pass through the opposite polarizer. Various types of devices allow users to sense and manipulate virtual objects much as they would real objects. The HMD contains a position tracker to monitor the location of the user's head and the direction in which the user is looking.

These vibrations are synchronized with the display of an object on a CRT so that each point on the object is reflected from the mirror into spatial position corresponding to the distance of that point from a specified viewing position. This natural style of interaction gives participants the feeling of being immersed in the simulated world.

These devices also record and send the speech and movements of the participants to the simulation program. Virtual reality simulations differ from other computer simulations in that they require special interface devices that transmit the sights.

In this system when varifocal mirror vibrates it changes focal length. This allows user to walk around an object or scene and view it from different sides.

Using this information. Users hear sounds in the virtual world through earphones in the HMD. The hepatic interface. To see in the virtual world. Virtual Reality Devices Virtual reality system enables users to move and react in a computer-simulated environment. Similarly given below is a figure using a headset and a data glove worn on the right hand? Here the frame buffer can be anywhere in the system memory.

A fixed area of the system memory is reserved for the frame buffer. Architecture of a simple raster graphics system In addition to the video controller more sophisticated raster systems employ other processors as coprocessors and accelerators to implement various graphics operations. Frame-buffer locations. Organization of a simple raster system is shown in following figure.

In addition to the CPU. Video Controller Following figure shows a commonly used organization for raster systems. In the following figure the basic refresh operations of the video controller are diagrammed.

To speed up pixel processing. Then the x register is incremented by 1. The cycle time is too large making the process very slow.

The value stored in the frame buffer for this pixel position is then retrieved and used to set the intensity of the CRT beam. Two registers are used to store the coordinates of the screen pixels.

Pixels along this scan line are then processed in turn. This procedure is repeated for each pixel along the next line by resetting x register to 0 and decrementing the y register by 1. This digitization process is called scan conversion. Characters can be defined with rectangular grids. Scan converting a straight-line segment. The purpose of the display processor is to free the CPU from the graphics chores.

A character grid is displayed by superimposing the rectangular grid pattern into the frame buffer at a specified coordinate position. Similar methods are used for scan converting curved lines and polygon outlines.

Raster Scan Display Processor Following figure shows one way to setup the organization of a raster system containing a separate display processor. A major task of the display processor is digitizing a picture definition given in an application program into a set of pixel-intensity values for storage in the frame buffer. In addition to the system memory. With characters that are defined as curve outlines. The array size for character grids can vary from about 5 by 7 to 9 by 12 or more for higherquality displays.

When that group of pixels has been processed.

A video display adapter is simply referred as a video card. The display processor cycles through each command in the display file program once during every refresh cycle.

This display file is then accessed by the display processor to refresh the screen. An application program is input and stored in the system memory along with a graphics package. Architecture of a simple random scan system Graphics Card or Display Adapters A video card is typically an adapter. Sometimes the display processor in a random scan system is referred to as a display processing unit or graphics controller.

A video display adapter which is the special printed circuit board that plugs into one of the several expansion slots present on the mother board of the computer. Graphics commands in the application program are translated by the graphics package into a display file stored in the system memory. The video card can also be an integral part of the system board. Color Graphics Adapter This adapter can display text as well as graphics. In text mode it operates in 25 rows by 80 column mode with 16 colors.

Having graphics capabilities the Hercules card became somewhat of a standard for monochrome systems. A serious limitation of the EGA card is that it supports write operations to most of its internal registers. Originally this drawback only prevented the users from playing video games.

Flicker is the annoying tendency of the text to flash as it moves up or down. In graphics mode two resolutions are available: Hercules Adapter The Hercules card emulates the monochrome adapter but also operates in a graphics mode. Snow is the flurry of bright dots that can appear anywhere on the screen. The result is it is not possible for software to detect and preserve the state of the adapter.

MA is no longer suitable. The EGA card has several internal registers. This adapter can display only text in single color and has no graphics displaying capability.

In addition to the text and graphics modes of the CGA. The XGA has a graphics processor bus mastering. The XGA offers 2 new modes: In essence. It is a processor like the CPU. These cards have different capabilities. Unlike display adapters discussed earlier SVGA does not refer to a card that meets a particular specification but to a group of cards that have different capabilities. Since each SVGA card has different capabilities.

MCGA has two new graphics modes: However it is especially designed to control screen images. Being a bus master adapter means that the XGA can take control of the system as though it were the mother board.

This RAM is also called the frame buffer. The PC works with digital data which are sent to the graphics adapter. Which type of RAM? This is significant for card speed.

This was a RAM type. The CPU sends its data to the video card. Video card RAM is necessary to keep the entire screen image in memory. Today video cards hold plenty of RAM. In principle. The video processor forms a picture of the screen image and stores it in the frame buffer. This picture is a large bit map. A newer version of this is found in Intel chip set and the better VRAM is already capable of reading and writing simultaneously due to the dual port design. VRAM has two gates which can be active at the same time.

The smart feature is that the double cell allows the video processor to simultaneously read old and write new data on the same RAM address. CRT monitors work on analog signals. VRAM Briefly. But sharing the memory was very slow and the standards never became very popular. VRAM also costs twice as much. It is used to continually update the screen image.

Before these signals are sent to the monitor they have to be converted into analog output and this is processed in the RAMDAC: How much RAM? That is significant for color depth at the highest resolutions. As each screen image was a large bit map.

This saves the CPU a lot of work in creating screen images. The CPU can. Windows and with that the CPU need not calculate and design the entire bit map from image to image. A screen image in x in 16 bit color is a 1. Each image change with a refresh rate of 75 HZ there is 75 of them each second requires the movement of 1. The graphic interfaces. With accelerated video chips. In the early nineties. The CPU had to make all necessary calculations to create the screen image.

The transfer took place through the ISA bus. Windows and other image elements. That marked the end of the "flat" VGA cards. That is calculated as x x 2 bytes.

You can try to calculate the required amount of data. That zaps the PC energy. The PC became incredibly slow. They received signals and data from the CPU and forwarded them to the screen.

The video card is programmed to draw lines. The video chip set carries the heavy load: Accelerator Cards In the early nineties the accelerator video cards appeared. The calculation goes like this: These tools are under use of movie makers. Graphics Software There is a lot of 2D and 3D software available in the market. Famous manufacturers include SIS. These tools are flash. The following libraries are commonly used among developers: If you for example want to see a game in a resolution of x at 80 Hz.

Graphics Libraries Graphics developers some time use 2D or 3D libraries to create graphics rapidly and efficiently. These developers include game developers. INTEL etc. Hardware manufacturers give support in hardware for libraries. The amount of memory required representing a character on screen in text mode and a pixel in graphics mode varies from mode to mode.

Modes consist of their own refresh rate. Video cards support both different text and graphics modes. On the other hand.

As seen earlier. Since each mode uses a particular resolution. The smallest dot illuminated that can be seen on screen. Higher resolution means a sharper. Mode No. In general. Composition of pixels makes picture that forms on whole screen Resolution We know that Graphics images on the screen are built up from tiny dots called picture elements or pixels.

Some modes display only text and some are made only for graphics. The display resolution is defined by the number of rows from top to bottom. For example mode 19 uses a resolution of scan lines. Video cards are responsible to send picture data to monitor each time it refresh itself.

This feature makes it easy for custom character set to be loaded. The big advantage of this method is that you design characters of desired style.

Since VGA has higher resolution. The graphics modes can only store information bit by bit. Each character set can contain characters. Either one or two character sets may be active giving these adapters on the screen simultaneously. The attribute byte controls the color of the character. This larger format of MA makes the characters generated by MA much sharper and hence easier to read. How text displays As seen previously text modes need two bytes in VDU memory to represent one character on screen.

When two character sets are active. The attribute byte contains three components: Since this bit can take only two values. The attribute byte controls the color in which the character is being displayed.

The graphics modes can also display characters. Text mode colors In mode 3. The next slide shows the breakup of the attribute byte. The CGA has a character generator that uses 8 scan lines and 8 pixels in each of these scan lines to produce a character on screen. A set of BIOS services is available for easy loading of character sets.

Each character in the standard character set provided with the EGA is 8 pixels wide and 14 pixels tall. There are lots of ways that you can write pixel on screen. You can write pixel on screen by using one of the following methods: Using video bios services to write pixel Accessing memory and registers directly to write pixel on screen. Each pixel is simply one color or another. But we will only discuss here colors in VGA. Setting desired video mode Using bios service to set color of a screen pixel Calling bios interrupt to execute the process of writing pixel.

In the graphics mode each pixel on the screen has a color associated with it. Setting color in graphics modes is quite different. VGA has 4 color planes — red.

Here we will discuss all these ways practically and see how the pixel is displayed on screen. For that we will have to write code in Assembly and C languages. The number of colors that each adapter can support and the way each adapter generates these colors is drastically different. Source code Below are the three lines written in assembly language that can set graphics mode 19 13h. There are important differences here as compared to setting color in text mode. Using library functions to write pixel on screen Practical approach to write pixel on screen As we have discussed three ways to write pixel on screen.

Color will be selected from default palette setting against the number you have used. Line 3: Here we will draw pixel by accessing direct pointer to the video memory and write color value. The following steps are involved to write direct pixel without using BIOS: Set video mode by using video BIOS routine as discussed earlier Set any pointer to the video graphics memory address 0x0A You can assign any color number from 0 to to all register.

MOV AH. Line 4: So 0 is used in Bh register. This mode supports only one page. It takes row. Writing character directly on screen You can also write direct text by setting any text mode using BIOS service and then setting direct pointer at text memory address 0x0b Example Set mode Number 3.

These graphics library functions then use BIOS routines or use direct memory access drivers to draw pixel on screen.

Write pixel at 12th row and 15th column Hint: Steps in C language First call Initgraph function and then call putpixel function to draw pixel on screen. Direct memory access method allows you to write pixel directly by passing the complex BIOS routines. Window Code Example: The example and source code of writing pixel in windows will be available.

Both are used to draw pixel on screen. You will use pixel to draw filled triangle. Here we will discuss briefly how to write pixel in Microsoft Windows. It provides library functions APIs that can be used to write graphics. Microsoft windows are a complete graphical operating system but it does not allow you to access BIOS or direct memory easily.

Library functions are easier to use and even faster because these are optimized and provided with special drivers by different companies. By working in graphics in windows one must have knowledge about Windows GDI graphics device interface system. Defines the entry point for the application. It is easy and faster but its programming is only convenient in mode 13h.

Place code here. TranslateAccelerator msg. MyRegisterClass hInstance. MSG msg. LoadString hInstance. InitInstance hInstance.

CS602 Computer Graphics PDF Handouts Virtual University

Registers the window class. Processes messages for the main window. UpdateWindow hWnd. HDC hdc. RGB RECT rt. Add any drawing code here. GetClientRect hWnd. UINT message. LoadString hInst. DestroyWindow hWnd. DialogBox hInst. PostQuitMessage 0. These techniques are: Given two points. Two different lines can intersect in at most one point. A line may have three forms with respect to slope i.

Let us clarify this with the help of an example: Now before moving ahead let us discuss why these two cases are tested. Three or more points that lie on the same line are called collinear. This intuitive concept of a line can be formalized in various ways. First if m is less than 1 then it means that for every subsequent pixel on the line there will be unit increment in x direction and there will be less than 1 increment in y direction and vice versa for slope greater than 1.

We have another algorithm that works fine in all directions and involving less calculation mostly only addition. Well above algorithm is quite simple and easy but firstly it involves lot of mathematical calculations that is for calculating coordinate using equation each time secondly it works only in incremental direction. Consider the case of another line with points p1 If dx is greater than dy. Now having discussed this concept at length let us learns the algorithm to draw a line using above technique.

Find difference dx and dy between x coordinates and y coordinates respectively ending points of a line. DDA abbreviated for digital differential analyzer has very simple technique. In the loop drawPixel and add xIncrement in x1 by and yIncrement in y1. To sum-up all above in the algorithm. Therefore there is need to develop an algorithm which would be based on integer type calculations.

CS602 Computer Graphics PDF Handouts Virtual University

They say that when we have to draw points that should have integers as coordinates then why to use floating point calculation. There is serious criticism on the algorithm that is use of floating point calculation. Next step is to divide dx and dy by step to get xIncrement and yIncrement that is the increment required in each step to find next pixel value. A decision function is required to resolve this choice. Now a question is remaining how to calculate initial value of pi.

By taking the difference between the distances. Assuming that the slope is positive and less than 1. A positive scaling factor is added to ensure that no division is necessary. Calculating the distance between the true point. For that use equation i and put values x1. If the current point is xi. Removing procedure calls using macros or inline code can produce improvements. Improving performance Several techniques can be used to improve the performance of line-drawing procedures.

These are important because line drawing is one of the fundamental primitives used by most of the other rendering applications. Unrolling loops also may produce longer pieces of code.

Most algorithms can be adapted to calculate only the initial frame buffer address corresponding to the starting point and to replaced: The use of separate x and y coordinates can be discarded in favour of direct frame buffer addressing. An improvement in the speed of line-drawing will result in an overall improvement of most graphical applications.

In fixed point. Y we use the following formula: ADC Yint. Setting a Pixel Initial Task: GCD D x. Then each byte in the frame buffer corresponds to a pixel in the output display.

The sequence could be implemented using the following two integer additions: ADD Yfrac.

Rassegna Stampa

Assume the simplest case. Mint Improved versions of these algorithms exist. To find the address of a particular pixel X. For example the following variations exist on Bresenham's original algorithm: Symmetry forward and backward simultaneously Segmentation divide into smaller identical segments. D y Double step. Y addr 0. Well the input will be one center point x. Twice the radius is.

A circle has the maximum possible area for a given perimeter. The distance r from the center is called the radius. Using this technique a simple algorithm will be: Circle1 xcenter. They involve understanding level very simple to complex and reversely time complexity inefficient to efficient. Therefore the equation of the circle having center at point xc. We see them one by one giving comparative study.

The angle a circle subtends known as the diameter from its center is a full angle. Circle drawing using Cartesian coordinates This technique uses the equation for a circle on radius r centered at 0. The perimeter C of a circle is called the circumference. Art and Design v. Medicine and Virtual Surgery vi. History and cultural heritage viii. Entertainment ix. Simulations x. Games docsity. A major component of graphical interface is a window manager that allows a user to display multiple windows like areas on the screen at the same time.

Each window can contain a different process that can contain graphical or non-graphical display. In order to make a particular window active, we simply have to click in that window using an interactive pointing device. Graphical Interface also includes menus and icons for fast selection of programs, processing operations or parameter values.

An icon is a graphical symbol that is designed to look like the processing option it represents. One example is drawing of machines. It is required to prepare drawing of a machine before the actual production. The other heavy requirement is for architects as they have to prepare a complete blue print of the building they have to build long before the actual construction work gets underway. AutoCAD and other applications of the kind are heavily used today for building architecture.

Entertainment Merely a couple of decades back, the idea of a 24 hours Cartoons Network was really a far fetched one. That was the time when one would wait for a whole week long before getting an entertainment of mere 15 minutes.

Well thanks to computer graphics that have enabled us to entertain ourselves with animated movies, cartoons etc. He created a series of widely reproduced images on a plotter exploring cockpit design using a 3D model of a human body. Due to rapid growth in the field of computing, now computer is used as an economical and efficient tool for the production of pictures.

Computer graphics applications are found in almost all areas. Here we will discuss some of the important areas including:. User Interfaces ii. Layout and Design iii. Scientific Visualization and Analysis iv. Art and Design v. Medicine and Virtual Surgery vi. History and cultural heritage viii.

Friday, December 5, 2014

Entertainment ix. Simulations x. Almost all the software packages provide a graphical interface. A major component of graphical interface is a window manager that allows a user to display multiple windows like areas on the screen at the same time. Each window can contain a different process that can contain graphical or non-graphical display. In order to make a particular window active, we simply have to click in that window using an interactive pointing device.

Graphical Interface also includes menus and icons for fast selection of programs, processing operations or parameter values. An icon is a graphical symbol that is designed to look like the processing option it represents. Computer graphics is very helpful in producing graphical representations for scientific visualization and analysis especially in the field of engineering and medicine.

It helps a lot in drawing charts and creating models. Artists use a variety of programs in their work, provided by computer graphics. Some of the most frequently used packages include: Medicine and Virtual Surgery Computer graphics has extensive use in tomography and simulations of operations.Twice the radius is.

Similarly at certain times you would be performing certain tasks which you know but it would be difficult for others to understand them so there is very important requirement of showing the things in order to make them understandable.

Computer Graphics involves technology to accept, process, transform and present information in a visual form that also concerns with producing images or animations using a computer. These tools are under use of movie makers. Quzzies solved papers, books vu related questions, volume, quizzes.

This is achieved through redrawing the picture repeatedly by quickly directing the electron beam back over the same points and the display using this technique is called refresh CRT. One example is drawing of machines. An application program is input and stored in the system memory along with a graphics package.

The array size for character grids can vary from about 5 by 7 to 9 by 12 or more for higherquality displays. The video processor forms a picture of the screen image and stores it in the frame buffer.

CHASE from Berkeley
I fancy reading books victoriously . Browse my other articles. I am highly influenced by carom billiards.