CGR Micro Project
CGR Micro Project
EDUCATION
MICRO PROJECT
Micro-Project Proposal
Title of Micro-Project : To create a moving animation using computer
graphics
1.0 Rationale
I Have created this micro-project or moving animation to understand the concept of
computer graphics . for this I’m used main Header File <graphics.h> as per
computer graphics related programs and conditions .
What is graphics ?
2D graphics come in two flavors — raster and vector. Raster graphics are the most
common and are used for digital photos, Web graphics, icons, and other types of
images.
Animation means giving life to any object in computer graphics. It has the
powerof injecting energy and emotions into the most seemingly inanimate
objects. Computer-assisted animation and computer-generated animation are
two categories of computer animation.
GRAPHICS :
What is graphics ?
Graphics are visual images or designs on some surface, such as a wall,
canvas, screen, paper, or stone to inform, illustrate, or entertain. In
contemporary usage, it includes a pictorial representation of data, as in
computer-aided design and manufacture, in typesetting and the graphic
arts, and in educational and recreational software. Images that are
generated by a computer are called computergraphics.
provided me the Syntaxes and Definitions of all the functions which are written
in Program code of my Graphics animaton Project .
Basic Function Synatxes :
initGraphics()
initGraphics(width, height)
setColor(color)
putpixel(x co-orinate, y co-ordinate,COLOR);
setbkcolor(COLOR);
setcolor(COLOR);
rectangle(x1,,y1,x2,y2);
line(x1,y1,x2,y2);
closegraph();
settextstyle(font, direction size);
circle(x,y,radius);
cleardevice();
arc(x, y, starting angle, ending angle, radius);
setfillstyle(STYLE, COLOR);
floodfill(x,y,boundary color);
ellipse(x, y, starting angle, ending angle, xradius, yradius);
getpixel(x,y);
Websites : https://www.w3schools.com/ :
W3Schools is an educational website for learning web technologies online.[1]
Contentincludes tutorials and references relatingto HTML, CSS, JavaScript,
JSON, PHP, Python, AngularJS, React.js, SQL, Bootstrap, Sass, Node.js,
jQuery, XQuery, AJAX, XML, Raspberry Pi, C++, and Java.
https://cgr.blogspots.gg.h/ : This site has provided me color codes of Turboc
compiler to apply in many of animation parts . provided an appearance to make
animation .
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<n;i++)
{
setcolor(WHITE);
for(i=35;i<555;i++)
{ line(25+i,170,25+i,200)
;
}
for(i=35;i<555;i++)
{
setcolor(GREEN);
line(25+i,170,25+i,200);
delay(10);
setcolor(WHITE);
settextstyle(SMALL_FONT,0,16);
outtextxy(220,220,"LOADING");
delay(10);
settextstyle(SMALL_FONT,HORIZ_DIR,16);
outtextxy(390,220,"...");
}closegraph();
initgraph(&gd,&gm,"C:\\TURBOC3\\BGI");
firstCrown();delay(200);
secondCrown();delay(200);
thirdCrown();delay(200);
trunk();delay(200);
setfillstyle(SOLID_FILL,RED);
line(300,40,200,100);
line(300,40,400,100);
ellipse(300,100,180,360,98,30);
floodfill(310,50,WHITE);
setcolor(RED);
settextstyle(TRIPLEX_FONT, HORIZ_DIR, 5);
settextjustify(CENTER_TEXT, CENTER_TEXT);
outtextxy(300,370,"CREATED BY");
delay(2000);
graphdefaults();
cleardevice();
firstCrown();delay(200);
secondCrown();delay(200);
thirdCrown();delay(200);
trunk();delay(200);
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);
setcolor(MAGENTA); settextstyle(BOLD_FONT,
HORIZ_DIR, 2); settextjustify(CENTER_TEXT,
CENTER_TEXT); outtextxy(300,370," VISHAL S
KESHARWANI");
delay(2000);
graphdefaults();
cleardevice();
firstCrown();delay(200);
secondCrown();delay(200);
thirdCrown();delay(200);
trunk();delay(200);
setfillstyle(SOLID_FILL,BLUE);
line(230,185,150,230);
line(360,185,440,230);
ellipse(295,230,180,360,145,30);
floodfill(250,190,WHITE);
setcolor(GREEN);
settextstyle(SANS_SERIF_FONT, HORIZ_DIR, 3);
settextjustify(CENTER_TEXT, CENTER_TEXT);
outtextxy(300,370,"UNDER GUIDANCE OF : KHIRADE SIR [KINGRAJ SIR]");
delay(2000);
graphdefaults();
cleardevice();
setcolor(GREEN);
settextstyle(BOLD_FONT, HORIZ_DIR, 3);
settextjustify(CENTER_TEXT, CENTER_TEXT);
outtextxy(360,200," END ");
delay(2000);
graphdefaults();
cleardevice();
}
getch();
closegraph();
}
Turbo C++ compiler : Turbo C++ is a discontinued C++ compiler and
integrated development environment and computer language originally from
Borland. Most recently it was distributed by Embarcadero Technologies, which
acquired all of Borland's compiler tools with the purchase of its CodeGear
division in 2008. The original Turbo C++ product line was put on hold after 1994
and was revived in 2006 as an introductory-level IDE, essentially 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 used DELL INSPIRON , 8th generation WITH INBUILT WINDOWS 10 Operating
systemof 3.20 GHz INTEL Pentium Core processor with i7technology computer ( PC ).
Dell Inspiron desktops and all-in-one PCs are designed with innovative technology and
latest features .
}
a. 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);
c. 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
ENGINEERINGDEPARTMENT");
d. Display the tree for given n no of times with changing color .
e. End .
1 WEBSITES www.recursionofC.com -
www.recursionconcept.com
www.Clanguagerecursioncon.COM
www.programrecursion.com
2 SOFTWARES TURBO C++ COMPILER , GOOGLE 01/01
CHROME BROWSER .
3 Computer system Dell inspiron2123, core- 01
i7processor with windows 10
operating system.
4 Office software packages MS WORD office 2010 -
**************
Teacher’s Signature
*************
Softcopy of Micro-project
Micro-Project Evaluation Sheet
5 Quality of Prototype/Model
6 Report Preparation
8 Viva
5 Quality of Prototype/Model
6 Report Preparation
8 Viva
5 Quality of Prototype/Model
6 Report Preparation
8 Viva