You are on page 1of 9

ANNEXURE-2

SECOND YEAR COMPUTER ENDINEERING


CGR MICRO-PROJECT REPORT
Topic: TAJ MAHAL ANIMATION
1.0 Rational
This project report has been designed, created, on the programming
language 'C'. This language has been a fascination for me and due to this
reason I have made a small project based on this language.

2.0 Aim of the micro-project:

• To learn different concepts of Computer Graphics. 


• To learn C languages and making of its programs.  
• To develop self –learning skills.  
• To collect the knowledge beyond the syllabus related to the topic. 

3.0 Course Outcomes


• Manipulate visual and geometric information of images.
• Implement standard algorithm to draw various graphics objects using 
C program. 
• Use projections to visualise objects on view plane. 
• Develop program to create curves using algorithm. 

4.0 Literature Review

The Taj Mahal (Crown of the Palace) is an ivory-white marble mausoleum on the south bank of the Yamuna
river in the Indian city of Agra. It was commissioned in 1632 by the Mughal emperor, Shah Jahan (reigned
1628 –1658), to house the tomb of his wife, Mumtaz Mahal. The tomb is the center piece of a 17-hectare (42-
acre) complex, which includes a mosque and a guest house, and is set in formal gardens bounded on three
sides by crenellated wall. The Taj Mahal was designated as a UNESCO World Heritage Site in
1983 for being "the jewel of Muslim art in India and one of the universally admired
masterpieces of the world's heritage". Described by Nobel laureate Rabindranath Tagore as "the
tear-drop on the cheek of time”, it is regarded by many as the best example of Mughal’s
architecture and a symbol of India's rich history. In 2007, it was declared a winner of the New Seven
Wonders of the World (2000 –2007) initiative.
5.0 Resources Required

SR   NAME OF   SPECIFICATIONS  QTY  REMARKS 


NO  RESOURCES  
MATERIAL 
1  Laptop  I3 ,1TB, intel core 1 
processor 

2  Turbo C Application  1 

6.0 Actual Methodology Followed


The project aims is creating a [TAJ MAHAL ANIMATION] in Computer
Graphics in ‘C’ language.

I. Here three functions taj(), left(), and right() are defined.


II. In the main() function, the first taj() function is called. In this
function, the building of the Taj Mahal was started created from a
Rectangle Base using the rectangle() function.
III. Then two Rectangles are made using the rectangle() function.
In Smaller Rectangle a Door is made by using the line() function.
IV. Then the Onion Dome is made by using the arc() function. On
that Dome, a finial is created by using line() functions.
V. On both sides of that Dome, two smaller Domes are created by
using the ellipse() function, and also a Finial is drawn by using the
line() function.
VI. Then other Decorations have been implemented by mostly
using the line() function and rectangle() function in a few cases.
These decorations have to implement on both sides of the Taj Mahal.
VII. After completion of taj() function the left() function is called to

implement Left Side Minarets. These two Minarets are completely

made by using the line() function and by calculation.


VIII. Then right () function is called to implement Right Side

Minarets. These two Minarets are also completely made by using

the line() function and by calculation.

7.0 Program Code


#include<stdio.h>
#include<dos.h>
#include<stdlib.h>
#include<conio.h>
#include<graphics.h>
void taj();
void left();
void right();

int main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\tc\\bgi");
taj();
left();
right();

settextstyle(3,0,7);
outtextxy(50,50,"TAJ MAHAL");
delay(40);
while(!kbhit())
{
delay(40);
putpixel(random(640),random(248),random(15));
}
getch();
closegraph();
return(0);

}
void taj()
{
delay(500);
rectangle(1,450,620,470);
line(10,450,12,380);
line(40,450,38,380);
line(9,380,41,380);
line(9,375,41,375);
ellipse(10,377,90,270,3,3);
ellipse(41,378,270,90,3,3);
line(12,375,14,320);
line(38,375,36,320);

line(11,320,39,320);
line(11,315,39,315);
ellipse(11,318,90,270,3,2);
ellipse(39,318,270,90,3,2);
line(14,315,16,250);
line(36,315,34,250);

ellipse(25,244,20,200,11,6);
ellipse(25,245,200,10,11,6);
line(17,239,17,227);
line(33,239,33,227);
line(14,227,37,227);

ellipse(14,224,90,270,3,3);
ellipse(36,224,270,90,3,3);
ellipse(25,220,0,180,10,13);
line(25,207,25,197);

//right
line(580,450,582,380);
line(610,450,608,380);
line(578,380,612,380);
line(578,375,612,375);
ellipse(579,377,90,270,3,3);
ellipse(612,378,270,90,3,3);
line(582,375,584,320);
line(608,375,606,320);
line(581,320,611,320);
line(581,315,611,315);
ellipse(581,318,90,270,3,2);
ellipse(611,318,270,90,3,2);
line(584,315,586,250);
line(606,315,604,250);
ellipse(595,245,20,200,11,6);
ellipse(595,246,200,10,11,6);
line(585,242,585,227);
line(603,242,603,227);
line(583,227,605,227);
ellipse(583,224,90,270,3,3);
ellipse(605,224,270,90,3,3);
ellipse(594,220,0,180,10,13);

line(593,207,593,197);
rectangle(245,340,345,450);
rectangle(235,330,355,450);
line(263,390,263,450);
line(330,390,330,450);
ellipse(297, 390,0,180,34,34);
rectangle(235,325,355,330);
line(235,317,235,325);
line(355,317,355,325);

ellipse(295,316,0,180,60,9);
ellipse(295,270, 320,220,75,75);
line(260,203,290,180);
line(330,203,290,180);
circle(290,178,3);
ellipse(290,168,0,360,2,6);
ellipse(290,158,0,360,1,4);
line(290,148,290,155);
rectangle(355,345,420,450);

line(460,363,460,450);
line(416,345,460,363);
line(397,397,370,397);
line(370,397,370,366);
line(397,397,397,366);
ellipse(383,374,30,150,15,15);
line(370,424,370,450);
line(397,424,397,450);
ellipse(383,432,30,150,15,15);

line(430,397,450,397);
line(450,397,450,376);
line(430,397,430,376);
ellipse(440,385,30,150,11,15);
line(450,424,450,450);
line(430,424,430,450);
ellipse(440,432,30,150,11,15);
line(401,318,401,344);
ellipse(378,327,40,130,34,12);
line(361,309,406,309);
line(406,309,403,318);
ellipse(383,334,30,89,24,50);
ellipse(381,338,85,120,26,55);
line(383,274,382,282);
line(383,274,385,284);
}
void left()
{
//left
delay(500);
rectangle(235,345,165,450);
line(125,363,125,450);
line(165,345,125,363);
line(185,397,211,397);
line(185,397,185,366);
line(211,397,211,366);
ellipse(198,374,30,150,15,15);
line(185,424,185,450);
line(211,424,211,450);
ellipse(198,432,30,150,15,15);
line(135,397,155,397);
line(135,397,135,376);
line(155,397,155,376);
ellipse(145,385,30,150,11,15);
line(135,424,135,450);
line(155,424,155,450);
ellipse(145,432,30,150,11,15);
line(189,318,189,344);
ellipse(212,327,45,130,34,12);
line(187,309,230,309);
line(187,309,190,318);
ellipse(217,310,100,180,26,32);
ellipse(210,319,70,85,26,40);
line(212,270,209,280);
line(212,270,215,280);

//pool left
line(112,450,110,415);
line(84,450,86,415);
line(83,415,113,415);
line(83,410,113,410);
ellipse(82,412,90,270,3,2);
ellipse(113,412,270,90,3,2);
line(86,410,88,370);
line(110,410,108,370);
line(86,370,110,370);
line(86,365,110,365);
ellipse(86,368,90,270,3,2);
ellipse(110,368,270,90,3,2);
line(88,365,90,335);
line(108,365,106,335);
ellipse(98,330,20,200,11,6);
ellipse(98,330,200,10,11,6);
line(90,327,90,314);
line(106,327,106,314);
line(87,314,109,314);
ellipse(87,311,90,270,3,3);
ellipse(109,311,270,90,3,3);
ellipse(98,307,0,180,10,13);
line(98,295,98,284);
}
void right()
{
// right
delay(1000);
line(474,450,475,420);
line(500,450,498,420);
line(472,415,500,415);
line(472,420,500,420);
ellipse(472,418,90,270,3,2);
ellipse(500,418,270,90,3,2);
line(475,415,477,375);
line(498,415,496,375);
line(474,374,499,374);
line(474,370,499,370);
ellipse(473,372,90,270,3,2);
ellipse(499,372,270,90,3,2);
line(495,369,493,340);
line(476,369,478,340);
ellipse(485,334,20,200,11,6);
ellipse(485,334,200,10,11,6);
line(478,329,478,317);
line(492,329,492,317);
line(496,316,474,316);
ellipse(473,312,90,270,3,3);
ellipse(495,312,270,90,3,3);
ellipse(484,309,0,180,10,13);
line(484,295,484,284);
circle(450,100,30);
floodfill(451,101,15);
}
***************************************ProgramEnd*********************************

8.0 Output of Micro-project


9.0 Skill Developed
• Understanding of C Programing Language.
• Ability to understand Graphics needs.
• Designing and preparing a report.
• Monitoring Programing efficiency.

10.0 Application of this Micro Project

1. This project is a result of the team's hard work. Inspired by the


beauty of Taj Mahal, we built this project and we are glad to have
succeeded what was thought impossible. A great thanks to all the
classmates who inspired and motivated us during the project.
2. Important functions in library will be discussed in details and
samples programs will be provided to show the power of C
programming language especially for graphic programming
developing graphical user interfaces. 
3. In Education Computer generated models are extremely useful for
teaching huge number of concepts and fundamentals in an easy to
understand and learn manner. Using computer graphics many
educational models can be created through which more interest can
be generated among the students regarding the subject.

*************************************************************
END

You might also like