SlideShare une entreprise Scribd logo
1  sur  60
1
Computer Graphics LAB
s.no Date content pg.no Sign
1. Digital Differential Analyzer line
drawing algorithm
2. Bresenham’s line drawing algorithm
3. Midpoint circle generation algorithm
4. Creating various types of texts and
fonts
5. Creating two-dimensional objects
6. Two-dimensional translation
7. Two-dimensional scaling
8. Two-dimensional rotation
9. Three-dimensional translation
10. Three-dimensional scaling
11. Three-dimensional rotation
12. Curve generation
13. Moving circle in different directions
14. Man walking using simple animation
15. Coloring the object using
a) 4-connected Floodfill
b) Floodfill function
2
1. DIGITAL DIFFERENTIAL ANALYZER
ALGORITHM
AIM:
ALGORITHM:
3
SOURCE CODE:
#include<stdio.h>
#include<graphics.h>
#include<math.h>
float round(float a);
void main()
{
int gd=DETECT,gm;
int x1,y1,x2,y2,steps,k;
float xincr,yincr,x,y,dx,dy;
printf("enter x1,y1");
scanf("%d%d",&x1,&y1);
printf("enter x2,y2");
scanf("%d%d",&x2,&y2);
initgraph(&gd,&gm,"c:turboc3BGI");
dx=x2-x1;
dy=y2-y1;
if(abs(dx)>abs(dy))
steps=abs(dx);
else
steps=abs(dy);
xincr=dx/steps;
yincr=dy/steps;
x=x1;
y=y1;
for(k=1;k<=steps;k++)
{
delay(100);
x+=xincr;
y+=yincr;
putpixel(round(x),round(y),WHITE);
}
4
outtextxy(200,20,"DDA");
outtextxy(x1+5,y1-5,"(x1,y1)");
outtextxy(x2+5,y2+5,"(x2,y2)");
getch();
closegraph();
}
float round(float a)
{
int b=a+0.5;
return b;
}
5
OUTPUT:
RESULT:
6
2. BRESENHAM’S LINE DRAWING
ALGORITHM
AIM:
ALGORITHM:
7
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int x,y,x1,y1,x2,y2,p,dx,dy;
int gd=DETECT,gm;
initgraph(&gd,&gm,"C:TurboC3BGI");
printf("nEnter the x-coordinate of the first point ::");
scanf("%d",&x1);
printf("nEnter the y-coordinate of the first point ::");
scanf("%d",&y1);
printf("nEnter the x-coordinate of the second point ::");
scanf("%d",&x2);
printf("nEnter the y-coordinate of the second point ::");
scanf("%d",&y2);
x=x1;
y=y1;
dx=x2-x1;
dy=y2-y1;
putpixel(x,y,2);
p=(2*dy-dx);
while(x<=x2)
{
if(p<0)
{
x=x+1;
p=p+2*dy;
}
8
else
{
x=x+1;
y=y+1;
p=p+(2*dy)-(2*dx);
}
putpixel(x,y,7);
}
getch();
closegraph();
}
9
OUTPUT:
RESULT:
10
3. MIDPOINT CIRCLE DRAWING
ALGORITHM
AIM:
ALGORITHM:
11
SOURCE CODE:
#include<dos.h>
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void draw_circle(int,int,int);
void symmetry(int,int,int,int);
void main()
{
int xc,yc,R;
int gd=DETECT,gm;
initgraph(&gd,&gm,"C:TurboC3BGI");
printf("Enter the center of the circle:n");
printf("Xc =");
scanf("%d",&xc);
printf("Yc =");
scanf("%d",&yc);
printf("Enter the radius of the circle :");
scanf("%d",&R);
draw_circle(xc,yc,R);
getch();
closegraph();
}
void draw_circle(int xc,int yc,int rad)
{
int x = 0;
int y = rad;
int p = 1-rad;
symmetry(x,y,xc,yc);
for(x=0;y>x;x++)
{
12
if(p<0)
p += 2*x + 3;
else
{
p += 2*(x-y) + 5;
y--;
}
symmetry(x,y,xc,yc);
delay(50);
}
}
void symmetry(int x,int y,int xc,int yc)
{
putpixel(xc+x,yc-y,GREEN); //For pixel (x,y)
delay(50);
putpixel(xc+y,yc-x, GREEN); //For pixel (y,x)
delay(50);
putpixel(xc+y,yc+x, GREEN); //For pixel (y,-x)
delay(50);
putpixel(xc+x,yc+y, GREEN); //For pixel (x,-y)
delay(50);
putpixel(xc-x,yc+y, GREEN); //For pixel (-x,-y)
delay(50);
putpixel(xc-y,yc+x, GREEN); //For pixel (-y,-x)
delay(50);
putpixel(xc-y,yc-x, GREEN); //For pixel (-y,x)
delay(50);
putpixel(xc-x,yc-y, GREEN); //For pixel (-x,y)
delay(50);
}
13
OUTPUT:
RESULT:
14
4. CREATING VARIOUS TYPES OF
TEXTS AND FONTS
AIM:
ALGORITHM:
15
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gd=DETECT,gm,x=25,y=25,font=10;
initgraph(&gd,&gm,"C:turboC3BGI");
for(font=0;font<=4;font++)
{
settextstyle(font,HORIZ_DIR,font+1); // sets font type, font direction,
size
setcolor(font+1); // sets color for text.
outtextxy(x,y,"text with different fonts"); // prints message on screen at
(x,y)
y=y+25;
}
for(font=0;font<=2;font++)
{
settextstyle(font,VERT_DIR,font+2);
setcolor(font+1);
x=250;
y=100;
outtextxy(x,y,"text in vertical direction");
y=y+25;
}
getch();
closegraph();
}
16
OUTPUT:
RESULT:
17
5. CREATING TWO DIMENSIONAL
OBJECTS
AIM:
ALGORITHM:
18
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
void main()
{
int gd = DETECT, gm;
initgraph(&gd, &gm, "C:TurboC3BGI");
cleardevice();
line( 150, 100, 242, 100);
ellipse(242, 105, 0, 90, 10, 5);
line(150, 100, 120, 150);
line(252, 105, 280, 150);
line(100, 150, 320, 150);
line(100, 150, 100, 200);
line(320, 150, 320, 200);
line(100, 200, 110, 200);
line( 320, 200, 310, 200);
arc(130, 200, 0, 180, 20);
arc( 290, 200, 0, 180, 20);
line( 270, 200, 150, 200);
circle(130, 200, 17);
circle(290, 200, 17);
getch();
}
19
OUTPUT:
RESULT:
20
6. TWO-DIMENSIONAL TRANSLATION
AIM:
ALGORITHM:
21
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<math.h>
void main()
{
int gd=DETECT,gm;
int x1,y1,x2,y2,tx,ty,x3,y3,x4,y4;
initgraph(&gd,&gm,"C:TurboC3BGI");
printf("Enter the starting point of line segment:");
scanf("%d %d",&x1,&y1);
printf("Enter the ending point of line segment:");
scanf("%d %d",&x2,&y2);
printf("Enter translation distances tx,ty:n");
scanf("%d%d",&tx,&ty);
setcolor(5);
line(x1,y1,x2,y2);
outtextxy(x2+2,y2+2,"Original line");
x3=x1+tx;
y3=y1+ty;
x4=x2+tx;
y4=y2+ty;
setcolor(7);
line(x3,y3,x4,y4);
outtextxy(x4+2,y4+2,"Line after translation");
getch();
}
22
OUTPUT:
RESULT:
23
7. TWO- DIMENSIONAL SCALING
AIM:
ALGORITHM:
24
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<math.h>
void main()
{
int gd=DETECT,gm;
float x1,y1,x2,y2,sx,sy,x3,y3,x4,y4;
initgraph(&gd,&gm,"C:TurboC3BGI");
printf("Enter the starting point coordinates:");
scanf("%f %f",&x1,&y1);
printf("Enter the ending point coordinates:");
scanf("%f %f",&x2,&y2);
printf("Enter scaling factors sx,sy:n");
scanf("%f%f",&sx,&sy);
setcolor(5);
line(x1,y1,x2,y2);
outtextxy(x2+2,y2+2,"Original line");
x3=x1*sx;
y3=y1*sy;
x4=x2*sx;
y4=y2*sy;
setcolor(7);
line(x3,y3,x4,y4);
outtextxy(x3+2,y3+2,"Line after scaling");
getch();
}
25
OUTPUT:
RESULT:
26
8. TWO- DIMENSIONAL ROTATION
AIM:
ALGORITHM:
27
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<math.h>
void main()
{
int gd=DETECT,gm;
float x1,y1,x2,y2,x3,y3,x4,y4,a,t;
initgraph(&gd,&gm,"C:TurboC3BGI");
printf("Enter coordinates of starting point:n");
scanf("%f%f",&x1,&y1);
printf("Enter coordinates of ending pointn");
scanf("%f%f",&x2,&y2);
printf("Enter angle for rotationn");
scanf("%f",&a);
setcolor(5);
line(x1,y1,x2,y2);
outtextxy(x2+2,y2+2,"Original line");
t=a*(3.14/180);
x3=(x1*cos(t))-(y1*sin(t));
y3=(x1*sin(t))+(y1*cos(t));
x4=(x2*cos(t))-(y2*sin(t));
y4=(x2*sin(t))+(y2*cos(t));
setcolor(7);
line(x3,y3,x4,y4);
outtextxy(x3+2,y3+2,"Line after rotation");
getch();
}
28
OUTPUT:
RESULT:
29
9. THREE-DIMENSIONAL
TRANSLATION
AIM:
ALGORITHM:
30
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
#include<math.h>
#include<process.h>
#include<graphics.h>
int x1,x2,y1,y2,mx,my,depth;
void draw();
void trans();
void main()
{
int gd=DETECT,gm,c;
initgraph(&gd,&gm,"C:TurboC3BGI");
printf("ntt3D Translationnn");
printf("nEnter 1st top value(x1,y1):");
scanf("%d%d",&x1,&y1);
printf("Enter right bottom value(x2,y2):");
scanf("%d%d",&x2,&y2);
depth=(x2-x1)/4;
mx=(x1+x2)/2;
my=(y1+y2)/2;
draw();
getch();
cleardevice();
trans();
getch();
}
31
void draw()
{
bar3d(x1,y1,x2,y2,depth,1);
}
void trans()
{
int a1,a2,b1,b2,dep,x,y;
printf("n Enter the Translation Distances:");
scanf("%d%d",&x,&y);
a1=x1+x;
a2=x2+x;
b1=y1+y;
b2=y2+y;
dep=(a2-a1)/4;
bar3d(a1,b1,a2,b2,dep,1);
setcolor(5);
draw();
}
32
OUTPUT:
RESULT:
33
10.THREE- DIMENSIONAL SCALING
AIM:
ALGORITHM:
34
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
#include<math.h>
#include<process.h>
#include<graphics.h>
int x1,x2,y1,y2,mx,my,depth;
void draw();
void scale();
void main()
{
int gd=DETECT,gm,c;
initgraph(&gd,&gm,"C:TurboC3BGI");
printf("ntt3D Scalingnn");
printf("nEnter 1st top value(x1,y1):");
scanf("%d%d",&x1,&y1);
printf("Enter right bottom value(x2,y2):");
scanf("%d%d",&x2,&y2);
depth=(x2-x1)/4;
mx=(x1+x2)/2;
my=(y1+y2)/2;
draw();
getch();
cleardevice();
scale();
getch();
}
35
void draw()
{
bar3d(x1,y1,x2,y2,depth,1);
}
void scale()
{
int x,y,a1,a2,b1,b2,dep;
printf("nn Enter scaling Factors:");
scanf("%d%d",&x,&y);
a1=mx+(x1-mx)*x;
a2=mx+(x2-mx)*x;
b1=my+(y1-my)*y;
b2=my+(y2-my)*y;
dep=(a2-a1)/4;
bar3d(a1,b1,a2,b2,dep,1);
setcolor(5);
draw();
}
36
OUTPUT:
RESULT:
37
11. THREE-DIMENSIONAL ROTATION
AIM:
ALGORITHM:
38
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
#include<math.h>
#include<graphics.h>
int x1,x2,y1,y2,mx,my,depth;
void draw();
void rotate();
void main()
{
int gd=DETECT,gm,c;
initgraph(&gd,&gm,"C:TurboC3BGI");
printf("n3D Transformation Rotatingnn");
printf("nEnter 1st top value(x1,y1):");
scanf("%d%d",&x1,&y1);
printf("Enter right bottom value(x2,y2):");
scanf("%d%d",&x2,&y2);
depth=(x2-x1)/4;
mx=(x1+x2)/2;
my=(y1+y2)/2;
draw(); getch();
cleardevice();
rotate();
getch();
}
void draw()
{
bar3d(x1,y1,x2,y2,depth,1);
}
39
void rotate()
{
float t;
int a1,b1,a2,b2,dep;
printf("Enter the angle to rotate=");
scanf("%f",&t);
t=t*(3.14/180);
a1=mx+(x1-mx)*cos(t)-(y1-my)*sin(t);
a2=mx+(x2-mx)*cos(t)-(y2-my)*sin(t);
b1=my+(x1-mx)*sin(t)-(y1-my)*cos(t);
b2=my+(x2-mx)*sin(t)-(y2-my)*cos(t);
if(a2>a1)
dep=(a2-a1)/4;
else
dep=(a1-a2)/4;
bar3d(a1,b1,a2,b2,dep,1); setcolor(5);
}
40
OUTPUT:
RESULT:
41
12. CURVE GENERATION
AIM:
ALGORITHM:
42
SOURCE CODE:
#include <stdio.h>
#include <stdlib.h>
#include <graphics.h>
#include <math.h>
void bezier (int x[4], int y[4])
{
int gd = DETECT, gm;
int i;
double t;
initgraph (&gd, &gm, "C:TurboC3BGI");
for (t = 0.0; t < 1.0; t += 0.0005)
{
double xt = pow (1-t, 3) * x[0] + 3 * t * pow (1-t, 2) * x[1] +
3 * pow (t, 2) * (1-t) * x[2] + pow (t, 3) * x[3];
double yt = pow (1-t, 3) * y[0] + 3 * t * pow (1-t, 2) * y[1] +
3 * pow (t, 2) * (1-t) * y[2] + pow (t, 3) * y[3];
putpixel (xt, yt, WHITE);
}
for (i=0; i<4; i++)
putpixel (x[i], y[i], YELLOW);
getch();
closegraph();
return;
}
43
Void main()
{
int x[4], y[4];
int i;
printf ("Enter the x- and y-coordinates of the four control points.n");
for (i=0; i<4; i++)
scanf ("%d%d", &x[i], &y[i]);
bezier (x, y);
}
44
OUTPUT:
RESULT:
45
13. MOVING CIRCLE IN DIFFERENT
DIRECTIONS
AIM:
ALGORITHM:
46
SOURCE CODE:
#include<stdio.h>
#include<graphics.h>
#include<conio.h>
#include<dos.h>
void main()
{
int gd=DETECT,gm,i;
initgraph(&gd,&gm,"C:TurboC3BGI");
//for moving circle from left to right,the following loop works
for(i=50;i<=getmaxx();i++)
{
setcolor(3);
setfillstyle(SOLID_FILL,9);
circle(50+i,50,50);
floodfill(52+i,52,3);
delay(20);
cleardevice();
}
//for moving circle from right to left, the following loop works
for(i=getmaxy();i>=0;i--)
{
setcolor(3);
setfillstyle(SOLID_FILL,9);
circle(i,50,50);
floodfill(i+2,52,3);
delay(20);
cleardevice();
}
//for moving circle from top to bottom,the following loop works
47
for(i=50;i<=getmaxy();i++)
{
setcolor(3);
setfillstyle(SOLID_FILL,9);
circle(50,i,50);
floodfill(52,i+2,3);
delay(20);
cleardevice();
}
//for moving circle from bottom to top,the following loop works
for(i=getmaxy();i>=0;i--)
{
setcolor(3);
setfillstyle(SOLID_FILL,9);
circle(50,i,50);
floodfill(52,i+2,3);
delay(20);
cleardevice();
}
//for moving circle in diagonal direction,the following loop works
for(i=50;i<=getmaxx();i++)
{
setcolor(3);
setfillstyle(SOLID_FILL,9);
circle(i,i,50);
floodfill(i+2,i+2,3);
delay(20);
cleardevice();
}
48
//for moving circle in reverse diagonal direction,the following loop
works
for(i=getmaxx();i>=0;i--)
{
setcolor(3);
setfillstyle(SOLID_FILL,9);
circle(i,i,50);
floodfill(i+2,i+2,3);
delay(20);
cleardevice();
}
getch();
}
49
OUTPUT:
RESULT:
50
14. MAN WALKING USING SIMPLE
ANIMATION
AIM:
ALGORITHM:
51
SOURCE CODE:
#include<stdio.h>
#include<dos.h>
#include<conio.h>
#include<graphics.h>
#include<stdlib.h>
void main()
{
int gd = DETECT, gm = DETECT, c = -200, i = 0, x = 40, l = 15, h =
15, ht = 0;
initgraph(&gd, &gm, "C:TurboC3BGI");
cleardevice();
setcolor(BROWN);
line(0, 201, 600, 201);
cont:
while (!kbhit()) {
setcolor(4);
ellipse(x, 100, 0, 180, 50, 30);
line(x - 50, 100, x + 50, 100);
line(x, 100, x, 150);
circle(x - 20, 115, 15);
line(x - 20, 130, x - 20, 175);
line(x - 20, 175, x - 20 - l, 200);
line(x - 20, 175, x - 20 + l, 200);
line(x - 20, 140, x, 150);
line(x - 20, 140, x - 20 - h, 160);
setcolor(0);
delay(50);
ellipse(x, 100, 0, 180, 50, 30);
line(x - 50, 100, x + 50, 100);
line(x, 100, x, 150);
circle(x - 20, 115, 15);
52
line(x - 20, 130, x - 20, 175);
line(x - 20, 175, x - 20 - l, 200);
line(x - 20, 175, x - 20 + l, 200);
line(x - 20, 140, x, 150);
line(x - 20, 140, x - 20 - h, 160);
line(x + 50, 100, x + 50, 200);
x++;
l--;
if (l == -15)
l = 15;
if (ht == 1)
h++;
else
h--;
if (h == 15)
ht = 0;
else if (h == -15)
ht = 1;
}
if (getch() == ' ') {
while (!kbhit());
getch();
goto cont;
}
}
53
OUTPUT:
RESULT:
54
15 .a COLORING THE OBJECT USING
4-CONNECTED FLOODFILL
AIM:
ALGORITHM:
55
SOURCE CODE:
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
void flood(int,int,int,int);
void main()
{
int gd,gm=DETECT;
clrscr();
detectgraph(&gd,&gm);
initgraph(&gd,&gm,"C:TurboC3BGI");
rectangle(50,50,100,100);
flood(55,55,9,0);
getch();
}
void flood(int x,int y, int fill_col, int old_col)
{
if(getpixel(x,y)==old_col)
{
delay(10);
putpixel(x,y,fill_col);
flood(x+1,y,fill_col,old_col);
flood(x-1,y,fill_col,old_col);
flood(x,y+1,fill_col,old_col);
flood(x,y-1,fill_col,old_col);
}
}
56
OUTPUT:
RESULT:
57
15. b COLORING THE OBJECT
USING FLOODFILL FUNCTION
AIM:
ALGORITHM:
58
SOURCE CODE:
#include<graphics.h>
#include<conio.h>
main()
{
int gd = DETECT, gm;
initgraph(&gd, &gm, "C:TurboC3BGI");
setcolor(RED);
circle(100,100,50);
floodfill(100,100,RED);
getch();
closegraph();
return 0;
}
59
OUTPUT:
RESULT:
60

Contenu connexe

Tendances

Computer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsComputer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsKandarp Tiwari
 
Oops practical file
Oops practical fileOops practical file
Oops practical fileAnkit Dixit
 
Chapter 1 : Balagurusamy_ Programming ANsI in C
Chapter 1  :  Balagurusamy_ Programming ANsI in C Chapter 1  :  Balagurusamy_ Programming ANsI in C
Chapter 1 : Balagurusamy_ Programming ANsI in C BUBT
 
Computer graphics lab report with code in cpp
Computer graphics lab report with code in cppComputer graphics lab report with code in cpp
Computer graphics lab report with code in cppAlamgir Hossain
 
éNoncés+corrections bac2009
éNoncés+corrections bac2009éNoncés+corrections bac2009
éNoncés+corrections bac2009Morom Bil Morom
 
Data Structures Using C Practical File
Data Structures Using C Practical File Data Structures Using C Practical File
Data Structures Using C Practical File Rahul Chugh
 
Bresenham's line drawing algorithm
Bresenham's line drawing algorithmBresenham's line drawing algorithm
Bresenham's line drawing algorithmMani Kanth
 
Solid C++ by Example
Solid C++ by ExampleSolid C++ by Example
Solid C++ by ExampleOlve Maudal
 
Virtual function in C++ Pure Virtual Function
Virtual function in C++ Pure Virtual Function Virtual function in C++ Pure Virtual Function
Virtual function in C++ Pure Virtual Function Kamlesh Makvana
 
Java Programs Lab File
Java Programs Lab FileJava Programs Lab File
Java Programs Lab FileKandarp Tiwari
 
Practical File of C Language
Practical File of C LanguagePractical File of C Language
Practical File of C LanguageRAJWANT KAUR
 
Graphics in C programming
Graphics in C programmingGraphics in C programming
Graphics in C programmingKamal Acharya
 
Two dimensional array
Two dimensional arrayTwo dimensional array
Two dimensional arrayRajendran
 
Xi CBSE Computer Science lab programs
Xi CBSE Computer Science lab programsXi CBSE Computer Science lab programs
Xi CBSE Computer Science lab programsProf. Dr. K. Adisesha
 
Call by value
Call by valueCall by value
Call by valueDharani G
 

Tendances (20)

Computer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsComputer Graphics Lab File C Programs
Computer Graphics Lab File C Programs
 
Oops practical file
Oops practical fileOops practical file
Oops practical file
 
Chapter 1 : Balagurusamy_ Programming ANsI in C
Chapter 1  :  Balagurusamy_ Programming ANsI in C Chapter 1  :  Balagurusamy_ Programming ANsI in C
Chapter 1 : Balagurusamy_ Programming ANsI in C
 
Computer graphics lab report with code in cpp
Computer graphics lab report with code in cppComputer graphics lab report with code in cpp
Computer graphics lab report with code in cpp
 
éNoncés+corrections bac2009
éNoncés+corrections bac2009éNoncés+corrections bac2009
éNoncés+corrections bac2009
 
Data Structures Using C Practical File
Data Structures Using C Practical File Data Structures Using C Practical File
Data Structures Using C Practical File
 
Bresenham's line drawing algorithm
Bresenham's line drawing algorithmBresenham's line drawing algorithm
Bresenham's line drawing algorithm
 
Unit 11. Graphics
Unit 11. GraphicsUnit 11. Graphics
Unit 11. Graphics
 
Solid C++ by Example
Solid C++ by ExampleSolid C++ by Example
Solid C++ by Example
 
Virtual function in C++ Pure Virtual Function
Virtual function in C++ Pure Virtual Function Virtual function in C++ Pure Virtual Function
Virtual function in C++ Pure Virtual Function
 
Résumer arithmétique
Résumer arithmétiqueRésumer arithmétique
Résumer arithmétique
 
Computer graphics
Computer graphics   Computer graphics
Computer graphics
 
Java Programs Lab File
Java Programs Lab FileJava Programs Lab File
Java Programs Lab File
 
Practical File of C Language
Practical File of C LanguagePractical File of C Language
Practical File of C Language
 
Ansi c
Ansi cAnsi c
Ansi c
 
Graphics in C programming
Graphics in C programmingGraphics in C programming
Graphics in C programming
 
Two dimensional array
Two dimensional arrayTwo dimensional array
Two dimensional array
 
Xi CBSE Computer Science lab programs
Xi CBSE Computer Science lab programsXi CBSE Computer Science lab programs
Xi CBSE Computer Science lab programs
 
Call by value
Call by valueCall by value
Call by value
 
Graphics in C++
Graphics in C++Graphics in C++
Graphics in C++
 

Similaire à Computer graphics lab manual

Computer graphics programs in c++
Computer graphics programs in c++Computer graphics programs in c++
Computer graphics programs in c++Ankit Kumar
 
computer graphics practicals
computer graphics practicalscomputer graphics practicals
computer graphics practicalsManoj Chauhan
 
Assignment on Numerical Method C Code
Assignment on Numerical Method C CodeAssignment on Numerical Method C Code
Assignment on Numerical Method C CodeSyed Ahmed Zaki
 
Computer graphics File for Engineers
Computer graphics File for EngineersComputer graphics File for Engineers
Computer graphics File for Engineersvarun arora
 
2Bytesprog2 course_2014_c9_graph
2Bytesprog2 course_2014_c9_graph2Bytesprog2 course_2014_c9_graph
2Bytesprog2 course_2014_c9_graphkinan keshkeh
 
C graphics programs file
C graphics programs fileC graphics programs file
C graphics programs fileshubham kanojia
 
Program to reflecta triangle
Program to reflecta triangleProgram to reflecta triangle
Program to reflecta triangleTanya Makkar
 
C Prog - Pointers
C Prog - PointersC Prog - Pointers
C Prog - Pointersvinay arora
 
第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」
第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」
第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」Ken'ichi Matsui
 
C programs Set 2
C programs Set 2C programs Set 2
C programs Set 2Koshy Geoji
 
Fractal Rendering in Developer C++ - 2012-11-06
Fractal Rendering in Developer C++ - 2012-11-06Fractal Rendering in Developer C++ - 2012-11-06
Fractal Rendering in Developer C++ - 2012-11-06Aritra Sarkar
 
1. Translation program#includestdio.h#includeconio.h#incl.pdf
1. Translation program#includestdio.h#includeconio.h#incl.pdf1. Translation program#includestdio.h#includeconio.h#incl.pdf
1. Translation program#includestdio.h#includeconio.h#incl.pdfsutharbharat59
 
Coscup2021-rust-toturial
Coscup2021-rust-toturialCoscup2021-rust-toturial
Coscup2021-rust-toturialWayne Tsai
 

Similaire à Computer graphics lab manual (20)

Computer graphics
Computer graphics   Computer graphics
Computer graphics
 
Computer graphics programs in c++
Computer graphics programs in c++Computer graphics programs in c++
Computer graphics programs in c++
 
computer graphics practicals
computer graphics practicalscomputer graphics practicals
computer graphics practicals
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
Assignment on Numerical Method C Code
Assignment on Numerical Method C CodeAssignment on Numerical Method C Code
Assignment on Numerical Method C Code
 
Graphics point clipping c program
Graphics point clipping c programGraphics point clipping c program
Graphics point clipping c program
 
Computer graphics File for Engineers
Computer graphics File for EngineersComputer graphics File for Engineers
Computer graphics File for Engineers
 
2Bytesprog2 course_2014_c9_graph
2Bytesprog2 course_2014_c9_graph2Bytesprog2 course_2014_c9_graph
2Bytesprog2 course_2014_c9_graph
 
Struct examples
Struct examplesStruct examples
Struct examples
 
C graphics programs file
C graphics programs fileC graphics programs file
C graphics programs file
 
Program to reflecta triangle
Program to reflecta triangleProgram to reflecta triangle
Program to reflecta triangle
 
C Prog - Pointers
C Prog - PointersC Prog - Pointers
C Prog - Pointers
 
第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」
第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」
第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」
 
Cs580
Cs580Cs580
Cs580
 
C programs Set 2
C programs Set 2C programs Set 2
C programs Set 2
 
C++ TUTORIAL 9
C++ TUTORIAL 9C++ TUTORIAL 9
C++ TUTORIAL 9
 
Fractal Rendering in Developer C++ - 2012-11-06
Fractal Rendering in Developer C++ - 2012-11-06Fractal Rendering in Developer C++ - 2012-11-06
Fractal Rendering in Developer C++ - 2012-11-06
 
1. Translation program#includestdio.h#includeconio.h#incl.pdf
1. Translation program#includestdio.h#includeconio.h#incl.pdf1. Translation program#includestdio.h#includeconio.h#incl.pdf
1. Translation program#includestdio.h#includeconio.h#incl.pdf
 
week-8x
week-8xweek-8x
week-8x
 
Coscup2021-rust-toturial
Coscup2021-rust-toturialCoscup2021-rust-toturial
Coscup2021-rust-toturial
 

Plus de Uma mohan

Web technology javascript
Web technology   javascriptWeb technology   javascript
Web technology javascriptUma mohan
 
Web programming css
Web programming cssWeb programming css
Web programming cssUma mohan
 
Web programming xml
Web programming  xmlWeb programming  xml
Web programming xmlUma mohan
 
Rdbms ER model
Rdbms ER modelRdbms ER model
Rdbms ER modelUma mohan
 
Programming in c arrays
Programming in c   arraysProgramming in c   arrays
Programming in c arraysUma mohan
 
Dip color image processing
Dip  color image processingDip  color image processing
Dip color image processingUma mohan
 
Data structure graphs
Data structure  graphsData structure  graphs
Data structure graphsUma mohan
 
Data structure stack
Data structure   stackData structure   stack
Data structure stackUma mohan
 
Data Structure - Elementary Data Organization
Data Structure - Elementary  Data Organization Data Structure - Elementary  Data Organization
Data Structure - Elementary Data Organization Uma mohan
 
DS Introduction
DS IntroductionDS Introduction
DS IntroductionUma mohan
 
Cg introduction
Cg introductionCg introduction
Cg introductionUma mohan
 

Plus de Uma mohan (17)

Web technology javascript
Web technology   javascriptWeb technology   javascript
Web technology javascript
 
Web programming css
Web programming cssWeb programming css
Web programming css
 
Web programming xml
Web programming  xmlWeb programming  xml
Web programming xml
 
Rdbms ER model
Rdbms ER modelRdbms ER model
Rdbms ER model
 
Rdbms 2
Rdbms 2Rdbms 2
Rdbms 2
 
Rdbms 1
Rdbms 1Rdbms 1
Rdbms 1
 
Programming in c arrays
Programming in c   arraysProgramming in c   arrays
Programming in c arrays
 
Json
JsonJson
Json
 
Dip
DipDip
Dip
 
Dip color image processing
Dip  color image processingDip  color image processing
Dip color image processing
 
Data structure graphs
Data structure  graphsData structure  graphs
Data structure graphs
 
Data structure stack
Data structure   stackData structure   stack
Data structure stack
 
Animation
AnimationAnimation
Animation
 
Data Structure - Elementary Data Organization
Data Structure - Elementary  Data Organization Data Structure - Elementary  Data Organization
Data Structure - Elementary Data Organization
 
DS Introduction
DS IntroductionDS Introduction
DS Introduction
 
Quick sort
Quick sortQuick sort
Quick sort
 
Cg introduction
Cg introductionCg introduction
Cg introduction
 

Dernier

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 

Dernier (20)

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 

Computer graphics lab manual