Today Friends I Want To Tell You How We Write a Simple Animated
Moving Car Program Using Computer Graphics in C...
Here is the source code for Animated Moving Car using graphics.h
header file...
Complied On :- Turbo C
Graphics Header File :- graphics.h
Used Pre-Defined Graphics Function :-
Save :- .c file (C Program)
Created By :- Deepak Gupta
www.i-world-tech.blogspot.in
Moving Car Program Using Computer Graphics in C...
Here is the source code for Animated Moving Car using graphics.h
header file...
Complied On :- Turbo C
Graphics Header File :- graphics.h
Used Pre-Defined Graphics Function :-
1. initgraph() :- Initializes the graphics system . 2. settextstyle() :- Style and Font of the Text . 3. rectangle() :- Draws a rectangle in graphics mode. 4.circle() :- Draws a circle in graphics mode. 5.setcolor() :- Set the specified Color in graphics mode. 6.delay() :- Delay of the Specified time. 7.closegraph() :- Shuts down the graphics system. |
Save :- .c file (C Program)
Created By :- Deepak Gupta
www.i-world-tech.blogspot.in
#include<stdio.h> #include<graphics.h> void main() { int gd=DETECT,gm; int i ,j=0; initgraph(&gd,&gm,"C:\\TC\\BGI"); settextstyle(GOTHIC_FONT,HORIZ_DIR,4); getch(); i=0; while(i<=420) { rectangle(150+i,350,200+i,400); rectangle(50+i,275,150+i,400); circle(175+i,410,10); circle(75+i,410,10); setcolor(j++); delay(100); i=i+10; cleardevice(); } getch(); closegraph(); } |
---|
Thank You To All My Reader
Related Post :-
bgi error comming
ReplyDeletei tried alot
but it didnt worked ma very upset
@hameed..
ReplyDeletein initgraph(&gd,&gm,"C:\\TC\\BGI") function you give the path of graphics driver according your system...may v differ for ur system..in my system it is in c -> TC folder -> BGI..
and this program is correctly running in my system...
Moving Car...Working..:)
ReplyDeleteAnimated Car...:):)nice..
ReplyDeletenice
ReplyDeleteyou are awesome
ReplyDelete