0% found this document useful (0 votes)
13 views

Computer Graphics PROJRCT

The document describes a computer graphics project that creates an animated rainbow arc. It begins by including necessary header files and initializing graphics settings in the main function. A loop then gradually increases the size and changes the color of an arc on the screen using a delay function. The result is an animated, growing, and color-changing arc. The code uses basic graphics functions in Turbo C/C++ to demonstrate programming concepts like initializing graphics, drawing shapes, and creating simple animations.

Uploaded by

Mharukh Shaikh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Computer Graphics PROJRCT

The document describes a computer graphics project that creates an animated rainbow arc. It begins by including necessary header files and initializing graphics settings in the main function. A loop then gradually increases the size and changes the color of an arc on the screen using a delay function. The result is an animated, growing, and color-changing arc. The code uses basic graphics functions in Turbo C/C++ to demonstrate programming concepts like initializing graphics, drawing shapes, and creating simple animations.

Uploaded by

Mharukh Shaikh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

COMPUTER

GRAPHICS
ANIMATED
RAINBOW ARC
 INDEX

 INTRODUCTION

 ALGORITHM AND FLOWCHART

 WORKING OF PROJECT

 HARDWARE AND SOFTWARE

 CODE WITH OUTPUT

 APPLICATION

 CONCLUSION

 REFERENCE

 VOTE OF THANKS

3
INTRODUCTION
In computer graphics, a rainbow is a visual
representation of the natural meteorological phenomenon
created through the manipulation of light and color to
enhance the visual appeal of digital images,scenes and
animations .
ALGORITHM
Step 1:- Start

Step 2:-Includ e the req uired head er fi les for sta nda rd in put /out put , con sole
I/O, gra phics, and DOS functi ons.

Step3:- Defi ne t he ma in functi o n:

a. Declare the varia bles gdriver, gmo de, x, y, a nd i.

b. Initi a lize the graph ics mode usin g init grap h with th e specifi ed driver
(DE TEC T) an d mode. The BGI fi le "C:\Turb oc3NN BGI" is used for confi gurati o n.

c. Calculate th e center o f t he gra phics window by dividin g t he maximum X a nd


Y coordin ates by 2 a nd sto re t hem in x a nd y.

Step 4:- E nter a for loop th at iterates from 30 to 199:

ii. Set the co lor for drawin g a n a rc, with t he color in dex ba sed o n t he
current valu e of i.

iii. Draw an a rc in th e grap hics window, sta rti n g from the center (x, y ) wit h a
ra diu s from 0 to 180 degrees, where the radius cha nges wit h the loop variab le
i.

Step 5:-Aft er t he loop, wa it for a key press using getch ().

Step 6:- Stop

5
start

Declrare variable

FLOWCHART
” Loop
I=30 to
199

“ Delay function 100ms

Set color (i/10)

Increment i++

stop
It begins by including necessary header files for
graphics and input/output operations. In the
main function, it initializes graphics with specific
settings. It then calculates the center of the

WORKING OF screen and enters a loop where it gradually


increases the size and changes the color of an

PROJECT arc on the screen. This loop uses the delay


function to control animation speed, sets the
arc's color based on the loop variable i, and
draws the arc with varying radii. Finally, the
program waits for a key press with getch(). The
result is an animated, growing, and color-
changing arc on the screen.

7
HARDWARE AND SOFTWARE

KEYBOARD MOUSE M O N ITO R

TURBO C

8
CODE AND OUTPUT
CODE OUTPUT

9
APPLICATION

E D U C AT I O N A R T A N D A N I M AT I O N VISUAL EFFECTS S I M U L AT I O N S
It can be used as a learning tool It can be a starting The principles used in
to understand the basics of point for creating more Elements of this code
this code can be applied can be used to create
graphicsprogramming,including complex graphics and t o c r e a t e v i s u a l e ff e c t s i n
initializing animations,such as visual simulations for
movies, video games, or educational or training
graphics,drawingshapes and games,interactive art,or o t h e r m u l ti m e d i a
animations. multimedia purposes, like physics
projects. simulations.
applications.

10
CONCLUSION
• In short, the provided code is a simple, outdated graphics program that creates a basic animated
rainbow-like effect using the Turbo C/C++ environment.

11
https://en.m.Wikipedia.org

www.greekforgeeks.org
13

You might also like