Sutherland-Hodgeman polygon clipping algorithm

Aim:- To write a C program to implement polygon clipping. Procedure Algorithm For Polygon Clipping 1. Get the minimum and maximum coordinates of both window and view port. 2. Get the number of sides of a polygon and its corresponding coordinates. 3. If the polygon lies within region code window, display it. 4. If any one of the polygon side is neither inside nor outside the boundary, find point of intersection and clip the regions that lies outside the boundary. 5. Display the polygon after clipping. Source Code Programming in C #include<stdio.h> #include<conio.h> #include<graphics.h> typedef enum { left,right,bottom,top } edge; #define N_EDGE 4 #define TRUE 1 #define FALSE 0 struct point { int x; int y; }p,wmin,wmax,p1,p2,ipt,i,pin[50],pout[50],first[50],s[50],i; int inside(struct point p,int b,struct point wmin,struct point wmax) { switch(b) { case left: if(p.x<wmin.x) return (FALSE); break; case right: if(p.x>wmax.x) return (FALSE); break; case bottom: if(p.y<wmin.y) return (FALSE); break; case top: if(p.y>wmax.y) return (FALSE); break;

} return (TRUE); } int cross(struct point p1,struct point p2,int b,struct point wmin,struct point wmax) { if(inside(p1,b,wmin,wmax)==inside(p2,b,wmin,wmax)) return (FALSE); else return (TRUE); } struct point intersect(struct point p1,struct point p2,int b,struct point wmin,struct point wmax) { float m; if(p1.x!=p2.x) m=(p1.y-p2.y)/(p1.x-p2.x); switch(b) { case left: ipt.x=wmin.x; ipt.y=p2.y+(wmin.x-p2.x)*m; break; case right: ipt.x=wmax.x; ipt.y=p2.y+(wmax.x-p2.x)*m; break; case bottom: ipt.y=wmin.y; if(p1.x!=p2.x) ipt.x=p2.x+(wmin.y-p2.y)/m; else ipt.x=p2.x; break; case top: ipt.y=wmax.y; if(p1.x!=p2.x) ipt.x=p2.x+(wmax.y-p2.y)/m; else ipt.x=p2.x; break; } return(ipt); } void clippoint(struct point p,int b,struct point wmin,struct point wmax,struct point *pout,int *cnt,struct point *first[],struct point *s) { if(!first[b])

first[b]=&p; else if(cross(p,s[b],b,wmin,wmax)) { ipt=intersect(p,s[b],b,wmin,wmax); if(b<top) clippoint(ipt,b+1,wmin,wmax,pout,cnt,first,s); else { pout[*cnt]=ipt; (*cnt)++; } } s[b]=p; if(inside(p,b,wmin,wmax)) if(b<top) clippoint(p,b+1,wmin,wmax,pout,cnt,first,s); else { pout[*cnt]=p; (*cnt)++; } } void closeclip(struct point wmin,struct point wmax,struct point *pout,int *cnt,struct point *first[],struct point *s) { int b; for(b=left;b<=top;b++) { if(cross(s[b],*first[b],b,wmin,wmax)) { i=intersect(s[b],*first[b],b,wmin,wmax); if(b<top) clippoint(i,b+1,wmin,wmax,pout,cnt,first,s); else { pout[*cnt]=i; (*cnt)++; } } } } int clippolygon(struct point wmin,struct point wmax,int n,struct point *pin,struct point *pout) { struct point *first[N_EDGE]={0,0,0,0},s[N_EDGE]; int i,cnt=0;

scanf("%d%d".left.pout:\n").pout[j].y).j.&pin[j].for(i=0. printf("\n1.first.x.&gr).wmax.x. for(j=0.pout.&gr).y).j<np.&gr. clrscr().y).pin.&gr.y.&pout[j].x. printf("Enter the no of sides in polygon:\n"). switch(c) { case 1: detectgraph(&gm. initgraph(&gm.x.&c).y)for pin .x.pin[j]. scanf("%d%d".y.&n). rectangle(wmin. rectangle(wmin. np=clippolygon(wmin.y).wmax.wmax.x. } void main() { int c.i<n.&wmin.n. printf("Enter the window max coordinates").pout.y. for(j=0.s). closeclip(wmin.&pout[j].pout).&gr. initgraph(&gm.pout[j]. scanf("%d%d".x.&cnt. else line(pin[j].j++) { line(pout[j].wmin.y).x. printf("Enter the window minimum coordinates"). return(cnt).x.&wmax.n.wmin.pin[j].wmax.y).pout[(j+1)].x.wmin.pout[j].wmax.x.&pin[j]. scanf("%d".j++) { scanf("%d%d".pout[(j+1)].wmax.j<n.y).y.wmax. printf("Enter the coordinates(x.y).exit")."d:\\tc\\BGI").s).y.gr. scanf("%d".y.y).&wmin.x.polygon clipping 2.i++) clippoint(pin[i].pout[j].gm. . } rectangle(wmin.np.&cnt. detectgraph(&gm."d:\\tc\\BGI").j<n.&gr). for(j=0.pout[j]. } detectgraph(&gm.&wmax.x.first.wmax.x.wmin.x.wmax."d:\\tc\\BGI"). initgraph(&gm.j++) { if(j!=n-1) line(pin[j].x.y).

y)for pin . . } Project Example Output Enter the window minimum coordinates 200 200 Enter the window max coordinates 400 400 Enter the no of sides in polygon 3 Enter the coordinates(x.pout 150 300 250 175 250 175 350 410 350 410 150 300 1. case 2: exit(0). } getch().polygon clipping 2.} break.exit RESULT Thus the c program to implement polygon clipping was coded and executed successfully.

0.h> int maxx. } .midy). line(midx.midy.midy.&x.midy-(y*5).gm. maxx=getmaxx().getmaxcolor()).midx-(x*3). line(0.midx.4).midx-150.midy+225.&gm). void axis() { getch(). setfillstyle(0. detectgraph(&gd. cleardevice(). clrscr().EX.maxx. printf("\nEnter the Perspective Projection Vector"). using maxx=getmaxx().h> #include<conio.&z).h> #include<graphics.:DATE:Visualization of 3-Dimensional Images Algorithm These Program is draw the three dimensional image using bard3d graphics function.maxy. getch().maxy).y.x.h> #include<math.4).midx."c:/tc/bgi"). scanf("%d%d%d".&gm.&y. NO. midx=maxx/2. maxy=getmaxy().midy-(y*9). maxy=getmaxy(). closegraph(). bar3d(midx-250.midy+150. bar3d(midx-(x*5). it will get the center of the coordinate using these coordinate it will draw the three dimensional visualization image Source code three Dimensional Image algorithm #include<stdio.10*z. initgraph(&gd.20. midy=maxy/2. } void main() { int gd.z.

3-Dimensional Images Algorithm OUTPUT .

printf ( “ Enter the End Points”) . . x1 = x1 + tx1 . y1 = 250 . y1 .AIM :Write a program to implement Composite Transformation . y4 = 300 . &ty1 ) . int x1 . &gm . scanf ( “ %d %d”. y1 = y1 + ty1 . clrscr ( ) . tx2 .h> #include <graphics. x4 = x4 + tx1 .h> void main( ) { int gd = DETECT . y4 . y4 = y4 + ty1 . 250 ) . gm . x1 = 250 . ty1 .”\\tc\\bgi”) . rectangle ( 250 . 250 . &tx1 . ty2 . tx1 . initgraph (&gd . x4 . 250 .h> #include <conio. PROGRAM #include <stdio. x4 = 300 .

&ty2 ) . &tx2 . x4 = x4 + tx2 . x4 . getch ( ) . x4 . y4 = y4 + ty2 .rectangle ( x1 . y1 . closegraph ( ) . y4 ) . y1 = y1 + ty2 . y1 . printf ( “ Enter the value ” ) . scanf ( “ %d %d” . } INPUT Enter the End Points 90 80 OUTPUT INPUT Enter the value 30 40 OUTPUT . getch ( ) . x1 = x1 + tx2 . y4 ) . rectangle ( x1 .

y2=v2+floor(((float)(y2-w2)*sy)+0. v3=550. int gd=DETECT.y2. line(x1.x2.h> #include<conio.y1. w4=465.v3.h> main() { float sx.&y3). w3=635.&y2.5).w2. initgraph(&gd. x1=v1+floor(((float)(x1-w1)*sx)+0.v3.y2. y3=v2+floor(((float)(y3-w2)*sy)+0."C:/tc/bgi"). int w1.v4.x3.w3. w2=5.x3.x2.gm.v2. getch(). sx=(float)(v3-v1)/(w3-w1).y3\n").x4.5). rectangle(w1. v1=425.&x1.y2.&gm.y1. rectangle(v1. v4=250.y2).w3.h> #include<graphics.w4).x2.w2.x3.y3).5).v4).Window to view-port mapping Program:- #include<stdio. cleardevice(). sy=(float)(v4-v2)/(w4-w2).&x2.&x3.w4.v2.h> #include<math. w1=5.sy. x3=v1+floor(((float)(x3-w1)*sx)+0.v1. y1=v2+floor(((float)(y1-w2)*sy)+0.y3. .&y1.y4.x1.5). scanf("%d%d%d%d%d%d". x2=v1+floor(((float)(x2-w1)*sx)+0. printf("Enter the Co-ordinates x1.5). line(x2. v2=75.5).y1.

line(x2.y1).y3. line(x3. getch().x3.x2.y1. } Output of the window View Port CS1355-Graphics and Multimedia Lab .y2.line(x1.y2).x1.y3). return 0.

sy=y2-y1 Step 7: If dy>dx then interchange the values of dx and dy and assign exch=1 Step 8: Compute p=2xdy-dx Step 9: Put a pixel on(x.the video driver to be used (gd).EX. iii). Syntax Initgraph(gd. y=y1.the path name.the graphics mode (gm). p=p-2xdx Step 12: Compute p=p+2xdy Step 13: Do steps (9) t0 (12) for dx times Step 14: Stop . y2) Syntax: line (x1.gm. ii). FUNCTIONS USED: Line () The function line () is used to draw a line from(x1. y1) to (x2. NO. y1) &(x2. 1(A) DATE: BRESENHAM’S LINE DRAWING AIM: To implement Bresenham’s line drawing Algorithm for drawing lines.y2) initgraph(). Step 4: Compute dx=x2-x1 Step 5: Compute dy=y2-y1 Step 6: Assign sx=x2-x1.y1. y2) Step 3: Assign x=x1.y) Step 10: If exch=1. y=sy else x=x+sx Step 11: If p>0 and exch =1. x=x+sx else y=y+sy.x2. This function takes thee arguments and they are i).path) ALGORITHM: Step 1: Start Step 2: Get the values of the end points as(x1.

i. sx=signs(x2-x1). void bres_line(int. cin>>y1. cin>>x2.int y1. } void bres_line(int x1. } p=2*dy-dx. cout<<"enter starting value of X-Axis----->". int x1. dx=abs(x1-x2).PROGRAM: #include<iostream. for(i=0.i<=dx.sx.y.int. initgraph(&gd. x=x1.h> int signs(int m). bres_line(x1.int x2. closegraph().int.h> #include<conio.x2.15).sy. void main() { int gd=DETECT.x2.temp.h> #include<math. cin>>x1. dy=temp.dy.h> #include<graphics.int y2) { int x. sy=signs(y2-y1). getch(). y=y1.y. if(dy>dx) { temp=dx.y1.gm.y2).exch=0.&gm. cout<<"enter starting value of Y-Axis----->". exch=1.int). dy=abs(y1-y2). .p."").y2. dx=dy.y1.i++) {putpixel(x. cout<<"enter ending value of y-Axis----->". cout<<"enter ending value of X-Axis----->".dx. cin>>y2.

else y+=sy.p=p-2*dx. } INPUT: Enter starting value of X-Axis----->100 Enter starting value of Y-Axis----->100 Enter ending value of X-Axis----->200 Enter ending value of Y-Axis----->200 OUTPUT: RESULT: Thus the program is executed and verified. else if(m>0) return(1). .if(exch==1) y+=sy.} p=p+2*dy. } } int signs(int m) { if(m<0) return(-1). else return(0). else x+=sx. if(p>=0) { if(exch==1) x+=sx.

the video driver to be used (gd).EX.gm.y.the graphics mode (gm).the path name. Syntax: Initgraph(gd. FUNCTIONS USED: Circle() The function circle() is used to draw a circle using(x.path) Putpixel () The function putpixel() is used to place a pixel at particular coordinate Syntax: Putpixel(x.y.y) as centre point.color) ALGORITHM: . Syntax: circle (x. NO. ii). This function takes thee arguments and they are i).radius) initgraph(). iii). 1(B) DATE: CIRCLE DRAWING AIM: To write a program to draw a circle using Bresenham’s circle drawing Algorithm.

Step 13: Put a pixel on (xc+y. 15).yc).p=p+4x+6 else p=p+10+4(x-y) and y=y-1 Step 6: Increment x by 1 Step 7: Do steps (9) to (16) Step 8: Repeat steps (5) to (9) until x<=y Step 9: Put a pixel on (xc+x.yc+y. Step 16: Put a pixel on (xc-y.yc+x. Step 11: Put a pixel on (xc-x.15). yc-y. yc-x. 15). Step 12: Put a pixel on (xc-x. Step14: Put a pixel on (xc+y.Step 1: Start Step 2: Get the center point as (xc. Step 15: Put a pixel on (xc-y.15). Step 10: Put a pixel on (xc+x. yc+x.get the radius as r.yc-y. Step 3: Assign y=r.15). Step 17: Stop PROGRAM: .yc+y. 15).15).x=0 Step 4: Calculate p=3-2r Step 5: If p<0. 15). yc-x.

int. x=0.h> void my_circle(int.#include<iostream.p.int). cout<<"enter radius----->". initgraph(&gd.yc+y. cin>>xc.""). x=x+1. my_circle(xc. } plot(xc.15). cout<<"enter Y-Axis----->".int).gm.yc. cout<<"enter X-Axis----->".r. void main() { int gd=DETECT.int x. } } void plot(int xc.r). cin>>r.int.15). void plot(int.yc.y).yc.h> #include<conio.yc+y.h> #include<math.&gm. putpixel(xc-x. y=y-1. getch(). p=3-2*r. y=r.y. else { p=p+10+4*(x-y). while(x<=y) { if(p<0) p=p+(4*x+6). cin>>yc.int y) { putpixel(xc+x. int xc.h> #include<graphics. } void my_circle(int xc. closegraph(). putpixel(xc+x.yc-y.int yc. .int yc.int.15).x.int r) { int x.

putpixel(xc-y.yc+x.yc-x.15).15). putpixel(xc+y. putpixel(xc-y.15).15). } INPUT: Enter X-Axis----->:100 Enter Y-Axis----->:200 Enter radius----->: 40 OUTPUT: : RESULT: Thus the program is executed and verified. .yc+x.15). putpixel(xc+y.yc-x.putpixel(xc-x.yc-y.

r2x r2y . Algorithm Step 1: Input radius rx. starting at k = 0.2r2xYk+1 + r2y With 2 r2yXk+1=2 r2yXk+ 2r2y 2r2xYk+1=2r2xYk. ry) Step 2: Calculate the initial values of the decision parameter in region 1 as P10 = r2y – r2x ry + 1/4 r2x Step 3: At each Xk position in region 1. 1(C) DATE: MIDPOINT ELLIPSE DRAWING ALGORITHM AIM To write a C / C++ program to draw an ellipse using midpoint ellipse algorithm.2r2x Step 4: Calculate the initial values of the decision parameter in region 2 as P20 = r2y(X0+1/2)2+ r2x(Y0 – 1)2. ry and ellipse center (Xc. NO.EX. Yk) and P1k+1 = P1k+2 r2yXk+1 + r2y Otherwise the next point is (Xk+1. Yk-1) and P1k+1 = P1k+2 r2yXk+1 . Yc) and obtain the first point on the circumference of a circle centered on the origin as (X0. Y0) = (0. the next point to plot is (Xk+1. perform the following test: If P1k < 0.

the video driver to be used (gd). Syntax: Initgraph(gd.2 r2yYk+1 + r2x Otherwise the next point is (Xk+1. Y) onto the circular path centered on (Xc. Yk-1) and P2k+1 = P2k . This function takes thee arguments and they are i).gm.path) . the next point to plot is (Xk.2 r2yXk+1 . Yk-1) and P2k+1 = P2k .Step 5: At each position starting at Yk position in region 2.2r2xYk+1 + r2x Step 6: Determine symmetry points in the other three octants Step 7: Move each pixel position(X.the path name.the graphics mode (gm). Yc) and plot the coordinate values as X = X + Xc Y = Y + Yc Step 8: Repeat steps for region 1 until 2 r2yX>=2 r2xY FUNCTIONS USED: initgraph(). iii). perform the following test: If P2k > 0. ii). starting at k = 0.

float x=0.i++) . cin>>r2.h> #include<math.Putpixel () The function putpixel() is used to place a pixel at particular coordinate Syntax: Putpixel(x."").h> #include<conio. cin>>r1. cin>>x1>>y1.r2=0.i<360.d.y1=0. Step 8: Put a pixel on(x. cout<<"enter the radius1:".y. for(i=0. y1) Step 3: Get the length of semi-major. semi-minor axes as r1 & r2 Step 4: Calculate t=pi/180 Step 5: Initialise i=0.h> void main() { int gd=DETECT.y=0.&gm.i.t. initgraph(&gd. y=y1+r2*cos(d).y) Step 9: Increment I by 1 Step 10: Repeat steps(6) to (9) until i<360 Step 11: Stop PROGRAM: #include<iostream. Step 6: Compute d=i*t Step 7: Compute x=x1+y1*sin(d).gm.color) ALGORITHM: Step 1: Start Step 2: Get the center point as(x1.x1=0. cout<<"enter the center co-or:".h> #include<graphics.r1=0. cout<<"enter radius2:".

y. closegraph(). x=x1+ceil(r1*sin(d)). y=y1+ceil(r2*cos(d)). } getch().{ t=3. d=i*t.15).14/180. } INPUT: Enter the center co-or:100 150 Enter the radius1:40 Enter radius2:20 OUTPUT: . putpixel(x.

.RESULT: Thus the program is executed and verified.

Start the program . close the graph and run the program. 7. 8. Include the various attributes of line.EX. 6. Call the initgraph() function 4. 3. circle and ellipse. stop the program. 5. Set color for the output primitives. . Algorithm: 1. Initialize the variables. 2. NO. Using Outtextxy() display the chosen particular primitives.CIRCLE & ELLIPSE ATTRIBUTES Aim: To write a C / C++ Program to display the various attributes of line. 2 DATE: IMPLEMENTATION OF LINE. circle and ellipse.

the graphics mode (gm). iii).charsize) Where font is the constant value or the font filename. This function takes thee arguments and they are i).gm. This function display a text message on upper left of the screen Syntax: Outtext(“message”). The function settextstyle() is used to change the style of the text.y1)to (x2. which makes the output to display in horizontal. ii). Syntax: Initgraph(gd.the path name.direction. FUNCTIONS USED: Line() The function line () is used to draw a line from(x1. charsize is the character size or magnification factor and it varies from 1 to 10. Syntax: Settextstyle(font. No.y2) Syntax: line (x1. Syntax: Setcolor(value of the color) Settextstyle().y2) initgraph(). or in vertical direction.x2. 5 DATE: COHEN-SUTHERLAND CLIPPING AIM: To implement Cohen-Sutherland clipping Algorithm.Ex.y1. This function changes the drawing colour. Outtext().the video driver to be used (gd).path) Setcolor(). . direction is the number either 0 or 1.

visibility display the clipped window only with lines inside the window class was displayed after clipping. Step 3: Using the function defined in class sulc. x2. Step 9: Using the object c. drawline.if the code value is zero the point is inside the window. Step 10: Using the function setcode.check the code to know the points inside or outside the window. ii). display the window before clipping. y2 of array type.ALGORITHM: Step 1: Create a class sulc with functions drawwindow. y1. Step 4: Using the function visibility i). Step 8: Get the value of two endpoints x1. Step 5: Using the function reset end point i). setcode. y1 and x2. ii). Step 2: Using the function line set the parameters to draw window. . if the code value for the line is outside the window. Step 6: Initialize the graphics functions Step 7: Declare the variables x1. visibility and reset endpoint.reset the endpoint to the boundary of the window. y2 to draw the line. setcode is used to save the line inside the window and to the line outside the window.

y>450) .y<100) ptemp.y>350) ptemp.p1. } void sulc::drawline(pt p1.code[1]='0'.code[0]='0'. line(450.350.pt p2). void sulc::drawwindow() { setcolor(WHITE).pt p2. int visibility(pt p1.y).150.h> #include<conio.x.100). if(p.350).350.h> typedef struct coord { int x.150. else ptemp.y.x. } pt sulc::setcode(pt p) { pt ptemp.p2. line(150.100.int c1).450. class sulc { public: void drawwindow().code[1]='1'.h> #include<stdlib. line(150. pt setcode(pt p). pt resetendpt(pt p1. char code[4].p2. line(450.PROGRAM: #include<iostream. }pt.pt p2). }.350). if(p. if(p.100.450. void drawline(pt p1.code[0]='1'.100).int c1) { setcolor(c1). else ptemp.y.pt p2.h> #include<graphics. line(p1.

x=x.code[i]==p2.x-p1.i.y.code[i]!='0')) flag=1.x).code[i])&&(p1.code[2]=='1')) { m=(float)(p2. } int sulc::visibility(pt p1.i<4.ptemp.k. temp. ptemp.x. } pt sulc::resetendpt(pt p1. return(ptemp). for(i=0. if(p1.code[3]=='1') x=150.i++) { if((p1.code[2]='1'.x=p.y<150) ptemp.i<4. for(i=0. if((p1. int x. k=(p1.code[i]=='1')) flag=0.y)/(p2.code[i].y-p1.flag=0.y=k.code[3]='1'. for(i=0. return(2). temp.y+(m*(x-p1.code[i]!='0')||(p2.code[3]='0'.y.pt p2) { pt temp. else ptemp.i++) temp. if(p.pt p2) { int i. . if(p1. else ptemp.i++) { if((p1.} if(flag==0) return(1).y=p.x))). } if(flag==0) return(0).code[3]=='1')||(p1.code[2]='0'.code[2]=='1') x=450.i<4.code[i]=p1. ptemp. float m.

code[i]=p1.i<n.x+(float)(y-p1.3).y<=350 &&temp. sulc c1.of lines:". int i.y-p1. outtext("before clipping"). for(i=0.v.code[1]=='1') y=350.0. c1.y1[10]. for(i=0.y>=100) return(temp).if(temp.&gm.y1):". cin>>x2[i]>>y2[i]. for(i=0.code[1]=='1')) { m=(float)(p2. settextstyle(4.y<=350 &&temp.x-p1.x).x2[10]. } else return(p1). k=(float)p1. temp. int x1[10].code[i].gm.drawwindow().i++) temp.code[0]=='1') y=100. if(p1. if((p1. } cleardevice(). cout<<"\n\n enter end-point2(x2.i<4.n. } if(p1.y2[10].ptemp. cin>>n.x=k. initgraph(&gd.code[0]=='1')||(p1.y)/(p2.0. settextstyle(0. outtext("cohen sutherland line clipping").i++) { cout<<"\n\n enter end-point1(x1.y=y.p2.i<n. pt p1.y)/m.4). cout<<"\n\n enter the no.i++) .y2):". if(temp. } void main() { int gd=DETECT. cin>>x1[i]>>y1[i]."").y>=100) return(temp). cleardevice(). temp.

x=x1[i]. p2=c1. c1.drawwindow(). p1=c1.p1).resetendpt(p1.drawwindow(). p2. settextstyle(0. outtext("after clipping"). case 2: p1=c1. break.y=y2[i].drawline(p1. c1. } getch().drawline(p1. v=c1.3).15). for(i=0. c1. p2=c1. closegraph(). } } getch().drawline(p1.p2). c1.x=x2[i].0.resetendpt(p2. break.15).p2.setcode(p2). case 1: c1. p2.visibility(p1.y=y2[i]. break. switch(v) { case 0: c1.drawwindow().y=y1[i].i++) { p2.p2.i<n. cleardevice(). } .p2).15).x=x2[i].setcode(p1).p2.{ p1. p2. p1.

of lines: 1 Enter end-point1(x1.INPUT: Enter the no.y1):30 40 Enter end-point1(x2.y2):300 400 OUTPUT: Before clipping After clipping .

.RESULT: Thus the program is executed and verified.

tx.ya. ya1[i]=ya[i]=ty. Step2:Declare the variables gd. Step5: Input the value of co-ordinate according to number of points. rotation.EX. Using switch statement selects the option to perform translation. scaling. Step3: Initialise the graphics function.path) ALGORITHM: Step1: Declare the variables xa.ry.add the translation vectors with the coordinates xa1[i]=xa[i]=tx.y1)to (x2.the video driver to be used (gd).n.y2) Syntax: line (x1.i. shearing.the graphics mode (gm).xa1. reflection and .gm. ii). Step6. Syntax: Initgraph(gd. rotation.ya1 of array type.yf.y2) initgraph(). shearing. Step4: Input the number of points.y1.ty. NO. scaling.op. Reflection FUNCTIONS USED: Line() The function line() is used to draw a line from(x1.xf. Step7: Translation: a).gm.rx. iii). : 3 DATE: AIM: 2D TRANSFORMATION To perform the 2D transformation such as translation. This function takes thee arguments and they are i).x2.input the translation vector b).the path name.

Step9: Scaling: a). display the object before and after scaling. calculate new coordinate point using formula xa1[i]=xf+(xa[i]-xf)*cos(theta)-(ya[i]-yf)*sin(theta). using the function line.display the object before reflection using the function line b). using the function line.calculate new coordinate point using formula xa1[i]=(xa[i]*sx+rx*(1-sx). e). display the object before and after shearing. input the rotation angle b). display the object after reflection using the function line Step12: Stop. using the function line.14)/180 c).if direction x xa1[i]=xa[i]+shx*(ya[i]-yref) ii). input the shear direction x or y i).display the object before and after rotation.input the scaling factor and reference point b).input the value of reference point d).otherwise ya1[i]=ya[i]+shy*(xa[i]-xref) iii). b). ya1 [i] = (ya[i]*sy+ry*(1-sy) c).display the object before and after translation. using formula theta=(theta*3. Step11: Reflection: a). Step10: Shearing: a). ya1[i]=yf+(xa[i]-xf)*sin(theta)-(ya[i]-yf)*cos(theta). Step8: Rotation a). .using the function line.input the shearing value and reference point.c).

tx.shy.&gm.translation\n2.i++) { .ty. for(i=0.h> #include<stdlib.xf.PROGRAM: #include<iostream.i++) { xa1[i]=xa[i]+tx.sy.i<n.yref.n.gm.yf. initgraph(&gd. cout<<"enter the no of points".i<n.exit". } do { cout<<"menu".shx. cin>>n.h> #include<graphics.ya[i].rotation\n3.sx.xref.shearing\n5. for(i=0.i++) { line(xa[i].ya[(i+1)%n]).h> #include<math."").op. switch(op) { case 1: cout<<"enter the translation vector".ry. } cout<<"after translation".ya1[10]. for(i=0. char d.scaling\n4. cin>>op.xa[10].i++) { cout<<"enter the coordinates"<<i+1.ya[10].rx.i. for(i=0.xa1[10]. cin>>xa[i]>>ya[i]. cout<<"\n1. cin>>tx>>ty.i<n. } cout<<"before translation".h> #include<conio.theta. gd=DETECT.h> void main() { int gd.xa[(i+1)%n].reflection\n6.i<n. ya1[i]=ya[i]+ty.

cin>>rx>>ry. case 2: cout<<"enter the rotation angle". ya1[i]=ya[i]*sy+ry*(1-sy).i<n. cleardevice().ya[i]. cin>>sx>>sy. } cout<<"after scaling". break.i<n.i++) { xa1[i]=xf+(xa[i]-xf)*cos(theta)-(ya[i]-yf)*sin(theta).i++) { line(xa[i]. } getch().ya[(i+1)%n]).14)/180.ya1[i]. } cout<<"before rotation".xa1[(i+1)%n]. ya1[i]=yf+(xa[i]-xf)*sin(theta)-(ya[i]-yf)*cos(theta).xa1[(i+1)%n]. cout<<"enter the reference points". cin>>xf>>yf. for(i=0. case 3: cout<<"enter the scaling factor". for(i=0. break. for(i=0. .ya1[(i+1)%n]).i++) { line(xa[i]. cout<<"enter the reference point". } cout<<"before scaling". } getch(). } cout<<"after rotation".i<n.ya1[i].i<n. for(i=0.ya1[(i+1)%n]). cleardevice(). for(i=0. theta=(theta*3.ya[(i+1)%n]).ya[i].xa[(i+1)%n].line(xa1[i]. cin>>theta.i<n.i++) { xa1[i]=xa[i]*sx+rx*(1-sx).i++) { line(xa1[i].xa[(i+1)%n].

i++) { line(xa[i]. cleardevice().ya[(i+1)%n]). if(d=='x') { for(i=0.i++) { line(xa1[i].ya1[i].ya[(i+1)%n]. for(i=0. } getch(). break. cout<<"enter the shear direction x or y".ya1[(i+1)%n]).ya[i].ya[i].xa1[(i+1)%n].i++) { line(xa[i].for(i=0. case 4: cout<<"enter the shear value". } } cout<<"before shearing". for(i=0. } getch().ya1[(i+1)%n]). break.i++) { line(ya[i].xa[(i+1)%n].xa1[(i+1)%n]. cin>>xref>>yref.i++) { xa1[i]=xa[i]+shx*(ya[i]-yref).ya1[i].xa[(i+1)%n]).i++) { line(xa1[i].i<n.i<n. ya1[i]=ya[i]. for(i=0. cin>>shx>>shy. } cout<<"after reflection".xa[i]. } .i<n. } cout<<"after shearing".i<n.i<n. cin>>d. for(i=0.ya[(i+1)%n]). case 5: cout<<"before reflection".i<n. cleardevice(). cout<<"enter the reference point".xa[(i+1)%n].

rotation 3.reflection 6. cleardevice(). break.exit1 enter the translation vector:30 40 Before translation After Translation menu 1. break. rotation 3. } INPUT & OUTPUT: enter the no of points:3 enter the coordinates 1:50 150 enter the coordinates 2:50 50 enter the coordinates 3:75 150 menu 1. translation 2. translation 2.getch().shearing 5. } }while(op!=6). case 6: exit(0). scaling . scaling 4.

shearing 5. rotation 3.reflection 6.shearing 5. translation 2.exit 3 Enter the scaling factor: 3 4 Enter the reference points: 30 40 Before scaling after scaling . scaling 4.4.exit 2 enter the rotation angle:40 enter the reference points:100 100 before rotation after rotation menu 1.reflection 6.

shearing 5. translation 2. rotation 3. rotation 3. scaling 4. translation 2.exit 4 Enter the shear value: 3 4 Enter the reference point: 20 30 Enter the shear direction x or y: X Before shearing After shearing menu 1. scaling 4.reflection .shearing 5.reflection 6.menu 1.

6. rotation 3. scaling 4.exit 6 RESULT: Thus the program is executed and verified.shearing 5.reflection 6. .exit 5 Before reflection after reflection menu 1. translation 2.

x2. 7 DATE: 3D.sy.tz. Step 2: Use the function draw cube to draw a cube using eight points by means of functions line.ty. y1. Step 9: Using switch operation selects the operation to perform translation.the graphics mode (gm).x.zf. Step 10: Translation a). rotation and scaling.z.path) ALGORITHM: Step 1: Create a class cube with function draw cube.calculate points using formula scaling.y2) Syntax: line (x1. Step 5: Initialize graphics functions.the path name.y1)to (x2.tx.sz. x3.input the translation vectortx. Step 8: Create an object to call the function.ch. y2. rotation.lz+xy.y2) initgraph().TRANSFORMATION AIM: To perform 3D transformations such as translation. FUNCTIONS USED: Line() The function line () is used to draw a line from(x1. in array type which of data type int. y3. iii). Step 4:Declare the variables theta. This function takes thee arguments and they are i).op.the video driver to be used (gd).sx. .y.y1.x2.gm. b).EX.ty. Step 3: Declare the variables x1. ii). Step 6: Input the first point in the cube. Syntax: Initgraph(gd. NO.i. Step 7: Input the size of the edge.

input the direction in x.14)/180 c).y.using the function line. Step12: Scaling: a). y3 [i] =yf+ (y1[i]*sy+yf*(1-sy) . x3[i]=z1[i]*sin(theta)-x1[i]*cos(theta). x3[i]=x1[i]*cos(theta)-y1[i]*sin(theta).calculate the points using the formula x4[i]=x3[i]+z3[i]/2 y4[i]=y3[i]+z3[i]/2 f).z axis d). using formula theta=(theta*3. input the rotation angle b). y3[i]=y1[i]. y3[i]=y1[i]+ty z3[i]=z1[i]+tz. y3[i]=y1[i]*sin(theta)-z1[i]*cos(theta). if the direction is along yaxis. z3[i]=z1[i]*cos(theta)-x1[i]*sin(theta). x4[i]=x3[i]+z3[i]/2 y4[i]=y3[i]+z3[i]/2 c). z3[i]=z1[i]. y3[i]=y1[i]*cos(theta)-z1[i]*sin(theta).display the object before and after rotation.input the scaling factor and reference point b).x3[i]=x1[i]+tx.calculate coordinates point using formula x3[i]=xf+(x1[i]*sx+xf*(1-sx). if the direction is along z axis. Step11: Rotation: a). e). using the function line. display the object before and after translation. y3[i]=x1[i]*sin(theta)-y1[i]*cos(theta). if the direction is along x axis. x3[i]=x1[i].

h> #include<conio. line(x1[4].y1[i]. using the function line.i<8.i++) { if(i<7) line(x1[i].h> #include<math.y1[i+1]).x1[3].y1[3]).x1[7]. void main() { .h> #include<stdlib. } for(i=4. PROGRAM: #include<iostream.i++) { if(i<3) line(x1[i]. } } }. line(x1[0].y1[4]. calculate the points using the formula x4[i]=x3[i]+z3[i]/2 y4[i]=y3[i]+z3[i]/2 d). display the object before and after scaling.y1[i+4]).i++) { line(x1[i].z3 [i] =zf+ (z1[i]*sz+zf*(1-sz) c).x1[i+4].i<4.y1[i+1]).y1[7]).h> class cube { public: void drawcube(int x1[].y1[0]. Step13: Stop.y1[i].i<4.x1[i+1].h> #include<graphics.y1[i].x1[i+1]. } for(i=0. for(i=0.int y1[]) { int i.

i<8.scaling\n4. x1[0]=x1[3]=x.int i. cout<<"enter the choice:".exit\n". y1[0]=y1[1]=y. cin>>x>>y>>z. cleardevice().ty. switch(ch) { case 1: cout<<"enter the translation vector:". x. getch(). y1[4]=y1[5]=y.x2[8].y. cin>>tx>>ty>>tz.i++) . int mode. x1[4]=x1[7]=x. for(i=0.z. } cube c.yf.size.y4[8]. cout<<"enter the size of the edge:".ch. x1[5]=x1[6]=x+size.tx. do { cout<<"menu"<<endl.y1[8].zf.tz. cin>>size.sy.translation\n2. cout<<"enter the points on the cube:".sz.i<8.z1[8].x4[8].x3[8]. y3[i]=y1[i]+ty.""). x1[1]=x1[2]=x+size.xf.&mode. for(i=0. y1[2]=y1[3]=y+size. z3[i]=z1[i]+tz.y2[8]. int driver=DETECT.y3[8].z3[8].rotation\n3. cout<<"\n1. y1[6]=y1[7]=y+size.i++) { x2[i]=x1[i]+z1[i]/2. } for(i=0. y2[i]=y1[i]+z1[i]/2.op.sx.i<8.theta. z1[4]=z1[5]=z1[6]=z1[7]=z-size. initgraph(&driver. z1[1]=z1[2]=z1[3]=z1[0]=z .i++) { x3[i]=x1[i]+tx.x1[8]. cin>>ch.

getch(). c. getch().i<8.drawcube(x2. case 2: cout<<"enter the rotation angle:".i++) { x3[i]=x1[i]. cleardevice().i++) .i<8.i++) { y3[i]=y1[i]. cin>>theta. cout<<"before translation". cout<<"after translation".i<8. } cleardevice(). z3[i]=y1[i]*sin(theta)+z1[i]*cos(theta). cin>>op.{ x4[i]=x3[i]+z3[i]/2.rotation about x axis"<<endl<<"2. cout<<"1. theta=(theta*3. } } else if(op==3) { for(i=0.rotation about z axis". x3[i]=z1[i]*cos(theta)-x1[i]*sin(theta).rotation about y axis"<<endl<<"3. y4[i]=y3[i]+z3[i]/2. } } else if(op==2) { for(i=0. cleardevice().14)/180. x3[i]=z1[i]*sin(theta)+x1[i]*cos(theta).drawcube(x4. if(op==1) { for(i=0. y3[i]=y1[i]*cos(theta)-z1[i]*sin(theta). break. c. cout<<"enter the direction"<<endl.y2).y4).

y3[i]=x1[i]*sin(theta)+y1[i]*cos(theta). .i++) { x3[i]=xf+(x1[i]*sx)+xf*(1-sx). for(i=0. c.y4). y4[i]=y3[i]+z3[i]/2.y2). cout<<"after rotation". cleardevice().i<8.drawcube(x2. cin>>xf>>yf>>zf. y4[i]=y3[i]+z3[i]/2.y2). cout<<"before scaling". for(i=0. cleardevice().i<8. break.i++) { x4[i]=x3[i]+z3[i]/2.i++) { x4[i]=x3[i]+z3[i]/2. z3[i]=zf+(z1[i]*sz)+zf*(1-sz).drawcube(x4. case 3: cout<<"enter the scaling factor:". } cleardevice().{ z3[i]=z1[i]. } for(i=0. x3[i]=x1[i]*cos(theta)-y1[i]*sin(theta). } } else cout<<"enter correct option". getch(). c. cin>>sx>>sy>>sz. getch(). c. cout<<"before rotation". cleardevice(). getch().i<8. cout<<"enter the reference point:". } cleardevice(). y3[i]=yf+(y1[i]*sy)+yf*(1-sy).drawcube(x2.

15 Before translation After translation RESULT: Thus the program is executed and verified. break. . cleardevice().drawcube(x4. rotation 3.cout<<"after scaling". } INPUT& OUTPUT: Enter the point in the cube: 100 100 100 Enter the size of the edge: 50 Menu 1. c. getch(). scaling 4.y4). getch().10. break. translation 2. } } while(op!=4). case 4: exit(0). exit Enter the choice:1 Enter the translation vector: 5.

EX. NO. 10 DATE:

BASIC OPERATION ON IMAGES
AIM: To perform basic operation on images using Adobe Photoshop. PROCEDURE: Feathering:  Select the elliptical marques tool on duplicate  Right click on area and select feather  Set the feather radius. Filtering:       From filtering menu select B From select radial Blue and motion Blue. Set the angle and distance. From filter menu, select liquefy which change the shape of flower. From filter menu, select distart and then select glass. Set distortion, smoothness and scaling for the object Selection Tool: This is used to select a portion of image and paste it in document. Lasso Tool: This is used to select the image in its shape. Text Tool: This is used to add text along with image. Blur Tool: This is used to change the image by its color, shape and dimension. Painting Tool:

The powerful Photoshop paint engine lets you to simulate traditional painting technique include charcoal, pastel and wet or dry brush effects.

Drawing Tool: Draw resolution independent vector shapes instantly with the line, rectangle, ellipse, polygon and custom shape tool. Transformation Tools: Scale, rotate, distor or skew engine easily. Apply the 3D transform filter to simulate 3D effects such as tables and boxes. Using the liquefy command to interactively push, pull, bucker or bloat an image Sponge Tool: The sponge tool subtly changes the color saturation of an area.in gray scale mode,the tool increases or decreases contrast by moving gray level away from or towards the middle gray. Marques tools: The marques tools let you to select rectangle, ellipse, rounded rectangular and 1-pixel rows and columns by default, a selection border is dragged from its corner. Pen Tools: The pen tools used in conjunction with the shape tools to create complex shapes.

RESULT: Thus the program is executed and verified.

Source code programming #include <stdio.&x[i]. .int d) { int i.i<fs. printf("no of sides (front view only) : ").k=0.i).int y[20]. scanf("%d".z.3D TRANSFORMATIONS 3 dimensional transformation it has three axis x. initgraph(&gd.&gm. and Tz. } k=d.i.y[i+1]+ty-k).int x[20].""). for(j=0.fs.h> #include<graphics. The translation can be performed by changing the sign of the translation components Tx.y[i]+ty-d).i++) { line(x[i]+tx.h> void draw3d(int fs.x[i+1]+tx+k.y[i]+ty-k.ty=0.y%d)".y[i]+ty.Scaling.j++) { for(i=0.Depandting upon there coordinate it will perform there Translation . void draw3d(int fs.x[i]+tx+d.i<fs.int x[20].y[0]+ty-k).gm.h> #include <stdlib.int y[20]. else line(x[i]+tx+k.i++) { if(i!=fs-1) line(x[i]+tx+k. } printf("Depth :").Rotaion.x[0]+tx+k.y[i]+ty-k.i<fs.j.y.y[20].tx=0. Ty. } for(i=0.int d).int ty.&y[i]).d. for(i=0.int tx.i.&fs).i++) { printf("(x%d. int x[20].int ty. printf("co-ordinates : ").j<2.h> #include<conio. scanf("%d%d".int tx. } } void main() { int gd=DETECT.

Rotation 3.d). getch().tx. draw3d(fs. draw3d(fs.Translation 2.y.d).y)"). } 3D TRANSFORMATION in c program computer graphics lab --------------------------------------------------1.y.scanf("%d". printf("translation (x.Scaling 4.&tx.tx.ty.x.&ty).&d).x.Exit Enter your Choice :1 Enter the points 01: 288 Enter the points 10: 288 Enter the points 10: 258 Enter the points 11: 288 Enter the points 20: 258 Enter the points 21: 258 Enter the points 30: 288 .ty. scanf("%d%d".

.

h> #include<dos.i>=1."").h> main() { clrscr(). cleardevice().mode. delay(10).h> #include<graphics. delay(10). #include<iostream. it checks for the keyboard keystroke. int driver. initgraph(&driver. Here in this program kbhit() function is //used. } } . while (!kbhit()) { for (int i=1.i<=400.&mode.// C++ program to draw and move a circle on the screen (up and down). cleardevice().h> #include<conio.10).i.i. driver = DETECT. i--) { circle(300. i++) { circle(300.10). } for ( i=400. when hit any key from the //keyboard circle will stop moving and program ends if you don't press any key from the keyboard circle //will move on the screen infinite times.

Many time we run a graphics program and often a BGI error occurres.Delay function will slow down the process to print the concentric circles on the screen."C:\TC\BGI").h> main() { clrscr().i=i+5) { circle(100.h> #include<dos. int driver. If you don't know the path of BGI files then find *.h header file is used the function initgraph() will convert text mode to graphics mode and closegraph() again converts graphics screen into text mode. Here For loop will give radius (i) to circle function and each time it will increment by 5. } getch(). initgraph(&driver. Give correct path of BGI files in initgraph() function.i<=50.i). For initgraph() function and circle() function graphics.C++ program to generate concentric circles. If the graphics driver files are other than this directory than type that path as a third parameter in initgraph() function. for(int i=1. } . #include<iostream.BGI files by find option in winodws and you will be known the correct path. It is related to this path of BGI files. closegraph(). driver = DETECT.h> #include<graphics.100.In initgraph function third parameter is path of BGI files where graphics files are located.h> #include<conio. delay(100).&mode.mode.

.

.

e) Parallel lines in the object that are not parallel to the plane are projected into converging lines.z) in viewing coordinates is transformed to projection coordinates xp=x and yp=y. Instead.Define frame? One of the shape photographs that a film or video is made of is known as frame. QUESTIONS 1. then any point (x. What is tweening? It is the process. 6. they all converge at a single point called Projection reference point.Ex NO 9 DATE: Drawing three dimensional objects and Scenes AIM: To draw 3D objects and scenes ALGORITHM: 1. d) The projection is perpendicular to the view plane e) If the view plane is placed at position Z1 along the z axis . What you mean by parallel projection? Parallel projection is one in which z coordinates is discarded and parallel lines from each vertex on the object are extended until they intersect the view plane. 2.Perspective Projection a) Enter the boundary coordinates of the object. 2. c) The projected view is obtained by transforming points along projection lines that meet at the projection reference point. 3. c) Align the projection plane so that it intersects each coordinate axis in which the object is defined at the same distance from the origin. What do you mean by Perspective projection? Perspective projection is one in which the lines of projection are not parallel. 5. and that change shape from frame to frame. Parallel Projection a) Enter the boundary coordinates of the object. d) Calculate the intersection of the projection lines with the view plane. b) Define the projection reference point and thus the direction of the projection lines. the lines of projection are not parallel. they all converge at a single point called the center of projection. What is Projection reference point? In Perspective projection. 4.y. b) Define the direction of the projection line. What is key frame? One of the shape photographs that a film or video is made of the shape of an object is known initially and for a small no of other frames called keyframe . f) Parallel lines that are parallel to the view plane will be projected as parallel lines. which is applicable to animation objects defined by a sequence of points. Instead.

(ii) Frequency The frequency of the sound is the reciprocal value of the period. (ii) Set: The width of the letters is called the set and is fixed relative to the point-size."[1] a property called self-similarity. 3. As the process is iterated infinite number of times.What is a fractal image Fractal is "a rough or fragmented geometric shape that can be split into parts.The center of the 4 triangles is removed 4. ALGORITHM: The sierpinski triangle-A fractal image 1.5850 QUESTIONS 1. It represents the number of period s in a second and it is measured in Hertz (Hz) or cycles per second. The amplitude of a sound is a measure .Each triangle is divided into 4 smaller upside down triangles 3. 2. Define the following: (i) X-height (ii) Set (iii) Kerning X-height: The X-height is the measurement of the height of the character X.EX NO 10 Generating Fractal images AIM: To generate fractal images. During the vibration pressure variation are created in the air surrounding it. (iii) Amplitude CS76 ©Einstein College of Engineering Page 25 of 26 A sound also has amplitude. Define the following respective to sound: (i) Waveform (ii) Frequency (iii) Amplitude i) Waveform Sound is produced by the vibration of matter. The pattern of the oscillation is called a waveform. each of which is (at least approximately) a reduced-size copy of the whole.After closer examination magnification factor is 2.The sierpinski Triangle is created by infinite removals 2. (iii) Kerning: The spaces between letters in one world (tracking) can be adjusted in a process called kerning. in other words of the middle bit without any ascender or descender.With each magnification there are 3 divisions of a triangle Dimension D=ln(3)/ln(2) D=1. the total area of the set goes to infinity as the size of the each new triangle goes to zero 5. 6.

4. An 8-bit quantization yields 256 possible values. 16-bit CD-qudra quantization results in over 65536 values.of the displacement of the air pressure wave from its. Define quantization (or) resolution? The resolution (or) quantization of a sample value depends on the number of bits used in measuring the height of the waveform. What are the types of sound objects that can be used in multimedia production? There are four types of sound objects that can be used in multimedia production: _ Waveform audio _ MIDI sound tracks _ Compact disc (CD) audio _ MP3 files 6. 5.What are the applications of fractal image? Produces visual effect. Hence used in film industry . or quiescent state.

} } } return 1. int ad. typedef struct{ float x. function to multiply two matrix@ .y.k++){ c[i][j]+=a[i][k]*b[k][j]. int *a. /*@ */ int matrixmul(float **a.h> #include<math.h> #define degree 3.z.j++){ c[i][j]=0. for(k=0.zaxis.j. } point3.float **c.h> #include<graphics.y.int n){ for(i=0. } typedef struct{ float x.i<n.j<4.float **b.k.i++){ for(j=0.yaxis./*@@ program to translate rotate and scale an object in three dimention @ */ #include<stdio.14/180 int xaxis.h> #include<conio. int i.k<4.

//xaxis } /*@ @ */ void draw(point2 *p2.int n){ float tx.0). printf("Enter value of tx and ty and tz : "). p1.y.x.ty.y.ad. function to transalate the object in three d about origin@ line(xaxis+p2[i].point3 *p3.y+(p.y=p.y. } } } /*@ */ void transalate(float **a.z)*(cos(degree*225)). return p1.y).x+(p.//yaxis/ line(x.j<p3[i].a[j]-1].yaxis-p2[i].//zaxis line(x.y.y+y*sin(degree*45)).} point2.int n){ for(i=0.x.yaxisfunction to draw the object in three d function to draw all three axis@ . point2 point(point3 p){ point2 p1.y).x. line(x.y=getmaxy()/2.x-y*cos(degree*45).i<n.z)*(sin(degree*225)).a[j]-1]. } /*@ */ void drawaxis(){ int x=getmaxx()/2.j++){ p2[p3[i].i++){ for(j=0.x=p. p1.float **b.getmaxx().xaxis+p2[p3[i].float **c.tz.

b[3][1]=ty. b[3][0]=tx. b[0][3]=b[1][3]=b[2][3]=0.. b[1][1]=cos(theta*degree). scanf("%d".&tz).n).. b[0][2]=0.. b[0][0]=b[1][1]=b[2][2]=b[3][3]=1.scanf("%f%f%f". b[0][1]=0. switch(choice){ case 1: b[0][0]=1. b[2][2]=cos(theta*degree). or 3 for z scanf("%d". matrixmul(a. choice. b[3][0]=0. b[0][1]=b[0][2]=b[1][0]=b[1][2]=b[0][3]=b[1][3]=b[2][3]=b[2][0]=b[2][1]=0. b[2][1]=sin(theta*degree).&ty.&tx.&theta). b[3][3]=1. b[3][1]=0. b[3][2]=tz. b[1][0]=0. b[1][2]=-sin(theta*degree). :").. printf("Enter your choice-----: 1 for x.int n){ int theta.&choice). } /*@ */ function to rotate the object in three d about origin@ void rotate(float **a.float **c.c.float **b. . printf("Enter value of angle : ").b. b[2][0]=0.2 for y.

b[3][2]=0."). b[0][2]=0.b.. default:printf("wrong choice. b[2][1]=0.. break. } . b[1][0]=0. } matrixmul(a. case 3: b[0][0]=cos(theta*degree). b[0][1]=-sin(theta*degree).. b[2][0]=0. b[1][1]=cos(theta*degree)..break. b[2][2]=cos(theta*degree). break. b[1][2]=0. break. b[3][1]=0. b[3][1]=0.. b[0][2]=sin(theta*degree). b[3][0]=0.. b[3][0]=0.b[3][2]=0.. b[3][2]=0. b[2][2]=1. b[0][1]=0. b[1][0]=sin(theta*degree).. b[2][1]=0. b[1][1]=1. b[1][2]=0. b[2][0]=-sin(theta*degree).c.n). case 2: b[0][0]=cos(theta*degree).

i++){ p3a[i]. matrixmul(a.ad. p3a[i].int n){ float sx. .choice=1.b. p3a[i].y=p3b[i]. float **a.float **b.a[j]=p3b[i]. b[0][2]=b[1][2]=b[2][0]=b[2][1]=b[0][3]=b[1][3]=b[2][3]=0.float **c. b[3][3]=1. b[0][1]=0.&sy.n=2. b[2][2]=sz.a[j].&sx.c.**b.sy.y.x. printf("Enter scaling factors sx .sy and sz : "). p3a[i].i<n.sz.ad.n).z.j<p3b[i].ad=p3b[i]. b[1][0]=0. scanf("%f%f%f"./*@ function for scaling @ */ void scale(float **a. } void copy(point3 *p3a.**c.int n){ for(i=0.&sz).point3 *p3b. } } return. for(j=0.j++){ p3a[i].z=p3b[i].x=p3b[i]. b[1][1]=sy. } /*@ MAIN PROGRAM @ */ void main(){ int gd=DETECT.gm. b[0][0]=sx.

} /*@memory allocation to stuctures @ */ p2=(point2 *)malloc(n*sizeof(point2)).z).ad*sizeof(int)). scanf("%f%f%f".ad. /*@ memory allocation to a b c matrices@ */ a=(float**)malloc(n*sizeof(float*)).i++){ a[i]=(float*)malloc(4*sizeof(float)).&p3[i]. scanf("%d".&p3[i].&p3[i]. :").&p3[i]. //@ Taking input coordinates and index of their adjacent vertices@ printf("Enter the coordinates of vertices for(i=0. for(i=0. p3=(point3 *)malloc(n*sizeof(point3)). p3[i]. point3 *p3.*Startp3. b=(float**)malloc(4*sizeof(float*)).j+1).i++){ printf("(x%d. . c[i]=(float*)malloc(4*sizeof(float)). printf("Enter index number\n").point2 *p2.a=(int *)malloc(p3[i]. scanf("%d".j<p3[i]. printf("Enter the number of adjacent vertices :").z%d) :"./*Startp3 has initial value*/ printf("Enter the number of vertices :"). if(i<4) b[i]=(float*)malloc(4*sizeof(float)).i<n.i+1).y. c=(float**)malloc(n*sizeof(float*)). for(j=0.y%d. Startp3=(point3 *)malloc(n*sizeof(point3)).ad).j++){ printf("%d :".i+1.x.i+1.&n).i<n.

z). printf("Enter your choice :\n").i++){ printf("\n %5. } getch().y).i<n.&gm. } p2[i]=point(p3[i]). //@@@ //Showing values in p2 //@@@@@@ for(i=0.p3[i].i<n.2f".".i++){ printf("\n %5. while(choice!=0){ //@ //showing the object //@@@ drawaxis().x. initgraph(&gd.n).p3. } printf("\n\n").p3. xaxis=getmaxx()/2. .2f%5.&p3[i].scanf("%d". } copy(Startp3./bgi").p3[i].p2[i].n). //@ //Showing values in p3 //@ for(i=0.x.a[j]).y.p2[i].2f%5. yaxis=getmaxy()/2. draw(p2.2f%5.2f"..p3[i].

case 0:printf("Bye Bye"). a[i][2]=p3[i].n).&gm. Enter :").c.b. case 2:rotate(a. break.y. } switch(choice){ //@@@ case 1:transalate(a. scanf("%d". case 3:scale(a. break. } "). default:printf("Wrong choice./bgi"). .i++){ a[i][0]=p3[i]. break. break. initgraph(&gd.b.c. case 8:printf("Reset done.").z.&choice). a[i][1]=p3[i]. break.n). closegraph().printf(" 1 for transalate\n2 for rotate\n3 for scale \n 8 for reset the values\n 0 for exit .\n break. a[i][3]=1.x. clrscr().b. //@@ //making matrix a i.i<n..e ph //@@ for(i=0.n).c.".

x=c[i][0].n). //@@ //showing the transalated object //@@ drawaxis(). } getch().Startp3.i++){ p3[i]. draw(p2.n).//@@ //converting matrix c i. } . for(i=0. } cleardevice(). getch().e.p3. } closegraph(). ph` in p3 then p2 //@ for(i=0.z=c[i][2]. } /* @ Reset the value @ */ if(choice==8){ copy(p3.i<n. p3[i]. p3[i]. p2[i]=point(p3[i]).i<n.y=c[i][1]. printf("Press Enter to continue\n").i++){ p2[i]=point(p3[i]).

Additional Exercises:Text Animation Program Using C Programming #include<stdio. setcolor(15).&tx.k++) { cleardevice(). closegraph().ty.int.&ty).int sy.text). else steps=abs(dy). initgraph(&gd. printf("Enter the text:"). printf("Enter the initial points:").""). yin=dy/(float)steps.y=sy. getch().k.h> #include<conio.char text[50]) { int dx=tx-sx. if(abs(dx)>abs(dy)) steps=abs(dy). getch().int tx.h> #define round(val) (int)(val+0.h> #include<graphics.&gm.int ty.ty. move(sx.&sx.sy.&sy). scanf("%d%d".tx.sy. xin=dx/(float)steps.text). scanf("%d%d".round(y).h> #include<math.char[]). y+=yin. void move(int.k<steps.text). delay(50).int. } } . printf("Enter the TARGET points:").5) void main() { int gd=DETECT. outtextxy(round(x).gm. } void move(int sx. x+=xin.sx. float xin.yin.text). char text[50].sy.tx. scanf("%s".dy=ty-sy.int.x=sx.steps. outtextxy(sx. for(k=0.

  . 35:990749. :83901:3.3/.943. .943 . 909.38.190797.943  $905#49.909.94330 /85.904-0. :831472:.9-01470.30 .

909054398:83901472:. ( 83 909.9438.  190/70. ( . 35:990/70.48 909. (( (.  (( 83 909.48 909. ( 83 909..48 909.9438.  .48 909.:.43.8   ((  (( .43. ( 83 909.8   ((  (( ..48 909.  (( 83 909. ( .8 / 190/70. ( .9438.  190/70.  (( 83 909.8   ((  (( .48 909.9433  .43.  0 .

 (( (.

31..3/7010703..:.9085439:831472:.94330 /85.943  $905$.1907749.3 . (1 ( 8 1  8  (1  ( 8 1  8  .447/3. 1 :83901:3. 35:9908. .05439 .947.9-01470.904-0..3/.90...

:.. (( (.(1  ( 8 1  8  .909054398:83901472:.. .

 (( (.

434  3.:/0.4/2.94330 /85..19078.3/.8  3...:/02.:-0 39( 39(  39 147     1   30 ( (  (  ( 30  (  ( ( (  < 147    1   30 ( (  (  ( 30 ( ( ( (  <  147     30 ( (  (  ( < < < .:-0  5:-.9  3.5. .4//7.88.3  $905$945   !# #  3.2  3.:/048970. / :83901:3.904-0.:/07.3       .9-01470.:/089/-  .

 9 9 9 8 8 8 1 1 1    80 39/7.380  (( (( 80 (( (( 80  (( (( 80 (( (( 80 ((( ( (((( 80 147     (( (.39  ( ( ( ( ( ( ( ( ( ( 909.5 /7.4:90390790543984390.07 24/0   . 45 .3 .4:903907908041900/0 .:-0 .07%% 3924/0 397.

 (( (.

4:9039079097.3.9433 749. 09.38..38.0.9433 8.   ..4:9203:03/ .:-0.4. < .. 89.947 .33 093 .7/0.4:90390790.0.  .3999 147     (( 9 (( 9 (( 9 < 147    .943. .0  /4  .0 .80 .4:93 97.

 (( (.

 (( (.

4:90390790749.   .943 .0  .7/0.7/0.:-0    09..4:9.  .7/0.0  .0. . < ..190797.0  -70. /7.38.:-0    09.943 ..943.. /7.0..80 .0. 909..3909.4:9-0147097. 909.30 .38.  .

  .4:9 749.  < < 080 1 45   147     (( (( .  < < 080 1 45   147    .345 1 45   147      (( (( .-4:9.  (( 83 909.48 909.94303/ .48 909.4:90390790/70. ( .8 .48 909. ( 83 909.-4:9.943.-4:9 . ( .48 909.803/ 749. ( 83 909.803/ 749.  (( 83 909.943.943.

4770. ( .  (( 83 909.48 909. (( (( .4:903907.  < < 080 . ( 83 909.945943 147     (( (.48 909.

 (( (.

7/0.  .3111 147     (1 ( 8 1  8  (1 ( 8 1  8  (1 ( 8 1  8  < 147     (( (..  ..7/0.0  .0..:-0    09. /7.:-0    09.05439 .31.1907749..947 ..4:903907907010703.3888 ..0. . < .7/0..943 .4:9-01470749.0  .4:9..0.0  -70.943 . /7.80 .4:903907908.

 (( (.

0    . < ..7/0..0.:-0    09.7/0.0.4:9-014708. /7..  .0  .3 ..

3 .3/.3  09    390790.38.0 39079097.0710/      .38.38.19078..0.7/0..  <   !&%  &%!&%  3907905439390. < < 0 45  09.4. /7.:90/.80 09  -70.0  -70.943.947    0147097..943  8..0.:-0    3907908041900/0   03:  97... .943  749.  .2800.943190797.943    #$&%  %:8905747.:-0    09.38.4:9.

90 #9..3/24943:0  $0990.4507.4392.:2039  .8..2.70.9.08:83/4-0!494845   !# &#  0.96:01.0  :7%44 %88:80/94..30902..9073  $00..76:0894443/:5.79.:0..3/8.3.50411407  7421907203: 800./:8   9073  74219073203:800.03988.943432.89093/4.0-98.30.      %    $ !#%  $    %45071472-.9 742800.50.3//203843  !.9  $00.43.88  $09/8947943 824493088.97.9.0  7421907203: 800./.50  %09%44 %88:80/94.3//89.907 $099010.9077.3/5.884%44 %88:80/94800.3/903800.3147904-0.547943412.910.//909.0.943%44 %88:80/94800.3/800..393%44  .9902..9/89.447 8.30908.990059.

39 9 90 30  70.8 559097...800.36:0 3.3903300984:9482:.947 8.80847/0.50944894.0.42508. 5.9:7.50944  %7.:/0.  .3/  50 748.90.0.3.76:089448 %0 2.9.70.381472.37.0 749.890.70.988:. 37.9097.943-47/078/7.7.4478.30  0580  5443.70.3/.90 0110.-08.30  0580  74:3/0/ 70./943.943%448 $.9.4:238-/01.89-24.024/0 90944 3.:89428.9. 7084:943 3/0503/039 .70.98     7.0.9439908.43:3.3/.3%44 7.:9 .76:08 9448 09 4: 94 800.30890.0 $5430%44 %0854309448:-9.5.3/943907.4..39390.8.3/0947/7-7:80110.0/174298.90 /8947478003300.32.47307  !03%448 %05039448:80/3..94341.7/8902//07...17424794..7 .9.422.05:8 5: -:.508      .%054071:!4948455.89.9 70.508 389.07 47-4.38147219079482:.808.3:.9.3/-408 &83906:01.4397.

0710/              .2800.:90/.   #$&% %:8905747.3/.

.381472.223 3.908  147  18   57391  / /     8.3   39/%% 2 39 (  ( 9 9  18 / 397.8  3.5.0..043   8..8    05.4//7..8 9700 .4/05747.3 %0 97.3 -050714720/ -.38.5 / 2   57391 34418/08 17439.:/0./ 3918 39 ( 39 ( 399 399 39/   39    147     147  18   1 18   30 ( 9  ( 9   ( 9   ( 9   080 30 ( 9  ( 9   ( 9   ( 9   < / < 147  18   30 ( 9 ( 9 ( 9 / ( 9 /  < <  .943 #49..:/089/-  3.4/2.943 9 .3390 83419097.:/089/4  3.38. 97.447/3.    %#$ #% $   /203843.38.434  .4 47/3.4//7.43 $.3/93 :543 9070 .425430398% % .31 / 18  57391 .943.3/%   $4:7.943.:/07./ 3918 39 ( 39 ( 399 399 39/  .90 9  50714729070%7.31 // ( (  < 57391 059  .

.943  $.0 39079054398  39079054398  39079054398  39079054398 39079054398  39079054398 39079054398                       .5.8.943     8.943  #49.3  9 39074:74.  <     %#$ #% 3.31 / /  /7..-   %7.425:9077.31 // 9 9  /7.38.5747./ 18   9 9 /  57391 97.8./ 18   9 9 /  09..38.2.

                .

$$.

++½–f¯ ff° ¯ fnn ° ¾n °%½f°  °%  °f° €¯  $$  f nn ¾½¯°–f° ½–f¯ ° ¾€ ° ½ ¾¾f° €¯   f nn  $$¯ ° ¾n °°€° ¯ ¾   °¾½–f¯ %%€°n°¾ $$¾ n n¾€   f  ¾   °n ¾ f¯   °n n°   °n –f½n¾   °n ¾    ¯f°%%  n¾n%%  °   ¯    @.

@  °–f½%   ¯ %    %" %%%  €%°    ++%  nn %  %  f%%  n f n %%    €%     %  nn %  %  f%%  n f n %%         .

0     /0.5..07108.079 90924/0947.94110890313/ 108-13/45943334/8.90/94985.0.07987.4807.943 .5 1:3.8  3.700339490924/0 3 397.94397/5.2090785.7.07.824/0.4770.9437.3/4:-0 34390.077474.5 /7.5.5 .2.3.:/0.07 24/0 %  147 39     .5  <     .209073 397.702039- 0.95.8 0.94384/4390574.943..9.95.7  39/7.7.43.5  1:3./07108:80/901:3.43.7.434  3.7.7003 47397.:/0/48   2.97/5..3/.3/0.43.85747.51:3.3/. 1:3.3   .88.0 1:3.943.943397.  5747.07 24/0 /7.08894573990.2940307./:8  94.  .90.5 1:3.943 14: /43 934905.5.95.7.9411083397.392007:3.01:3.5.5.7..:/07.704.7049079.78.   < 09.9479.8/7.5 .7.4807.5.:/048970.0397..90/ 190 7.43.3/41903.92093.941108 .07%% 397.8108.:7708 98 70.2  3.8.0843908.39509.4770.0397.398/70.7.9    3.08   07047445..9411080707.5.

   .

  .

0/90.9.041 54398 .7.9.9434-0.05.55.20 ..9  .943 90308415740.32.9437010703.589.4-0.94330  .9..9890033 9890574.90308415740..703495.05..90841904-0. 390790-4:3/.943 !.98 34339.20/89.3/5.30.0308   %4/7. 390790-4:3/.9.05740.908897.09490.98017.9/44:20.3-5.8.9434190 5740.94384303.079043904-0.9435. %05740.4-0.9437010703.03907415740.943.9905740..5054947.3/9.0/!740.34-0.90/394.9.0308   #%  !.1247.990.94384303.30849.447/3..7.98.5041.9438507503/.0130905740.05439  / .3/147.435740.94341905740.3.3-!07850.30-05740..94341905740./0418343.99390780.943308990.05740./ 90.3441490717.50174217.8 903.980.90.98/0130/-.05439.7.7.943 3089.43.9  .9.943 .070.703495.381472354398.05439   .705.90/.943 !07850.013090/70.30 0 190.073308  1 !.05740.7..9437010703. 3905740.7..070.99.03081742 0.20 3041908.9085.3814720/945740.05740.20   .447/3.05.05.43.9.0 3890.943308  .9908.05./  90.7.8 17.806:03..8305439.3 5439    3.308.9.:.30   .03083904-0.83 .7/0/../0482.:.98!740..94:20.39700/203843./0482.703495.7.9437010703.70 5740.90/.3/$.8 5.43.9.9.  %  7.3/8.943 .79490../041908.0!740.7.208.9548943.90841904-0.9.943   .05740.3/9:890/70.094905.943.0/.8305439.700903/0/:3990390780.20   013017.7.447/3.209417.0!740.3/5   !07850.0 3890.447/3.98.03089.92009..5054947.0/017.98/0130/.82.589. .7.-094.9..447/3.084-9.4390.9090390780.3085.03.7.30  0 !.1247.904-0.7.05439 3!07850.9088/8.0174290473  / %05740.088 .447/3.0308  "&$% $  .30/-97.20 3041908.943 .

30 17.30 2038433  .308.03907419097..31.9478   90.70/.23.48070.0  %0807538%7.2..30887024.97.2.08   #% %080753897.08  %40307..9..937.308  %0.0888907.9017.4190 809408943139.9439070...3097.2.31.3040894074  1907.70.0/  890574..8  .70.9432.97...8908041900.9.         0307.07:58/0/4397./0/39482.9.308/.2.9431.843841..90/-313907024.90/313903:2-07419208 90949..

74:4717..9.3 .79   0130901443   09  $09  0733  09%0 0989020...70.. .20390/042097.01472   706:03.3/810/70.798 0.0/ 80.2.01472 $4:3/8574/:.94357088:70.9438....8.8.08-09003099078343047/ 97.3..78:774:3/39 %05.9.574...84:3/8.  259:/0  .55742.17.9.0 7.0850780..70.8:7020394190094190.3/9820.03/07   $09%0/941900990788.3-0 .80.89...0/801 82..09484:3/  . %01706:03.9..98.041 84:3/.574.419084:3/89070..90/390.8 .3-08593945.0/0733   013090144370850..43/   259:/0 $ 3890340041330073 !./:890/3.9...99073419048..01472  706:03.8:70/3079  47.45419040 (.509.90 .-7.943412.0/.9907 :7390.0/90809.088.20.41 ..8.90.7.03/0747/08.259:/0 %0.8.:041905074/ 9705708039890 3:2-07415074/83.3      "&$% $  .259:/041.5745079 .8:70 .70/:.84.7.-7..0/-90.09490 5439 80   0733%085.943 .43/.907  3490747/841902//0-994:9.

9430/85488-0 .020394190.94384117.574/:..9.989..574/:.  .9.989.943 47 7084:943 %07084:943 47 6:.757088:70.9 03.4190/85.39.7090.39.0:80/3123/:897                    .8:.8:7390094190..:/4 *84:3/97.6:.39.9.709095084184:3/4-0.:0/0503/843903:2-0741-98:80/ 320.9.943 *..03989..2..250..07.0174298 476:08.9/8.943 %070.:/4 *!108  .3-0:80/32:920/.:08  -9 6:/7.7014:795084184:3/4-0..01472.:08   .0 !74/:.39...9..943708:9834.94341.8 *425.8.08.3-0:80/32:920/.0110.90   01306:.55.01472 3 -96:...

 .

90.3/8.939700/203943  .90749. 5747.38.0.34-0..29497.

:/0.434  3.9  /0130/0700 .:/02.:/07. 3.8  3.:/089/4  3.5.

8 .  39.8 .8 39   .

 .

9  .9   39.(( -(( .9    . 392.9          <  950/01897:. 14.943942:95942.((  147    < .14.(( .972: 14. 393  1:3. 147  3       < 709:73     < .97  147   <5439 950/01897:.9  14./ 39 .9    14.9 .

<5439 54395439 54395      <  .

 .

8       < .4//7. ..

  .

8 55( .8 147  5( . . .94394/7.4//7./ 1:3.( (  .8 5(  .8 5(  . 5439 5 5439 5 393    147  3     30 .939700/ 39092.904-0.

 . 092.

48 /0700    83 /0700  . 30     .

.

8 30    ..

.

.8.

 30   092.  .

.

94394/7.8 54395 5 5  5  5 5  5  709:735 .8 1:3..( (     < ..9700.48 /0700   83 /0700      55( .

 .

90904-0.939700/.9439497.:0419. .38.4/97..99 9 9  < < 1:3. 14.38.9 .14.9   14.. 393  57391 3907..-4:9473 .3/9.3/9  .90 14.9 .

       < .

 .

/0700  -( (  -((83 909..90904-0. /0700  -(( 83 909.4/749. .:041. .972: .   8.9 .0 147 147 47147 8.30  8.48 909.9                    . 393    39909.4.0 57391 39074:7...4. /0700  -((.14.4..94394749.9 .0             .  - ((-((-((  -(( 89. .939700/.31 / ..-4:9473 .0  57391 3907.31 / 909.31 111 9 9 9  - ((- ((-( (-((- ((-((-((-( (-((  - ( (-((-((-(( -( (9 -((9 -((9 2. 14.80- ( (           - ((  - ((  -( (  -((.48 909. /0700  -( (  -((  ..4.90 14. 3  1:3.

. /0700  -((  -((. . /0700  -((  -( (  -((  -(( -( (  -((  -((  -70. /0700  - ((  -( (83 909.0  -70.48 909.:957391 743. 2. /0700  -((.                               <                              <                           -((  -70.972: . . 3  .48 909.. /0700  -( (  -(( -((  -( ( 83 909. - ((  - ((83 909.4. /0700  /01.80- ( (. /0700  .80- ( (.48 909. /0700  -( (  -((  -((  -70.48 909.. - (( 83 909.

.

9431478. 1:3.3 ..

5439 5. .393            < .0 14.9            < .4/..4/8.45 5439 5.

!# # .

( . 393  14.94788 8.31.14.9 . .4.4/2.0 14. 14.31 111 8 8 8  - ((-((-( (-((- ((-((-((  -((8 - ( (8 -( (  - ((  -((8 -(( 2.../  <  5.( 5-(  5.( .98 8 8 57391 39078.9 .( 5-(  5. 3  ./ 147  5-( .( 5-(  5. .972: .(5-( .3    39/%% 2 3 .( ..3/8  8. 147  3        < 709:73  5. ../5-( .9 .

     5439 5 5439 5 $9.795.

$9.:0 .839.795...

. 57391 3907903:2-0741.08   8.31 / 3  .079.

94394. 20247.4.2.97.08 .-..

          .

9439489:.4.9:708 . 20247..

3 8041 5439  . 3 8041 5439  $9.795 5439 2. 3 8041 5439  5 5439 2.4.               5 5439 2.4.4.

.

/.31 111 5(  5(  5(   57391 3907903:2-0741.4. 5( .08  8.039.9 2..  8041 14.4.4.079. 14.335:9.31 / 5( .  8041 14.447/3.9 2.079.3/3/041907. 3 8041 14.9  1  -( 14.4.9    < 2..9 2./.079.9 2..90841.4./  57391 /      .447/3.039.4.( 14./ 8041 39  57391 39073/03:2-073  147  5( .%.4.9 - 14./  5( .908.  8041 14. 14.9 .08 147  3                  57391  / / /    .9 2. 3 8041 14. 39 2..08 57391 390790.( 14.9  8.9  .  8041 14.9     147  3 .

                                   <  .

.

  < 8.(  5(5439 5(  .31 / 5( .45 $9.795 5 3  ..

.

:0835 .$43..

.

 147  3 < 57391 33  .

.

 .

.

:0835 .$43..

.

5 / 2  . 147  3 < 09.  397.

8092. .-  .

 . .8092.

 0 .4.0  .

.

 .

.

9 .843904-0.

.

8  /7..4.0 3   57391 3 1 1 5(  5(    57391 3 1 1 1 5(  5(  5(   .    /7. 5 5 3  57391 39074:7.

...4.   -70.808.:083 147 09  3907                                                            <  .90 .:957391 743.....8097. . 3        -70..  57391 14797.9031478.903147749.0 3     ..38.. -70.. .90 . -70. . 3  .80749. -70.0 ..80 57391 00  /01. .031477080990. 3  .8057391 #0809/430   .. -70.38.

.

 .

.

2.97. 05 .32.

.

4. .0   .         147  3     < 89.

.

.((5(  .4807.((5(  .31 / .5  397.(( 8.4.0  .78.  .( (5(  .5 / 2  .7  .

-  .

.

.

                             <                             < .

.

07932.43.. 0 5+359035 .97.

.

 147  3     < .

.:0 .  #080990.

0  .0.7/0..4. 1 .0       < .

.

 .

.

38.9 .8439097.90/4-0..

.

 5 5 3  57391 !7088390794.8  /7. /7..795 3  147  3  < 09.( ( 5( .5  .   5(5439 5(   5( .45 5 $9.  .4807.(( 5( .4393:03  09.(( 5(5439 5(  .

..5.  39 .54398  8.31 8 909  57391 39079039.943!747.4807.   .-8 /  080 89058.5 / 2   4:9909 8 8 909  24.434  3..93 3 8 8 09.2&83!747...5  < .223 3.0 8 8 9 9 909  09.7909 (   39/9 8 /9 8 89058  14.808  %0932.3  39/%% 2 8 8 9 9 .8  /013074:3/ .-8 / .  1 .//943.31 // 9 9  397.:/07..7(  57391 390790909  8.:/089/4  3.4/24.0 39 39 39 39 .07.7909 ( .:/02.:/0.-8 /  89058..4/2.9  3.31 // 8 8  57391 390790%#%54398  8.  .-8 /  3/..4/24.0 398 398 399 399 .

9 89058 3/. 14.

0   3  3 809. 14..9 89058 147  89058   .7/0.   < <    .0.447   4:9909 74:3/  74:3/  909  /0.

Sign up to vote on this title
UsefulNot useful