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

Definition, Differences and Examples

Computer Graphics and Multimedia Page 1

UNIT 1:: Overview of Graphics System Characteristics of Cathode-Ray Tube (CRT)


Intensity Resolution Focusing Deflection

CRT Diagram

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 2

Advantage of CRT
High Quality to Cost Ratio Variable Resolutions Fast Pixel Response Time Wide Viewing Angles

Disadvantage of CRT
Size to Screen Size Discrepancy Higher Energy Consumption Refresh Rate Flicker Large Overall Size

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 3

Input Devices::
o o o o o o o o o o o Keyboard Mouse Digitizer Trackball Touch Screens Light Pens Microphones Bar code readers Joysticks Scanners Voice Systems

Hard copy Devices::


o Monitors o Printers Dot-Matrix Printers Inkjet Printers Drum Printers Laser Printers o Plotters Drum Plotters Flatbed Plotters

Computer Graphics application:: 1. Computer generated art 2. Video games 3. Movies 4. CAD [ Computer Aided Design ] 5. Information visualization 6. Forensic science

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 4

Computer Aided Design::


o CAD/CAM = Computer Aided Design and Computer Aided Manufacturing. It is the technology concerned with the use of computers to perform design and manufacturing functions. o CAD can be defined as the use of computer systems to perform certain functions in the design process. o CAM is the use of computer systems to plan, manage and control the operations of manufacturing plant through either direct or indirect computer interface with the plants production resources. o Advantages of CAD/CAM systems 1. Greater flexibility. 2. Reduced lead times. 3. Reduced inventories. 4. Increased Productivity. 5. Improved customer service. 6. Improved quality. 7. Improved communications with suppliers. 8. Better product design. 9. Greater manufacturing control. 10. Supported integration. 11. Reduced costs. 12. Increased utilization. 13. Reduction of machine tools. 14. Less floor space.

Color CRT Monitor::


o A color CRT monitor displays color pictures by using a combination of phosphors that emit different light. o The two basic techniques for producing color displays with CRT. Beam-Penetration Shadow Mask

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 5

Direct View Storage Tubes ::


o A Direct View Storage Tube stores the picture information as a charge distribution just behind the phosphor coated screen o Two electron guns are used in a DVST. 1. One primary gun used to store picture pattern 2. Second gun maintains the picture display. o Advantages : 1. No Refreshing is needed. 2. Complex picture can be display at very high resolutions without flicker. o Disadvantage : 1. The erasing and redrawing process can take several seconds for a complex picture.

o Viewing Defines which particular view of the model is required. This involves indicating where a virtual camera should be placed and in which direction it should point. o Rendering: Producing the image on the output device. Includes: Removing hidden surfaces Calculating the shade of visible surfaces Scan converting the graphics primitives (lines, polygons, etc) into corresponding sets of points on the display device. o A bitmap image a frame buffer with one bit per pixel.
DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 6

o A Pixmap image a frame buffer with multiple bits per pixel. o Horizontal retrace: the return of the electron beam to the left of the screen after refreshing each scan line. o Vertical retrace: the return of the electron beam to the top left corner of the screen to begin its next frame. o CAD can be defined as the use of computer systems to perform certain functions in the design process. o Refresh CRT :: i. When pixel is drawn and light will generate and then second pixel will draw. ii. This process done in Nanosecond so we see the continuous picture but actually pixel is redraw each and every time so its called Refresh CRT. o Persistence : How long Electron beam Continue to emit light after the CRT beam is removed. o Resolution : The Maximum number of point that can be display without overlap on a CRT is referred to as the resolution. o Aspect Ratio: The Number gives the Ration of Vertical point to horizontal point to produce equal length lines in both directions on the CRT screen its called Aspect Ratio. o CAM is the use of computer systems to plan, manage and control the operations of manufacturing plant through either direct or indirect computer interface with the plants production resources. o Tomography is a technique of X-Ray photography that allows crosssectional views of physiological systems to be displayed.

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 7

Short Forms:
1. CAD/CAM = Computer Aided Design and Computer Aided Manufacturing 2. Cathode ray tube [crt] 3. Liquid-crystal displays (LCD)

Difference: Beam Penetration CRT


1 In Beam penetration only used 4 colors o o o o 2 3 4 5 6 Red Blue Green yellow Output quality is expensive because it is used more color.

Shadow Mask CRT


In shadow mask it will used 17 million colors

Output quality is inexpensive.

Only 2 bit is used. It will use 3 bit per pixel. It will only use color either on or off. Color electron gun is used. Shadow mask grid is not used. Shadow mask grid is used. It gives output only 2 bit i.e. either It gives color more output. 00,01,10,11.

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 8

Random Scan Display


1 2 3 4 5 6 Slow display Low resolution Refresh rate is 60-80 Hz Slow Output Refresh buffer is used

Raster Scan Display


Faster display High resolution Refresh rate is 30-60 Hz Faster Output Refresh display file is used

It goes each and every line in the screen It goes only to those space when and when object is g\drawn it will put pixel object is to be drawn and drawn a point Ex: Printer Ex: Plotter

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 9

UNIT 2:: Output Primitives o Line Drawing algorithms::


DDA [Digital Differential Analyzer] Line Algorithm Bresenhums Line Algorithm DDA Line Algorithm::

Y=y2-y1 X=x2-x1 Yinc Dy\step Xinc Dx\step

Plot

X=X+Xinc Y=Y+Yinc Increment the counter i by 1 (i=i+1) until i<=steps

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 10

Bresenhums Line Algorithm:: 1. Slope M = (y2-y1)/(x2-x1) 2. P0=2y-x 3. If Pk<0 Next point[(Xk+1),Yk] Pk+1=Pk+2y If Pk>=0 Next point (Xk+1,Yk+1) Pk+1=Pk+2y-2x

4. Repeat step 3 y times

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 11

o Circle and properties of circle::


Definition: Set of point equidistance from a center position is called a circle

Properties of circle: Equidistance from a center point Polar co-ordinates Cartesian co-ordinates =>> Cartesian co-ordinates (X-Xc) 2+(Y-Yc) 2=r2 =>> Polar co-ordinates X=Xc+rcos Y=Yc+rsin

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 12

Octet
1 Pk<0 (Xk+1,Yk)

Formulas
Pk+1=Pk + 2(Xk+1) + 1 Pk+1=Pk + 2(Xk+1) 2(Yk-1) Pk+1=Pk + 2(Yk+1) + 1 Pk+1=Pk + 2(Yk+1) 2(Xk-1) Pk+1=Pk 2(Yk-1) + 1 Pk+1=Pk+ 2(Yk-1) 2(Xk-1) Pk+1=Pk + 2(Xk+1) + 1 Pk+1=Pk+ 2(Xk+1) 2(Yk-1) Pk+1=Pk-2(Xk-1)+1 Pk+1=Pk-2(Xk-1)+1+2(Yk+1) Pk+1=Pk-2(Yk-1)+1 Pk+1=Pk-2(Yk-1)+1+2(Xk+1) Pk+1=Pk-2(Yk+1)+1 Pk+1=Pk+2(Yk+1)+1+2(Xk+1) Pk+1=Pk-2(Xk-1)+1 Pk+1=Pk- 2(Xk-1) - 1 - 2(Yk-1)

Pk>=0 (Xk+1,Yk-1) 2 Pk<0 (Xk,Yk+1)

Pk>=0 (Xk-1,Yk+1) 3 Pk<0 (Xk,Yk-1)

Pk>=0 (Xk-1,Yk-1) 4 Pk<0 (Xk+1,Yk)

Pk>=0 (Xk+1,Yk+1) 5 Pk<0 (Xk-1,Yk)

Pk>=0 (Xk-1,Yk+1) 6 Pk<0 (Xk,Yk-1)

Pk>=0 (Xk+1,Yk-1) 7 Pk<0 (Xk,Yk+1)

Pk>=0 (Xk+1,Yk+1) 8 Pk<0 (Xk-1,Yk)

Pk>=0 (Xk-1,Yk-1)

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 13

o Ellipse Generating algorithms::


o Ellipse an elongated circle. o A modified circle whose radius varies from a maximum value in one direction to a minimum value in the perpendicular direction. Step1:

p10 = ry rx ry + 1 rx 4
2 2

If p1k < 0, next point (xk+1, yk) and

p1k +1 = p1k + 2ry xk +1 + ry


2

else, next point (xk+1, yk-1) and

p1k +1 = p1k + 2ry xk +1 2rx yk +1 + ry


2 2

When 2ry2x 2rx2y then STOP Step2: (X0, Y0) = (Last step1 X value, Last step1 Y value)

p20 = ry (x0 + 1 ) + rx ( y0 1) rx ry 2
2 2 2 2 2

If p2k > 0, next point is (xk, yk-1) and

p 2 k +1 = p 2 k 2 rx y k +1 + rx
2

else, next point is (xk+1, yk-1)

p2k +1 = p2k + 2ry xk +1 2rx yk +1 + rx


2 2

continue until y=0

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 14

Fill Algorithms::
o Three different algorithms: 1. Scan-line fill 2. Boundary fill 3. Flood fill

Boundary Fill
1 2 3 4 It will check boundary color as well as fill color It check exterior Point In boundary fill algorithm it will fill inside as well as boundary of the polygon It will not replace the pixel color by another pixel color

Flood Fill
It will only check the old color i.e. interior color It will check interior Pixel It will only fill the interior side of the polygon not boundary of the polygon It will replace the pixel color by new pixel color

DDA Algorithm
1 This is Simplex algorithm available in graphics This is faster method End point accuracy is poor because of rounding of decimal values It will not work for complex diagram or figure as it is orientation dependent It includes integer and decimal calculation for addition, subtraction, multiplication, and division We can draw smooth lines using this algorithms

Bresenhams Algorithm
This is complex algorithm available in graphics This is not faster method End point accuracy is not poor It will work for complex diagram or figure as it is orientation independent It includes only the integer calculation such as addition, subtraction Meant for the basic line drawing but we can not draw smooth lines using these algorithms.

2 3 4 5

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 15

UNIT 3:: Two Dimensional Geometric Transformation and Two Dimensional Viewing Two Dimensional Geometric Transformations:
1. Basic Transformation 2. Matrix Representation 3. Composite Transformation 4. Other Transformations

Basic Transformation and Matrix Representation:: o o o


Translation(Reposition) Scaling(Reduce or enlarge) Rotation(Reorient) Transformation matrix

Translation transformation, the matrix equation is

[P ] = [P] [Tt] where, [Tt] is the translation transformation matrix.

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 16

Scaling transformation o Uniform Scaling

Here, s is the scale factor.

o Non-Uniform Scaling

Where, sx, sx, sx are the scale factors for the x, y, and z coordinates of the object.

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 17

Rotation transformation In matrix form we can write these equations as

In general, the points matrix and the transformation matrix are re-written as

Composite Transformation

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 18

Rotation about a pivot point:

Other Transformations::
Reflection Shear

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 19

Two Dimensional viewing::


The viewing pipeline Viewing coordinates reference frame

Window-to-viewport coordinates transformation Clipping operations Line clipping polygon clipping

The viewing pipeline


A viewing transformation using standard rectangles for the window and viewport The two-dimensional viewing-transformation pipeline Setting up a rotated world window in viewing coordinates and the corresponding normalized-coordinate viewport

Viewing Coordinate Reference Frame


Matrix for converting world-coordinate positions to viewing coordinate

WC ,VC = R
R: rotation matrix T: translation matrix

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 20

The steps in this coordinate transformation Translate the viewing origin to the world origin, then Rotate to align the axes of the two systems

Window-to-viewport coordinates transformation::


Window-to-viewport mapping To maintain the same relative placement

xv xv min xv max xv min yv yv min yv max yv min

= =

xw xw min xw max xw min yw yw min yw max yw min

Solving these expressions for the viewport position (xv, yv)

xv = xv min ( xw xw min ) sx yv = yv min ( yw yw min ) sy


The scaling factors

sx = sy =

xv xw yv yw

max max max max

xv min xw min yv min yw min

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 21

Clipping operations
Point Clipping::

xwmin x xwmax ywmin y ywmax

Line Clipping::

= =

+ +

Cohen-Sutherland Line Clipping::

M=(Y2-Y1)/(X2-X1)
X=X1+(1/M)(YT-Y1) Y=YT X=X1+(1/M)(YB-Y1) Y=YB X=XR Y=M(XR-X1)+Y1

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 22

X=XL Y=M(XL-X1)+Y1

EXAMPLE: An object ABCD having the co-ordinates A=(10,10); B=(110,10); c=(110,110); D(10,110) is to be clipped for the following line: 1. EF having the end point (25,75) & (90,100) 2. GH having the end point (125,35) & (110,120) 3. IJ having the end point (50,50) & (120,120)

Right:: X=XR X=100 X=m(xr-x1)+y1 =1(110-50)+50

E F

0000 0000

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 23

Liang-Barsky Line Clipping Algorithm: 1. Read the end point of line(x1,y1) and (x2,y2) 2. Read the two corners of the window having co-ordinates Xwmin,Ywmax,Xwmax,Ywmax 3. Calculate the values of parameters pi and qi P1= - X ; P2= X; q1=X1-Xwmin q2=Xwmax-X1 q3=Y1-Ywmin q4=Ywmax-Y1

P3= - Y; P4= Y;

4. If pi=0; then line is parallel to the first boundary { If Qi<0 { Line is completely outside the boundary so, discard the line segment stop }

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 24

Else { Check if LINE IS HORIZONTAL OR VERTICAL checks the line end points with corresponding boundaries. } } 5. Initialize the values t1 and t2 T1=0 and t2=1 6. Calculate the values for qi/pi where i=1,2,3,4 7. Select the values of qi/pi ,where pi<0 and assigning the maximum value of qi/pi to t1 8. Select the values of qi/pi ,where pi>0 and assigning the minimum value of qi/pi to t2 9. If T1<T2 { X1=X1+t1* X X2=X2+t2* X Y1=Y1+t1* Y Y2=Y2+t2* Y } Draw the line joining the end points 10. Stop

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 25

Example:

A line having end points (10, 10) (60, 30) is to be clipping against the clip window co-ordinates having (15, 15) & (25, 25)

Step :1 Step :2 Step :3

X1=10

X2=60

Y1=10 Y2=30

Xwmin = 15 Xwmax=25 Ywmin=15 Ywmax=25

Step :4

T1=0

T2=1

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 26

Step :5

Step :6 Step :7 Step :8

P1 & p3 <0 so value is 1/10 and we can take maximum for t1=1/4 P2 & p4>0 so value is 3/10 & we can take minimum for t2=3/10 t1<t2 (1/4<3/10)

Answer::

(22.5,16) AND (25,16)

Definition:: 1. Translation :: One object is moved its original co-ordinates to different coordinates

2. Rotation:: Rotation is applied to an object by repositioning it along circular path in X,Y plan

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 27

3. Scaling a. Uniform Scaling b. Differential Scaling

Uniform Scaling
1 If scaling Sx=Sy then we says that it is uniform scaling Object shape both the x as well as y remains same

Differential Scaling
If Sx # Sy then it is called as differential scaling Object height and width may different

EX: Sx=2,Sy=2

Ex: Sx=0.5,Sy=2

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 28

4. Viewing Transformation :: Displaying an image of a picture involves mapping the co-ordinates of points and lines that form the picture into an appropriate physical device co-ordinates where the image is to be displayed this mapping of co-ordinates is called viewing transformation.

5. Window code:: The world co-ordinates system is mapped into finite world co-ordinates area for display called window code

6. View port:: An area on the device to which window is mapped is called view port.

7. Work station transformation:: Transformation of window port to view port is also known as work station transformation.

Cyrus Beck Clipping Algorithm


Algorithm:: 1. Read the line end points t1 & t2 2. Read the vertex co-ordinates of the clipping window 3. Calculate d=p2-p1 4. Assign the boundary point f with a particular edges 5. Find the normal vector for corresponding edge 6. Calculate the dot product D.N. and w=p1-f

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 29

7. If D.n >0 TL= (-w.n/d.n) Else Tu=(-w.n/d.n) 8. Repeat step 4 to 7 for each edge of clipping window 9. Find maximum lower limit of t and minimum upper limit of t 10.If maximum lower limit>minimum upper limit then ignore the line else find the intersection point p(t)=p+(q-p)t Example:: Clip a line (5, 50) and (40, 30) against the clipping window (10, 10) and (30, 40)

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 30

AB= [0, 1] BC= [-1, 0] CD= [0, -1] AD= [1, 0]

Left hl=i Right nr=-i Bottom nb=j Top nt=-j

A (10, 10), B (30, 10), C (30, 40), D (10, 40)

Step ::1

AB= [0, 1] and A (10, 10)

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 31

Step ::2

BC= [-1, 0] and B (30, 10)

Step ::3

CD= [0, -1] and C (30, 40)

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 32

Step ::4

AD= [1, 0] and D (10, 40)

Pt=p+(q-p) * t(max)

Pt=p+(q-p) * t(min)

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 33

UNIT 4:: Three Dimensional Object Representation and Three Dimensional Geometric and Modeling Transformations Spline Representations::
o Smooth curve defined by some control points moving the control points changes the curve o A spline curve is specified using a set of control points o There are two ways to fit a curve to these points: Interpolation - the curve passes through all of the control points Approximation - the curve does not pass through all of the control points

Bzier Spline Curves::


o A spline approximation method developed by the French engineer Pierre Bzier for use in the design of Renault car bodies o A Bzier curve can be fitted to any number of control points Example:: An animation shows a car driving along a road which is specified by Bezier curve with the following control unit Xk Yk 0 0 5 40 40 5 50 15

The animation last 10 seconds and key frame are to be computed at 1 second intervals find out the position of the car on the road at the start of 6th second of the animation.

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 34

Solution:: u= 6/10 = 0.6 X (u): 0<=u<=1

= x0(1-u)3 + 3x1 u(1-u)2 + 3x2 u2(1-u) + x3u3 = 0(1-0.6)3 + 3(5)(0.6)(1-0.6)2 + 3(40)(0.6)2(1-0.6) + (50)(0.6)3 = 0 + 1.44 + 17.28 + 10.8 X (0.6) = 29.52 Y (u): =y1(1-u)3 + 3y1 u(1-1)2 + 3y2 u2(1-u) + y3u3 =0(1-0.6)3 + 3(40)(0.6)(1-0.6)2 +3(5)(0.6)2(1-0.6) + 15(0.6)3 =0 + 11.52 + 2.16 + 3.24 Y (0.6) = 16.92

Three Dimensional Geometric and Modeling

Transformations:
1. Translation 2. Rotation 3. Scaling
Translation : Translation refers to moving or displacing for a certain distance in space. In 3D, the matrix used for translation has the form

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 35

1 0 0 a

0 1 0 b

0 0 1 c

0 0 0 1

where (a, b, c) is the vector that defines the direction and distance to move.

Rotation
Rotation refers to rotating vertices about an axis going through the origin. Three such axes are the X, Y, and Z axes in the space.

cos 0 sin 0

0 -sin 1 0 0 cos 0 0

0 0 0 1

Scaling
Scaling refers to enlarging or shrinking the size of vector components along axis directions. For example, a vector can be scaled up along all directions or scaled down along the X axis only. To scale, we usually apply the scaling matrix below: p 0 0 0 0 q 0 0 0 0 0 0 r 0 0 1

Where p, q, and r are the scaling factor along the X, Y, and Z direction, respectively.

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 36

UNIT 5:: Multimedia Multimedia::


o Multimedia defined as "The integration of text, graphics, animation, images, video and audio along with computing technology." o Multimedia is compelling communication, education, entertainment and references those appeals to all senses.

Animation For Multimedia Project::


CLASSIFICATION - I 1. CEL ANIMATION 2. OBJECT ANIMATION CLASSIFICATION II 1. TWO DIMENSIONAL ANIMATIONS 2. THREE DIMENSIONAL ANIMATIONS CLASSIFICATION III 1. MOVIE ANIMATION 2. TELEVISION ANIMATION 3. MULTIMEDIA ANIMATION 4. INTERNET ANIMATION CLASSIFICATION IV 1. PROGRAMMED ANIMATION 2. COMPLIED ANIMATION CLASSIFICATION - V 1. GAME ANIMATIONS 2. MORPH ANIMATIONS

DEEPTI PATEL

Definition, Differences and Examples


Computer Graphics and Multimedia Page 37

Element of Multimedia Application::


o o o o o o o o o Entertainment and fine arts Creative industries Commercial Education Engineering Industry Mathematical and scientific research Medicine Document Imaging

Various staged of Project Development::


STEP 1:: STEP 2:: STEP 3:: STEP 4:: STEP 5:: STEP 6:: STEP 7:: General Content Design / Development Navigation Structure Design / Development Media Content Design / Development Interface Design / Development Storyboarding Techniques Program Development or Authoring Delivery Design / Development

Classification of Animation::
o o

Interactive Multimedia and Non Interactive Multimedia Entertainment Multimedia and Edutainment Multimedia

o CD-ROM Multimedia, Internet Multimedia, Film/Broadcast Multimedia and Miscellaneous Multimedia


DEEPTI PATEL

You might also like