Simple Computer Graphics Programs

Simple Computer Graphics Program

1.Flag

#include<stdio.h>
#include<graphics.h>
void main(){
int driver=DETECT,mode;
initgraph(&driver,&mode,"d:\\tc\\bgi");
line(100,200,100,600);
circle(200,225,25);
rectangle(100,150,300,300);
line(100,200,300,200);
line(100,250,300,250);
line(200,200,200,250);
line(175,225,225,225);
line(178,208,220,241);
line(178,241,220,208);
settextstyle(1,0,3) ;
outtextxy(170,120,"FLAG");
getch();
closegraph();
}

2.Nature

#include<stdio.h>
#include<graphics.h>
void main(){
int driver=DETECT,mode;
initgraph(&driver,&mode,"d:\\tc\\bgi");
line(120,120,180,70);
line(180,70,225,120);
line(225,120,260,70);
line(460,200,620,300);
setfillstyle(1,YELLOW);
fillellipse(300,200,15,15);
setfillstyle(1,GREEN);
fillellipse(150,400,15,10);
line(145,410,145,480);
line(155,410,155,480);
getch();
closegraph();
}

3.DDA line drawing algorithm

#include<graphics.h>
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main() {
int x1,x;
int y1,y;
float xincre;
float yincre;
int x2;
float steps;
int y2,dx,dy;
int driver=DETECT,mode;
initgraph(&driver,&mode,"d:\\tc\\bgi");

printf("ENTER TWO END POINTS\n");
printf("ENTER X1\n");
scanf("%d",&x1);
printf("ENTER Y1\n");
scanf("%d",&y1);
printf("ENTER X2\n");
scanf("%d",&x2);
printf("ENTER Y2\n");
scanf("%d",&y2);
dx=(x2-x1);
dy=(y2-y1);
if(abs(dx)>abs(dy)) {
steps=abs(dx);
}
else {
steps=abs(dy);
}
xincre=(dx/(float)steps);
yincre=(dy/(float)steps);
x=x1;
y=y1;
while(steps>0) {
x=x+xincre;
y=y+yincre;
putpixel(x,y,RED);
steps=steps-1;
}
//printf("value of dx is\n%d",dx);
//printf("\nvalue of dy is\n%d",dy);
getch();
closegraph();
}

4.Bresenham's line drawing algorithm

#include<stdio.h>
#include<graphics.h>
void main(){
int x1,x2,y1,y2,dx,dy,p0,temp,k;
int x,y;
int driver=DETECT,mode;
initgraph(&driver,&mode,"d:\\tc\\bgi");
printf("enter the end points\n");
scanf("%d\n%d\n%d\n%d",&x1,&y1,&x2,&y2);
x=x1;
y=y1;
dx=x2-x1;
dy=y2-y1;
temp=((2*dy)-(2*dx));
p0=((2*dy)-dx);
//printf("value of p0 is%d",p0);
//k=0;
for(k=1;k<=dx;k++) {
if(p0<0){
putpixel(x,y,RED);
p0=(p0+(2*dy));
x=x+1;
//y=y+k;
}
else {
putpixel(x,y,RED);
p0=(p0+(2*dy)-2*dx);
x=x+1;
y=y+1;
}
}
getch();
closegraph();
}


5.Polar circle algorithm

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<math.h>
void main()
{
float r,x,y,xc,yc,i;
int driver=DETECT,mode;
initgraph(&driver,&mode,"d:\\tc\\bgi");
printf("Enter the centre coordinates");
scanf("%f%f",&xc,&yc);
printf("Enter the radius");
scanf("%f",&r);
for(i=0;i<=360;i++)
{
x=xc+r*cos(i);
y=yc+r*sin(i);
putpixel(x,y,BLUE);
}
getch();
closegraph();
}

6.Midpoint circle algorithm

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<math.h>
void display(int xc,int yc,int x0,int y0);
void main()
{
float r,x,y,xc,yc,x0,y0,i,p0;
int driver=DETECT,mode;
initgraph(&driver,&mode,"d:\\tc\\bgi");
printf("Enter the center coordinates");
scanf("%f%f",&xc,&yc) ;
printf("Enter the radius");
scanf("%f",&r);
x0=0;
y0=r;
p0=(5/4)-(r);
while(x0<=y0){
if(p0<0){
x0=x0+1;
y0=y0;
p0=p0+2*x0+1;
}
else{
x0=x0+1;
y0=y0-1;
p0=p0+(2*x0)+1-(2*y0);
}
display(xc,yc,x0,y0);
}
getch();

closegraph();
}
void display(int xc,int yc,int x0,int y0)
{
putpixel(x0+xc,y0+yc,RED);
putpixel(-x0+xc,y0+yc,RED);
putpixel(x0+xc,-y0+yc,RED);
putpixel(-x0+xc,-y0+yc,RED);
putpixel(y0+yc,x0+xc,RED);
putpixel(-y0+yc,x0+xc,RED);
putpixel(y0+yc,-x0+yc,RED);
putpixel(-y0+yc,-x0+xc,RED);
}

7.Bresenham's circle algorithm

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<math.h>
void display(int xc,int yc,int x0,int y0);
void main()
{
float r,x,y,xc,yc,x0,y0,i,d0;
int driver=DETECT,mode;
initgraph(&driver,&mode,"d:\\tc\\bgi");
printf("Enter the center coordinates");
scanf("%f%f",&xc,&yc) ;
printf("Enter the radius");
scanf("%f",&r);
x0=0;
y0=r;
d0=3-2*r;
while(x0<=y0){
if(d0<0){
x0=x0+1;
y0=y0;
d0=d0+4*x0+6;
}
else{
x0=x0+1;
y0=y0-1;
d0=d0+4*(x0-y0)+10;
}
display(xc,yc,x0,y0);
}
getch();

closegraph();
}
void display(int xc,int yc,int x0,int y0)
{
putpixel(x0+xc,y0+yc,RED);
putpixel(-x0+xc,y0+yc,RED);
putpixel(x0+xc,-y0+yc,RED);
putpixel(-x0+xc,-y0+yc,RED);
putpixel(y0+yc,x0+xc,RED);
putpixel(-y0+yc,x0+xc,RED);
putpixel(y0+yc,-x0+yc,RED);
putpixel(-y0+yc,-x0+xc,RED);
}


8.Ellipse


#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<math.h>
void main()
{
float rx,ry,x,y,xc,yc,i;
int driver=DETECT,mode;
initgraph(&driver,&mode,"d:\\tc\\bgi");
printf("Enter the centre coordinates");
scanf("%f%f",&xc,&yc);
printf("Enter the radii");
scanf("%f%f",&rx,&ry);
for(i=0;i<=360;i++)
{
x=xc+rx*cos(i);
y=yc+ry*sin(i);
putpixel(x,y,RED);
}
getch();
closegraph();
}

9.Boundary fill algorithm

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<math.h>
void boundaryfill4(int x,int y,int fill,int boundary);
void main()
{
float r,x,y,xc,yc,i;
int driver=DETECT,mode;
initgraph(&driver,&mode,"d:\\tc\\bgi");
printf("Enter the centre coordinates");
scanf("%f%f",&xc,&yc);
printf("Enter the radius");
scanf("%f",&r);
for(i=0;i<=360;i++)
{
x=xc+r*cos(i);
y=yc+r*sin(i);
putpixel(x,y,4);
}
boundaryfill4(xc,yc,3,4);
getch();
closegraph();
}

void boundaryfill4(int x,int y,int fill,int boundary)
{
int current;
current=getpixel(x,y);
if((current!=boundary)&&(current!=fill)){
putpixel(x,y,fill);
boundaryfill4(x+1,y,fill,boundary);
boundaryfill4(x-1,y,fill,boundary);
boundaryfill4(x,y+1,fill,boundary);
boundaryfill4(x,y-1,fill,boundary);
}
}

10.flood fill algorithm

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<math.h>
void floodfill4(int x,int y,int fill,int old);
void dda(int x1,int x2,int y1,int y2);
void main()
{ int x3,y3;

int driver=DETECT,mode;
initgraph(&driver,&mode,"d:\\tc\\bgi");
dda(0,0,0,5);
dda(0,0,0,5);
dda(0,0,0,5);


floodfill4(x3,y3,4,3);
getch();
closegraph();
}

void floodfill4(int x,int y,int fill,int old)
{
if(getpixel(x,y)==old){
putpixel(x,y,fill);
floodfill4(x+1,y,fill,old);
floodfill4(x-1,y,fill,old);
floodfill4(x,y+1,fill,old);
floodfill4(x,y-1,fill,old);
}
}
 void dda(int x3,int x4,int y3,int y4){
int x;
int y;
float xincre;
float yincre;
float steps;
int dx,dy;
printf("ENTER TWO END POINTS\n");
printf("ENTER X1\n");
scanf("%d",&x3);
printf("ENTER Y1\n");
scanf("%d",&y3);
printf("ENTER X2\n");
scanf("%d",&x4);
printf("ENTER Y2\n");
scanf("%d",&y4);
dx=(x4-x3);
dy=(y4-y3);
if(abs(dx)>abs(dy)) {
steps=abs(dx);
}
else {
steps=abs(dy);
}
xincre=(dx/(float)steps);
yincre=(dy/(float)steps);
x=x3;
y=y3;
while(steps>0) {
x=x+xincre;
y=y+yincre;
putpixel(x,y,3);
steps=steps-1;
} }


11.Translation of a line

#include<graphics.h>
#include<stdio.h>
#include<math.h>
#include<conio.h>
void dda(int x1,int y1,int x2,int y2,int fill)
{
float x,y,dx,dy,i,steps=0;
float xincr,yincr;
dx=x2-x1;
dy=y2-y1;
if(abs(dx)>abs(dy))
steps=abs(dx);
else
steps=abs(dy);
xincr=dx/(float)steps;
yincr=dy/(float)steps;
x=x1;
y=y1;
for(i=0;i<steps;i++)
{
x=x+xincr;
y=y+yincr;
putpixel(x,y,fill);
}
}
void main()
{
int xa,ya,xb,yb,xc,yc,xa1,ya1,xb1,yb1,xc1,yc1,tx,ty;
int driver=DETECT,mode;
initgraph(&driver,&mode,"d:\\tc\\bgi");
printf("enter the cordinates of A");
scanf("%d%d",&xa,&ya);
printf("enter the cordinates of B");
scanf("%d%d",&xb,&yb);
printf("enter the cordinates of C");
scanf("%d%d",&xc,&yc);
dda(xa,ya,xb,yb,4);
dda(xb,yb,xc,yc,4);
dda(xc,yc,xa,ya,4);
printf("enter the translation vectors");

scanf("%d%d",&tx,&ty);
xa1=xa+tx;
ya1=ya+ty;
xb1=xb+tx;
yb1=yb+ty;
xc1=xc+tx;
yc1=yc+ty;
dda(xa1,ya1,xb1,yb1,5);
dda(xb1,yb1,xc1,yc1,5);
dda(xc1,yc1,xa1,ya1,5);
getch();
closegraph();
}

12.Scaling of a triangle

#include<graphics.h>
#include<stdio.h>
#include<math.h>
#include<conio.h>
void dda(int x1,int y1,int x2,int y2,int fill)
{
float x,y,dx,dy,i,steps=0;
float xincr,yincr;
dx=x2-x1;
dy=y2-y1;
if(abs(dx)>abs(dy))
steps=abs(dx);
else
steps=abs(dy);
xincr=dx/(float)steps;
yincr=dy/(float)steps;
x=x1;
y=y1;
for(i=0;i<steps;i++)
{
x=x+xincr;
y=y+yincr;
putpixel(x,y,fill);
}
}
void main()
{
int xa,ya,xb,yb,xc,yc,xa1,ya1,xb1,yb1,xc1,yc1,sx,sy;
int driver=DETECT,mode;
initgraph(&driver,&mode,"d:\\tc\\bgi");
printf("enter the cordinates of A");
scanf("%d%d",&xa,&ya);
printf("enter the cordinates of B");
scanf("%d%d",&xb,&yb);
printf("enter the cordinates of C");
scanf("%d%d",&xc,&yc);
dda(xa,ya,xb,yb,2);
dda(xb,yb,xc,yc,2);
dda(xc,yc,xa,ya,2);
printf("enter the scaling factor");
scanf("%d%d",&sx,&sy);
xa1=(xa*sx)+(xa*(1-sx));
ya1=(ya*sy)+(ya*(1-sy));
xb1=(xb*sx)+(xa*(1-sx));
yb1=(yb*sy)+(ya*(1-sy));
xc1=(xc*sx)+(xa*(1-sx));
yc1=(yc*sy)+(ya*(1-sy));
dda(xa1,ya1,xb1,yb1,8);
dda(xb1,yb1,xc1,yc1,8);
dda(xc1,yc1,xa1,ya1,8);
getch();
closegraph();
}

13.Shearing of a rectangle

#include<graphics.h>
#include<stdio.h>
#include<conio.h>
#include<math.h>
void dda(int x1,int y1,int x2,int y2,int fill);
void main()
{
int x1,y1,x2,y2,ch,shx,shy,xa,xb,ya,yb;
int driver=DETECT,mode;
initgraph(&driver,&mode,"d:\\tc\\bgi");
printf("Enter the coordinates of A\n");
scanf("%d%d",&x1,&y1);
printf("Enter the coordinates of C\n");
scanf("%d%d",&x2,&y2);
dda(x1,y1,x2,y1,5);
dda(x1,y1,x1,y2,5);
dda(x1,y2,x2,y2,5);
dda(x2,y1,x2,y2,5);
printf("Enter your choice\n1:About x axis\n2:About y axis\n");
scanf("%d",&ch);
switch(ch)
{
 case 1:printf("Enter the shearing factor:");
scanf("%d",&shx);
xa=x1+(shx*y1);
xb=x2+(shx*y1) ;
dda(xa,y1,xb,y1,2);
dda(xa,y1,x1,y2,2);
dda(xb,y1,x2,y2,2);
break;
 case 2:printf("Enter the shearing factor:");
scanf("%d",&shy);
ya=(x2*shy)+y2;
yb=(x2*shy)+y1;
dda(x2,yb,x2,ya,2);
dda(x1,y1,x2,yb,2);
dda(x1,y2,x2,ya,2);
break;
 default:printf("Invalid choice\n");
break;
}
getch();
closegraph();
}
void dda(int x1,int y1,int x2,int y2,int fill)
{
float dx,dy,steps=0,x,y,i,xincr,yincr;
dx=x2-x1;
dy=y2-y1;
if(abs(dx)>abs(dy))
steps=abs(dx);
else
steps=abs(dy);
xincr=dx/(float)steps;
yincr=dy/(float)steps;
x=x1;
y=y1;
for(i=0;i<steps;i++)
{
x=x+xincr;
y=y+yincr;
putpixel(x,y,fill);
}
}

14.Rotation of a line

#include<graphics.h>
#include<stdio.h>
#include<conio.h>
#include<math.h>
void dda(int x1,int y1,int x2,int y2);

void main()
{
int  x1,x2,y1,y2,s,xr,yr,dx,dy,x,y;
float r;
int driver=DETECT,mode;
initgraph(&driver,&mode,"d:\\tc\\bgi");

printf("enter the end points");
scanf("%d",&x1);
scanf("%d",&y1);
 scanf("%d",&x2);
scanf("%d",&y2);
 dda(x1,y1,x2,y2);
 printf("enter the rotation value");
scanf("%d",&s);
r=(s*3.14)/180;
dx=x2-x1;
dy=y2-y1;
xr=x1+(dx*cos(r)-dy*sin(r));
yr=y1+(dx*sin(r)+dy*cos(r));
 dda(x1,y1,xr,yr);
getch();
closegraph();
}
void dda(int x1,int y1,int x2,int y2)
{ int steps,xincr,yincr,dx,dy,x,y,a,s;

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(s=0;s<=steps;s++)
{
x=x+xincr;
y=y+yincr;
putpixel(x,y,a);
}
}


15.Reflection of a line

#include<graphics.h>
#include<stdio.h>
#include<conio.h>
#include<math.h>
void dda(int xx,int yy,int xy,int yx,int a);
void main()
{
int  xc,yc,x1,x2,x3,y1,y2,x11,x12,y11,y12,n;
int driver=DETECT,mode;
initgraph(&driver,&mode,"d:\\tc\\bgi");
dda(320,0,320,480,20);
dda(0,240,640,240,20);
printf("Enter the points");
scanf("%d",&x1);
scanf("%d",&y1);
scanf("%d",&x2);
scanf("%d",&y2);
dda(x1,y1,x2,y2,2);
printf("\nEnter option \n1.Reflection about x-axis\n2.Reflection about y-axis\n3.Exit");
printf("\nEnter the choice");
do
{

scanf("%d",&n);
switch(n)
{
 case 1:x11=x1;
y11=480-y1;
x12=x2;
y12=480-y2;
dda(x11,y11,x12,y12,2);
break;

case 2 : x11=640-x1;
y11=y1;
x12=640-x2;
y12=y2;
dda(x11,y11,x12,y12,2);
break;
default: printf("wrong choice");
}
}while(n!=3);
getch();
closegraph();
}
void dda(int xx,int yy,int xy,int yx,int a)
{ int x,y,x1,y1,x2,y2,dx,dy,steps,xincr,yincr,i;

dx=xy-xx;
dy=yx-yy;
if(abs(dx)>abs(dy))
{
steps=abs(dx);
}
else
{
steps=abs(dy);
}
xincr=dx/steps;
yincr=dy/steps;
x=xx;
y=yy;
for(i=0;i<=steps;i++)
{
x=x+xincr;
y=y+yincr;
putpixel(x,y,a);
}
}

16.Point clipping

#include<graphics.h>
#include<conio.h>
#include<math.h>
void dda(int x1,int y1,int x2,int y2,int fill);
void check(int x,int y,int ,int ,int, int);
void main()
{
int x1,y1,x2,y2,ch,shx,shy,xa,xb,ya,yb,px,py;
int driver=DETECT,mode;
initgraph(&driver,&mode,"d:\\tc\\bgi");
printf("Enter the coordinates of A\n");
scanf("%d%d",&x1,&y1);
printf("Enter the coordinates of C\n");
scanf("%d%d",&x2,&y2);
dda(x1,y1,x2,y1,5);
dda(x1,y1,x1,y2,5);
dda(x1,y2,x2,y2,5);
dda(x2,y1,x2,y2,5);
do{
printf("Enter the points to check\n");
printf("Enter x & y coordinates:\n");
scanf("%d%d",&px,&py);
check(px,py,x1,x2,y1,y2);
printf("press 1 to check further");
scanf("%d",&ch);
}while(ch==1);
getch();
closegraph();
}
void dda(int x1,int y1,int x2,int y2,int fill)
{
float dx,dy,steps=0,x,y,i,xincr,yincr;
dx=x2-x1;
dy=y2-y1;
if(abs(dx)>abs(dy))
steps=abs(dx);
else
steps=abs(dy);
xincr=dx/(float)steps;
yincr=dy/(float)steps;
x=x1;
y=y1;
for(i=0;i<steps;i++)
{
x=x+xincr;
y=y+yincr;
putpixel(x,y,fill);
}
}
void check(int x,int y,int x1,int x2,int y1,int y2)
{
if((x>=x1&&x<=x2)&&(y>=y1&&y<=y2))
{putpixel(x,y,10);
}
else
{printf("Outside\n");
putpixel(x,y,25);   }
}

17.Line clipping

#include<graphics.h>
#include<stdio.h>
#include<conio.h>
#include<math.h>
float xmin,ymin,xmax,ymax;
void dda(float,float,float,float);
void main()
{
float x,y,a,b,c,d,e;
int driver=DETECT,mode;
initgraph(&driver,&mode,"d:\\tc\\bgi");
printf("Enter box coordinates:");
scanf("%f%f",&xmin,&ymin);
scanf("%f%f",&xmax,&ymax);
dda(xmin,ymin,xmax,ymin);
dda(xmax,ymin,xmax,ymax);
dda(xmin,ymax,xmax,ymax) ;
dda(xmin,ymax,xmin,ymin)  ;
do
{
printf("Enter coordinates of line:");
scanf("%f%f%f%f",&a,&b,&c,&d);
dda(a,b,c,d);
printf("Do u want to continue ?(0/1) : ");
scanf("%f",&e);
}
while(e==1);
getch();
closegraph();
}
void dda(float x1,float y1,float x2,float y2)
{
float dx,dy,xinc,yinc,x,y;
float steps;
int i;
dx=x2-x1;
dy=y2-y1;
if(abs(dx)>abs(dy))
{
steps=abs(dx);
}
else
{
steps=abs(dy);
}
xinc=dx/(float)steps;
yinc=dy/(float)steps;

x=x1;
y=y1;
putpixel(x,y,0);
for(i=0;i<=steps;i++)
{
x=x+xinc;
y=y+yinc;
if(((xmin<=x)&&(x<=xmax))&&((ymin<=y)&&(y<=ymax)))
{
putpixel(x,y,2);
}
else
{
putpixel(x,y,4);
}
}
}


18.Wheel rotation

#include<graphics.h>
#include<stdio.h>
#include<conio.h>
#include<math.h>
void dda(float,float,float,float,float);
void circle1(float,float,float,float);
void main()
{
float xc,yc,a,b,c,d,r;
float ang=45;
float ang1=90;
float i=0;
int s;
int driver=DETECT,mode;
initgraph(&driver,&mode,"d:\\tc\\bgi");
printf("enter centre and radius");
scanf("%f%f%f",&xc,&yc,&r);
printf("Enter your choice\n1.clockwise rotation\n2.anticlockwise rotation");
scanf("%d",&s);
if(s==1)
{
while(!kbhit())
{
ang=ang*(3.14/180);
a=r*cos(ang-i);
b=r*sin(ang-i);
ang1=ang1*(3.14/180);
c=r*cos(ang1-i);
d=r*sin(ang1-i);
circle1(r,xc+i,yc,6);
dda(xc+i+a,yc+b,xc+i-a,yc-b,6);
dda(xc+i+c,yc+d,xc+i-c,yc-d,6);
delay(20);
circle1(r,xc+i,yc,0);
dda(xc+i+a,yc+b,xc+i-a,yc-b,0);
dda(xc+i+c,yc+d,xc+i-c,yc-d,0);
i=i+1;
ang=ang+1;
ang1=ang1+1;
}}
else if(s==2)
{
while(!kbhit())
{
ang=ang*(3.14/180);
a=r*cos(ang+i);
b=r*sin(ang+i);
ang1=ang1*(3.14/180);
c=r*cos(ang1+i);
d=r*sin(ang1+i);
circle1(r,xc-i,yc,6);
dda(xc-i+a,yc+b,xc-i-a,yc-b,6);
dda(xc-i+c,yc+d,xc-i-c,yc-d,6);
delay(20);
circle1(r,xc-i,yc,0);
dda(xc-i+a,yc+b,xc-i-a,yc-b,0);
dda(xc-i+c,yc+d,xc-i-c,yc-d,0);
i=i+1;
ang=ang+1;
ang1=ang1+1;
}}
else
printf("Invalid choice");
getch();
closegraph();
}

void dda(float x1,float y1,float x2,float y2,float c)
{
float dx,dy,xinc,yinc,x,y;
float steps;
int i;
dx=x2-x1;
dy=y2-y1;
if(abs(dx)>abs(dy))
{
steps=abs(dx);
}
else
{
steps=abs(dy);
}
xinc=dx/(float)steps;
yinc=dy/(float)steps;

x=x1;
y=y1;
       putpixel(x,y,c);
for(i=0;i<=steps;i++)
{
x=x+xinc;
y=y+yinc;
putpixel(x,y,c);
}
}

void circle1(float r,float xc,float yc,float c)
{
float x=0;
float y=r;
float d0;
d0=3-(2*r);
while(x<=y)
{
if(d0<0)
{
d0=d0+4*x+6;
}
else
{
d0=d0+4*(x-y)+10;
y--;
}
x++;
putpixel(xc+x,yc+y,c);
putpixel(xc-x,yc+y,c);
putpixel(xc+x,yc-y,c);
putpixel(xc-x,yc-y,c);
putpixel(xc+y,yc+x,c);
putpixel(xc-y,yc+x,c);
putpixel(xc+y,yc-x,c);
putpixel(xc-y,yc-x,c);
}
}






No comments:

Post a Comment