# 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:990749. :83901:3.3/.943. .943 . 909.38.190797.943  \$905#49.909.94330 /85.904-0. :831472:.9-01470.30 .

909054398:83901472:. ( 83 909.9438.  190/70. ( . 35:990/70.48 909. (( (.  (( 83 909.48 909. ( 83 909..48 909.9438.  .48 909.:.43.8   ((  (( .43. ( 83 909.8   ((  (( ..48 909.  (( 83 909. ( .8 / 190/70. ( .9438.  190/70.  (( 83 909.8   ((  (( .48 909.9433  .43.  0 .

 (( (.

31..3/7010703..:.9085439:831472:.94330 /85.943  \$905\$.1907749.3 . (1 ( 8 1  8  (1  ( 8 1  8  .447/3. 1 :83901:3. 35:9908. .05439 .947.9-01470.904-0..3/.90...

:.. (( (.(1  ( 8 1  8  .909054398:83901472:.. .

 (( (.

434  3.:/0.4/2.94330 /85..19078.3/.8  3...:/02.:-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.:/048970. / :83901:3.904-0.:/07.3       .9-01470.:/089/-  .

 9 9 9 8 8 8 1 1 1    80 39/7.380  (( (( 80 (( (( 80  (( (( 80 (( (( 80 ((( ( (((( 80 147     (( (.39  ( ( ( ( ( ( ( ( ( ( 909.5 /7.4:90390790543984390.07 24/0   . 45 .3 .4:903907908041900/0 .:-0 .07%% 3924/0 397.

 (( (.

4:9039079097.3.9433 749. 09.38..38.0.9433 8.   ..4:9203:03/ .:-0.4. < .. 89.947 .33 093 .7/0.4:90390790.0.  .3999 147     (( 9 (( 9 (( 9 < 147    .943. .0  /4  .0 .80 .4:93 97.

 (( (.

 (( (.

4:90390790749.   .943 .0  .7/0.7/0.:-0    09..4:9.  .7/0.0  .0. . < ..190797.0  -70. /7.38.:-0    09.943 ..943.. /7.0..80 .0. 909..3909.4:9-0147097. 909.30 .38.  .

  .4:9 749.  < < 080 1 45   147     (( (( .  < < 080 1 45   147    .345 1 45   147      (( (( .-4:9.  (( 83 909.48 909.94303/ .48 909.4:90390790/70. ( .8 .48 909. ( 83 909.-4:9.943.-4:9 . ( .48 909.803/ 749. ( 83 909.803/ 749.  (( 83 909.943.943.

4770. ( .  (( 83 909.48 909. (( (( .4:903907.  < < 080 . ( 83 909.945943 147     (( (.48 909.

 (( (.

7/0.  .3111 147     (1 ( 8 1  8  (1 ( 8 1  8  (1 ( 8 1  8  < 147     (( (..  ..7/0.0  .0..:-0    09. /7.:-0    09.05439 .31.1907749..947 ..4:903907907010703.3888 ..0. . < .7/0..943 .4:9-01470749.0  .4:9..0.0  -70.943 . /7.80 .4:903907908.

 (( (.

0    . < ..7/0..0.:-0    09.7/0.0.4:9-014708. /7..  .0  .3 ..

3 .3/.3  09    390790.38.0 39079097.0710/      .38.38.19078..0.7/0..  <   !&%  &%!&%  3907905439390. < < 0 45  09.4. /7.:90/.80 09  -70.0  -70.943.947    0147097..943  8..0.:-0    3907908041900/0   03:  97... .943  749.  .2800.943190797.943    #\$&%  %:8905747.:-0    09.38.4:9.

90 #9..3/24943:0  \$0990.4507.4392.:2039  .8..2.70.9.08:83/4-0!494845   !# &#  0.96:01.0  :7%44 %88:80/94..30902..9073  \$00..76:0894443/:5.79.:0..3/8.3.50411407  7421907203: 800./:8   9073  74219073203:800.03988.943432.89093/4.0-98.30.      %    \$ !#%  \$    %45071472-.9 742800.50.3//203843  !.9  \$00.43.88  \$09/8947943 824493088.97.9.0  7421907203: 800./.50  %09%44 %88:80/94.3//89.907 \$099010.9077.3/5.884%44 %88:80/94800.3/903800.3147904-0.547943412.910.//909.0.943%44 %88:80/94800.3/800..393%44  .9902..9/89.447 8.30908.990059.

39 9 90 30  70.8 559097...800.36:0 3.3903300984:9482:.947 8.80847/0.50944894.0.42508. 5.9:7.50944  %7.:/0.  .3/  50 748.90.0.3.76:089448 %0 2.9.70.381472.37.0 749.890.70.988:. 37.9097.943-47/078/7.7.4478.30  0580  5443.70.3/.90 0110.-08.30  0580  74:3/0/ 70./943.943%448 \$.9.4:238-/01.89-24.024/0 90944 3.:89428.9. 7084:943 3/0503/039 .70.98     7.0.9439908.43:3.3/.3%44 7.:9 .76:08 9448 09 4: 94 800.30890.0 \$5430%44 %0854309448:-9.5.3/943907.4..39390.8.3/0947/7-7:80110.0/174298.90 /8947478003300.32.47307  !03%448 %05039448:80/3..94341.7/8902//07...17424794..7 .9.422.05:8 5: -:.508      .%054071:!4948455.89.9 70.508 389.07 47-4.38147219079482:.808.3:.9.3/-408 &83906:01.4397.

0710/              .2800.:90/.   #\$&% %:8905747.3/.

.381472.223 3.908  147  18   57391  / /     8.3   39/%% 2 39 (  ( 9 9  18 / 397.8  3.5.0..043   8..8    05.4//7..8 9700 .4/05747.3 %0 97.3 -050714720/ -.38.5 / 2   57391 34418/08 17439.:/0./ 3918 39 ( 39 ( 399 399 39/   39    147     147  18   1 18   30 ( 9  ( 9   ( 9   ( 9   080 30 ( 9  ( 9   ( 9   ( 9   < / < 147  18   30 ( 9 ( 9 ( 9 / ( 9 /  < <  .943 #49..:/089/-  3.4/2.943 9 .3390 83419097.:/089/4  3.38. 97.447/3.    %#\$ #% \$   /203843.38.434  .4 47/3.4//7.43 \$.3/93 :543 9070 .425430398% % .31 / 18  57391 .943.3/%   \$4:7.943.:/07./ 3918 39 ( 39 ( 399 399 39/  .90 9  50714729070%7.31 // ( (  < 57391 059  .

.943  \$.0 39079054398  39079054398  39079054398  39079054398 39079054398  39079054398 39079054398                       .5.8.943     8.943  #49.3  9 39074:74.  <     %#\$ #% 3.31 / /  /7..-   %7.425:9077.31 // 9 9  /7.38.5747./ 18   9 9 /  57391 97.8./ 18   9 9 /  09..38.2.

                .

\$\$.

++½f¯ ff° ¯ fnn ° ¾n °%½f°  °%  °f° ¯  \$\$  f nn ¾½¯°f° ½f¯ ° ¾ ° ½ ¾¾f° ¯   f nn  \$\$¯ ° ¾n °°° ¯ ¾   °¾½f¯ %%°n°¾ \$\$¾ n n¾   f  ¾   °n ¾ f¯   °n n°   °n f½n¾   °n ¾    ¯f°%%  n¾n%%  °   ¯    @.

@  °f½%   ¯ %    %" %%%  %°    ++%  nn %  %  f%%  n f n %%    %     %  nn %  %  f%%  n f n %%         .

0     /0.5..07108.079 90924/0947.94110890313/ 108-13/45943334/8.90/94985.0.07987.4807.943 .5 1:3.8  3.700339490924/0 3 397.94397/5.2090785.7.07.824/0.4770.9437.3/4:-0 34390.077474.5 /7.5.5 .2.3.:/0.07 24/0 %  147 39     .5  <     .209073 397.702039- 0.95.8 0.94384/4390574.943..9.95.7  39/7.7.43.5  1:3./07108:80/901:3.43.7.434  3.7.7003 47397.:/0/48   2.97/5..3/.3/0.43.85747.51:3.3/. 1:3.3   .88.0 1:3.943.943397.  5747.07 24/0 /7.08894573990.2940307./:8  94.  .90.5 1:3.943 14: /43 934905.5.95.7.9411083397.392007:3.01:3.5.5.7..:/07.704.7049079.78.   < 09.9479.8/7.5 .7.4807.5.:/048970.0397..90/ 190 7.43.3/41903.92093.941108 .07%% 397.8108.:7708 98 70.2  3.8.0843908.39509.4770.0397.398/70.7.9    3.08   07047445..9411080707.5.

   .

  .

0/90.9.041 54398 .7.9.9434-0.05.55.20 ..9  .943 90308415740.32.9437010703.589.4-0.94330  .9..9890033 9890574.90308415740..703495.05..90841904-0. 390790-4:3/.943 !.98 34339.20/89.3/5.30.0308   %4/7. 390790-4:3/.9.05740.908897.09490.98017.9/44:20.3-5.8.9434190 5740.94384303.079043904-0.9435. %05740.4-0.9437010703.03907415740.943.9905740..5054947.3/9.0/!740.34-0.90/394.9.0308   #%  !.1247.990.94384303.30849.447/3..7.98.5041.9438507503/.0130905740.05439  / .3/147.435740.94341905740.3.3-!07850.30-05740..94341905740./0418343.99390780.943308990.05740./ 90.3441490717.50174217.8 903.980.90.98/0130/-.05439.7.7.943 3089.43.9  .9.943 .070.703495.381472354398.05439   .705.90/.943 !07850.013090/70.30 0 190.073308  1 !.05740.7..9437010703. 3905740.7..070.99.03081742 0.20 3041908.9085.3814720/945740.05740.20   .447/3.05.05.43.9.0 3890.943308  .9908.05./  90.7.8 17.806:03..8305439.3 5439    3.308.9.:.30   .03083904-0.83 .7/0/../0482.:.98!740..94:20.39700/203843./0482.703495.7.9437010703.70 5740.90/.3/\$.8 5.43.9.9.  %  7.3/8.943 .79490../041908.0!740.7.208.9548943.90841904-0.9.943   .05740.3/9:890/70.094905.943.0/.8305439.700903/0/:3990390780.20   013017.7.447/3.209417.0!740.3/5   !07850.0 3890.447/3.98.03089.92009..5054947.0/017.98/0130/.82.589. .7.-094.9..447/3.084-9.4390.9090390780.3085.03.7.30  0 !.1247.904-0.7.05439 3!07850.9088/8.0174290473  / %05740.088 .447/3.0308  "&\$% \$  .30/-97.20 3041908.943 .

30 17.30 2038433  .308.03907419097..31.9478   90.70/.23.48070.0  %0807538%7.2..30887024.97.2.08   #% %080753897.08  %40307..9..937.308  %0.0888907.9017.4190 809408943139.9439070...3097.2.31.3040894074  1907.70.0/  890574..8  .70.9432.97...8908041900.9.         0307.07:58/0/4397./0/39482.9.308/.2.9431.843841..90/-313907024.90/313903:2-07419208 90949..

74:4717..9.3 .79   0130901443   09  \$09  0733  09%0 0989020...70.. .20390/042097.01472   706:03.3/810/70.798 0.0/ 80.2.01472 \$4:3/8574/:.94357088:70.9438....8.8.08-09003099078343047/ 97.3..78:774:3/39 %05.9.574...84:3/8.  259:/0  .55742.17.9.0 7.0850780..70.8:7020394190094190.3/9820.03/07   \$09%0/941900990788.3-0 .80.89...0/801 82..09484:3/  . %01706:03.9..98.041 84:3/.574.419084:3/89070..90/390.8 .3-08593945.0/0733   013090144370850..43/   259:/0 \$ 3890340041330073 !./:890/3.9...99073419048..01472  706:03.8:70/3079  47.45419040 (.509.90 .-7.943412.0/.9907 :7390.0/90809.088.20.41 ..8.90.7.03/0747/08.259:/0 %0.8.:041905074/ 9705708039890 3:2-07415074/83.3      "&\$% \$  .259:/041.5745079 .8:70 .70/:.84.7.-7..0/-90.09490 5439 80   0733%085.943 .43/.907  3490747/841902//0-994:9.

9430/85488-0 .020394190.94384117.574/:..9.989..574/:.  .9.989.943 47 7084:943 %07084:943 47 6:.757088:70.9 03.4190/85.39.7090.39.0:80/3123/:897                    .8:.8:7390094190..:/4 *84:3/97.6:.39.9.709095084184:3/4-0.:0/0503/843903:2-0741-98:80/ 320.9.943 *..03989..2..250..07.0174298 476:08.9/8.943 %070.:/4 *!108  .3-0:80/32:920/.:08  -9 6:/7.7014:795084184:3/4-0..01472.:08   .0 !74/:.39...9..943708:9834.94341.8 *425.8.08.3-0:80/32:920/.0110.90   01306:.55.01472 3 -96:...

 .

90.3/8.939700/203943  .90749. 5747.38.0.34-0..29497.

:/0.434  3.9  /0130/0700 .:/02.:/07. 3.8  3.:/089/4  3.5.

8 .  39.8 .8 39   .

 .

9  .9   39.(( -(( .9    . 392.9          <  950/01897:. 14.943942:95942.((  147    < .14.(( .972: 14. 393  1:3. 147  3       < 709:73     < .97  147   <5439 950/01897:.9  14./ 39 .9    14.9 .

<5439 54395439 54395      <  .

 .

8       < .4//7. ..

  .

8 55( .8 147  5( . . .94394/7.4//7./ 1:3.( (  .8 5(  .8 5(  . 5439 5 5439 5 393    147  3     30 .939700/ 39092.904-0.

 . 092.

48 /0700    83 /0700  . 30     .

.

8 30    ..

.

.8.

 30   092.  .

.

94394/7.8 54395 5 5  5  5 5  5  709:735 .8 1:3..( (     < ..9700.48 /0700   83 /0700      55( .

 .

90904-0.939700/.9439497.:0419. .38.4/97..99 9 9  < < 1:3. 14.38.9 .14.9   14.. 393  57391 3907..-4:9473 .3/9.3/9  .90 14.9 .

       < .

 .

/0700  -( (  -((83 909..90904-0. /0700  -(( 83 909.4/749. .:041. .972: .   8.9 .0 147 147 47147 8.30  8.48 909.9                    . 393    39909.4.0 57391 39074:7...4. /0700  -((.14.4..94394749.9 .0             .  - ((-((-((  -(( 89. .939700/.31 / ..-4:9473 .0  57391 3907.31 / 909.31 111 9 9 9  - ((- ((-( (-((- ((-((-((-( (-((  - ( (-((-((-(( -( (9 -((9 -((9 2. 14.80- ( (           - ((  - ((  -( (  -((.48 909. /0700  -( (  -((  ..4.90 14. 3  1:3.

. /0700  -((  -((. . /0700  -((  -( (  -((  -(( -( (  -((  -((  -70. /0700  - ((  -( (83 909.0  -70.48 909.:957391 743. 2. /0700  -((.                               <                              <                           -((  -70.972: . . 3  .48 909.. /0700  -( (  -(( -((  -( ( 83 909. - ((  - ((83 909.4. /0700  /01.80- ( (. /0700  .80- ( (.48 909. /0700  -( (  -((  -((  -70.48 909.. - (( 83 909.

.

9431478. 1:3.3 ..

5439 5. .393            < .0 14.9            < .4/..4/8.45 5439 5.

!# # .

( . 393  14.94788 8.31.14.9 . .4.4/2.0 14. 14.31 111 8 8 8  - ((-((-( (-((- ((-((-((  -((8 - ( (8 -( (  - ((  -((8 -(( 2.../  <  5.( 5-(  5.( .98 8 8 57391 39078.9 .( 5-(  5. 3  ./ 147  5-( .( 5-(  5. .972: .(5-( .3    39/%% 2 3 .( ..3/8  8. 147  3        < 709:73  5. ../5-( .9 .

     5439 5 5439 5 \$9.795.

\$9.:0 .839.795...

. 57391 3907903:2-0741.08   8.31 / 3  .079.

94394. 20247.4.2.97.08 .-..

          .

9439489:.4.9:708 . 20247..

3 8041 5439  . 3 8041 5439  \$9.795 5439 2. 3 8041 5439  5 5439 2.4.               5 5439 2.4.4.

.

/.31 111 5(  5(  5(   57391 3907903:2-0741.4. 5( .08  8.039.9 2..  8041 14.4.4.079. 14.335:9.31 / 5( .  8041 14.447/3.9 2.079.3/3/041907. 3 8041 14.9  1  -( 14.4.9    < 2..9 2./.079.9 2..90841.4./  57391 /      .447/3.039.4.( 14./ 8041 39  57391 39073/03:2-073  147  5( .%.4.9 - 14./  5( .908.  8041 14. 14.9 .08 147  3                  57391  / / /    .9 2. 3 8041 14. 39 2..08 57391 390790.( 14.9  8.9  .  8041 14.9     147  3 .

                                   <  .

.

  < 8.(  5(5439 5(  .31 / 5( .45 \$9.795 5 3  ..

.

:0835 .\$43..

.

 147  3 < 57391 33  .

.

 .

.

:0835 .\$43..

.

5 / 2  . 147  3 < 09.  397.

8092. .-  .

 . .8092.

 0 .4.0  .

.

 .

.

9 .843904-0.

.

8  /7..4.0 3   57391 3 1 1 5(  5(    57391 3 1 1 1 5(  5(  5(   .    /7. 5 5 3  57391 39074:7.

...4.   -70.808.:083 147 09  3907                                                            <  .90 .:957391 743.....8097. . 3        -70..  57391 14797.9031478.903147749.0 3     ..38.. -70.. .90 . -70. . 3  .80749. -70.0 ..80 57391 00  /01. .031477080990. 3  .8057391 #0809/430   .. -70.38.

.

 .

.

2.97. 05 .32.

.

4. .0   .         147  3     < 89.

.

.((5(  .4807.((5(  .31 / .5  397.(( 8.4.0  .78.  .( (5(  .5 / 2  .7  .

-  .

.

.

                             <                             < .

.

07932.43.. 0 5+359035 .97.

.

 147  3     < .

.:0 .  #080990.

0  .0.7/0..4. 1 .0       < .

.

 .

.

38.9 .8439097.90/4-0..

.

 5 5 3  57391 !7088390794.8  /7. /7..795 3  147  3  < 09.( ( 5( .5  .   5(5439 5(   5( .45 5 \$9.  .4807.(( 5( .4393:03  09.(( 5(5439 5(  .

..5.  39 .54398  8.31 8 909  57391 39079039.943!747.4807.   .-8 /  080 89058.5 / 2   4:9909 8 8 909  24.434  3..93 3 8 8 09.2&83!747...5  < .223 3.0 8 8 9 9 909  09.7909 (   39/9 8 /9 8 89058  14.808  %0932.3  39/%% 2 8 8 9 9 .8  /013074:3/ .-8 / .  1 .//943.31 // 9 9  397.:/07..7(  57391 390790909  8.:/089/4  3.4/24.0 39 39 39 39 .07.7909 ( .:/02.:/0.-8 /  89058..4/2.9  3.31 // 8 8  57391 390790%#%54398  8.  .-8 /  3/..4/24.0 398 398 399 399 .

9 89058 3/. 14.

0   3  3 809. 14..9 89058 147  89058   .7/0.   < <    .0.447   4:9909 74:3/  74:3/  909  /0.

Sign up to vote on this title