Sunteți pe pagina 1din 15

Computer Graphics MC0072 Set- 2 1.

Write a short note on following:

A) Video mixing
Video mixing facility is provided by video controller. It accepts the information of two images simultaneously. One from frame buffer and other from television camera, recorder or other source. As shown in fig video controller merge the two images to form a composite image

Fig: video mixing

There are two type of video mixing 1. A graphics image is set into a video image. Here mixing is accomplished with hardware that treats a designated pixel value in the frame buffer as a flag to indicate that the video signal should be shown

instead of the signal from the frame buffer, normally the designated pixel value corresponds to the background color of the frame buffer image. 2. In second, the video image is placed on the top of the frame buffer image. Here, whenever background color of video image appears, the frame buffer is shown, otherwise the video image is shown.

B) Frame buffer
In raster scan displays a special area of memory is dedicated to graphics only. This memory area is called frame buffer. It holds the set of intensity values for all the screen points. The stored intensity values are retrieved from frame buffer and displayed on the screen one row (scan line) at a time. Usually, frame buffer is implemented using rotating random access semiconductor memory. However, frame buffer also can be implemented using shift registers. Conceptually, shift register is operated as first-in-firstout (FIFO) fashion, i.e. similar to queue. As shown in fig the implementation of frame buffer using shift register. As shown in the Fig., one shift register is

required per pixel on a scan line and the length of shift register in bits is equal to number of scan lines. Here, there are 8 pixels per scan line and there are in all 5 scan lines. The synchronization between the output of the shift register and the video scan rate is maintained data corresponding to particular scan line is displayed correctly.

Fig: Frame Buffer Using eight 5-bit shift registers

C) Color table
In general color displays, 24- bits per pixel is used, where 8-bits represent 256 levels for each color. Here it is necessary to read 24-bits for each pixel from frame buffer. This is very time consuming. To avoid this video controller uses look up table (LUT) to store many entries of pixel values in RGB format. With this facility, now we one has to read index to the look up table from the frame buffer for each pixel. This index specifies the one of the entries in the look-up table. The specified entry in the loop up table is then used to control the intensity or color of the CRT.

Usually, look-up table has 256 entries. Therefore, the index to the look-up table has 8-bits and hence for each pixel, the frame buffer has to store 8-bits per pixel instead of 24 bits. Fig. shows the organization of a color (Video) look-up table.

Fig.: Organization of a Video look-up table

Advantages of lookup table.


a.

Use of a color table can provide a "reasonable" number of simultaneous colors without requiring large frame buffers. For most applications, 256 or 512 different colors are sufficient for a single picture. Table entries can be changed at any time, allowing a user to be able to experiment easily with different color combinations in

b.

a design, scene, or graph without changing the attribute settings for the graphics data structure.

In visualization and image-processing applications, color tables are convenient means for setting color thresholds so that all pixel values above or below a specified threshold can be set to the same color. For these reasons, some systems provide both capabilities for color-code storage, so that a user can select either to use color tables or to store color codes directly in the frame buffer.

3. Describe

the following with respect to methods of generating characters:

a) Stroke method
Stroke method uses small line segments to generate a character. The small series of line segments are drawn like a stroke of pen to form a character as shown in the fig

We can build our own stroke method character generator by calls to the line drawing algorithm. For which we have to decide which line segments are needed for each character and then drawing these segments using line drawing algorithm.

b) Starbust method
Starbust method a fix pattern of line segments are used to generate characters. As shown in the fig., there are 24 line segments. Out of these 24 line segments, segments required to display for particular character are highlighted. This method of character generation is called Starbust method because of its characteristic appearance

Fig shows the Starbust patterns for characters A and M. the patterns for particular characters are stored in the form of 24 bit code, each bit representing one line segment. The bit is set to one to highlight the line segment; otherwise it is set to zero. For example, 24-bit code for Character A is 0011 0000 0011 1100 1110 0001 and for character M is 0000 0011 0000 1100 1111 0011. This method of character disadvantages. They are generation has some

1. The 24-bits are required to represent a character. Hence more memory is required 2. Requires code conversion character from its 24-bit code software to display

3. Character quality is poor. It is worst for curve shaped characters.

c)

Bitmap method

Bitmap method is also called dot matrix because in this method characters are represented by an array of dots in the matrix form. It is a two dimensional array having columns and rows. A 5 7 array is commonly used to represent characters as shown in the fig. However 7 9 and 9 13 arrays are also used. Higher resolution devices such as inkjet printer or laser printer may use character arrays that are over 100 100.

Fig.: character A in 5 7 dot matrix format Each dot in the matrix is a pixel. The character is placed on the screen by copying pixel values from the character array into some portion of the screens frame buffer. The value of the pixel controls the intensity of the pixel.

4. Discuss

the homogeneous coordinates for translation, rotation and scaling.


a. Homogeneous Coordinates for Translation

Ans.

The homogeneous coordinates for translation are given as

. (1) Therefore, we have

= [x + tx y + ty 1] . (2)

b. Homogeneous Coordinates for Rotation The homogeneous coordinates for rotation are given as

. (3) Therefore, we have

. (4)

c. Homogeneous Coordinates for Scaling The homogeneous coordinate for scaling are given as

= . (5)

5. Describe the following with respect to projection:


A.

Parallel projection

Parallel projection is a type of projection in which, z coordinate is discarded and parallel lined from each vertex on the object are extended until they intersect the view plane. The point of intersection is the projection of the vertex. We connect the projected

vertices by line segments which connections on the original object.

correspond

to

Fig.: parallel projection of an object to the view plane

As shown in the Fig, a parallel projection preserves relative proportions of objects but does not produce the realistic views.

B. Type of parallel Projection


Parallel projection

Oblique projection

Orthographic projection

Cavalier

Cabinet

Axonometric

Multi view orthographic

Isometric

Trimetric

Dimetric

Oblique projection
Oblique projection has their projections that are not perpendicular to the projection plane. Two common oblique projections are a. cavalier b. cabinet a. cavalier projection All the lines perpendicular to the projection plane are projected with no change in length.

Cavalier projection of the unit cube

b. cabinet projection All lines perpendicular to the projection plane are projected at one-half their length. This projection appears more realistic than cavalier projections because of this reduction in length of perpendiculars Common choices for angles are 30and 45, which display a combination view of (front, side and top or front, side and bottom) of an abject.

Cabinet projection of the unit cube

Orthographic projection
Orthographic projections have their projectors perpendicular to the view plane. Projected line come from infinity and projected view is accurate and correct in size and shape so that it is used in engineering drawings where we want the actual size and shape of the object Normally, the projection are taken on one of the coordinate plane i.e. x=0 or y=0 or z=0. Thus, the viewing direction is parallel to one of the principle axis.

Types of orthographic projection a. Multi view parallel projection b. Axonometric parallel projection

Multi view parallel projection A single orthographic projection is not sufficient to visually reconstruct the shape of an abject. So by this we represent the top, front and side views of an object

since it is easy to measure the dimensions of an object directly.

Axonometric parallel projection Axonometric is widely used to represent 3-D object as it allows many sides of an abject to be seen. The view plane normal is not parallel to any principal axis and the projectors are perpendicular to the view plane. An axonometric projection can be constructed by manipulating the object using rotation and translation such that multiple faces are visible. Parallel lines remain parallel and receding lines are equally foreshortened by some factor. It is the ratio of projected length and actual length. Type of axonometric projection a. Isometric projection b. Diametric projection c. Trimetric projection

Isometric projection The projection plane normal (projectors) makes equal angles with each principal axis (all three axes are equally foreshortened).

Diametric projection The projection plane normally (projector) makes equal angle with two axes which are equally foreshortened. Trimetric projection When the projection plane normal (projectors) makes unequal angle with each principal axis (all three arte unequally foreshortened).

-----End-----

S-ar putea să vă placă și