INDEX
SR NO. TOPIC PAGE NO.
1 Introduction
2 Basic Graphics Pipeline
3 Basic Function Syntax
4 Software & Hardware Required
5 Coding
6 Algorithm of programme code
7 Output
8 Reference
Intoduction
PIXEL: A pixel (short for picture element) is a single point in a picture. On the monitor of a
computer, a pixel is usually a square. Every pixel has a color and all the pixels jointly are the
picture
GRAPHICS: What are graphics? Graphics are visual images or designs on some surface, such
as a wall, canvas, screen, paper, or stone to inform, present, or entertain. In contemporary use,
it contains a pictorial illustration of data, as in computer-aided design and manufacture, in
typesetting and the graphic arts, and in educational and recreational software. Images that are
developed by a computer are called computer graphics.
BELOW FIGURE BELOW DISPLAYS THE BASIC GRAPHICS PIPELINE :
Examples are photographs, drawings, line art, graphs, diagrams, typography, numbers,
symbols, geometric designs, maps, engineering drawings, or other images. Graphics often
merge text, illustration, and color. Graphic design may consist of the intended selection,
creation, or arrangement of typography alone, as in a brochure, flyer, poster, website, or book
without any other element. Clearness or effective communication may be the objective, a link
with other cultural elements may be sought, or merely, the creation of a distinctive style.
Basic Function Syntaxes :
Software & Hardware Required
Turbo C++ compiler: Turbo C++ is a paused C++ compiler and integrated development
environment and computer language initially from Borland. Most new it was allocated by
Embarcadero Technologies, which acquired all of Borland's compiler tools with the buy of its
CodeGear division in 2008. The original Turbo C++ product line was put on hold after 1994 and
was restored in 2006 as an introductory-level IDE, basically a stripped-down version of their
flagship C++Builder. Turbo C++ 2006 was released on September 5, 2006 and was available in
'Explorer' and 'Professional' editions
COMPUTER SYSTEM: I have utilized DELL INSPIRON, 8th generation WITH an INBUILT
WINDOWS 10 Operating system of 3.20 GHz INTEL Pentium Core processor with an i7
technology computer ( PC ). Dell Inspiron desktops and all-in-one PCs are developed with
innovative technology and the latest features
Coding
#include
#include
#include
#include
void firstCrown()
setfillstyle(SOLID_FILL,GREEN);
line(300,40,200,100);
line(300,40,400,100);
ellipse(300,100,180,360,98,30);
floodfill(310,50,WHITE);
void secondCrown()
setfillstyle(SOLID_FILL,MAGENTA);
line(250,125,180,160);
line(350,125,420,160);
ellipse(300,160,180,360,120,30);
floodfill(260,130,WHITE);
void thirdCrown()
setfillstyle(SOLID_FILL,GREEN);
line(230,185,150,230);
line(360,185,440,230);
ellipse(295,230,180,360,145,30);
floodfill(250,190,WHITE);
void trunk()
setfillstyle(SOLID_FILL,BROWN);
line(280,260,280,350);
line(320,260,320,350);
line(280,350,320,350);
floodfill(285,340,WHITE);
void main()
int gd = DETECT , gm ;
initgraph(&gd,&gm,"C:\\TURBOC3\\BGI");
int i,n;
printf("W");delay(50);
printf("E");delay(50);
printf("L");delay(50);
printf("C");delay(50);
printf("O");delay(50);
printf("M");delay(50);
printf("E ");delay(50);
printf("T");delay(50);
printf("O ");delay(50);
printf("O");delay(50);
printf("U");delay(50);
printf("R ");delay(50);
printf("\n-------CMPUTER ");delay(500);
printf("DEPARTMENT--------\n ");delay(500);
printf("I");delay(50);
printf("N ");delay(50);
printf("T");delay(50);
printf("H");delay(50);
printf("I");delay(50);
printf("S ");delay(50);
printf("ANIMATION ");delay(500);
printf("I ");delay(500);
printf("AM ");delay(500);
printf("SHOWING ");delay(500);
printf("YOU ");delay(500);
printf("ABOUT ");delay(500);
printf("A ");delay(500);
printf("COLOR ");delay(500);
printf("CHANGING ");delay(500);
printf("TREE ");delay(500);
printf("\n SO ");delay(500);
printf("PLEASE ");delay(500);
printf("WATCH ");delay(500);
printf("THIS ");delay(500);
printf("CAREFULLY ");delay(500);
cleardevice();
printf("\nEnter Number of times you want to change the color of tree:");
scanf("%d",&n);
for(i=0;i
ALGORITHM OF ANIMATION PROGRAM CODE :
ALGORITHM: To make a moving animation using computer graphics.
INPUT: One number for color changing of the tree.
OUTPUT: N Number Of Color Changing Tree With Various Colorful Changing Fonts.
Step : 1. Initiate graphics by declaring gd=DETECT , gm and defining this variables ?by
initgraph (&gd , &gm, ”your computer turboc c address” ) ;
Step 2: Read the value of n .
Step 3: FOR LOADING SCREEN Repeat steps 2 for(i=0;i<n;i++) {
setcolor(WHITE); repeat step for(i=35;i<555;i++) { line(25+i,170,25+i,200); } Repeat step
for(i=35;i<555;i++) { setcolor(GREEN); line(25+i,170,25+i,200); delay(10); }
Step 4: For Displaying the colorful tree : call the functions which is created outside the function :
firstCrown();delay(200);
secondCrown();delay(200);
thirdCrown();delay(200);
trunk();delay(200);
Step 5: For displaying the tree with changed color
Call the same functions with changed color :
Usin the function of graphics setcolor(RED); which sets color to default color .
Step 6: Using following functions set your default font and font style .
settextstyle(TRIPLEX_FONT, HORIZ_DIR, 2);
settextjustify(CENTER_TEXT, CENTER_TEXT);
outtextxy(300,400,"LECTURER , COMPUTER ENGINEERING DEPARTMENT");
Step 7: Display the tree for given n no of times with changing color .
Step 8: End .
Output
Reference
https://www.dotnettricks.com/learn/procedures-fucntions
https://tutoriallink.com/dbms/procedures-and-functions
https://slideshare.net/
https://wikipedia.com/procedures
https://docs.oracle.com/xedecv_programs