Thursday, August 16, 2012
Program to generate random circle in Computer Graphics Using C/C++
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<time.h>
#include<stdlib.h>
#include<dos.h>
void main()
{
int midx,midy,I,gdriver=DETECT,gmode,radius;
initgraph(&gdriver,&gmode,”c:\\tc\\bgi”);
midx=getmaxx()/2;
midy=getmaxy()/2;
randomize();
while(!kbhit())
{
circle(random(midx), random(midy), random(radius));
setcolor(random(getmaxcolor()));
}
getch();
closegraph();
}
Related Posts : C,
cg lab,
cg lab programs,
Computer Graphics programs,
programming
Subscribe to:
Post Comments (Atom)
Hey buddy there's no output coming after running the program just a black screen is UPLOADING.
ReplyDelete