Taj Mahal (ताज महल), is the symbol of love. It is a white Marble mausoleum located in Agra, INDIA. It was built by Mughal emperor Shah Jahan in memory of his third wife, Mumtaz Mahal. For more info read wikipedia.
Here, we are going to develop basic structure of Taj Mahal in computer graphics. In this tutorial I will tell how to make Taj like structure using the OpenGL. We will develop simple structure, not exactly same as it looks in real but some what idealistic. This project is mainly mean for the VTU Computer Graphics mini-projects.
Taj Mahal is basically a structure with many minars and gumbazz. We will use the simple objects like spheres and cubes to build these units. First for the main part we use box or a large cube and then point small sphere over them. Thereafter, we place a small cubical structure with very low height, a egg like sphere is also placed over it. Similarly,we going to place four long minars over each four corners.
We are also developing the wired framed structure of the Taj as well. In the wired framed Taj, the large cube block will go transparent and the two tombs will be place in the middle with small cubes.
Lets start coding!
/* Draw the bottom box */
glPushMatrix();
glScaled(0.8,0.04,0.8);
glTranslatef(0.0,-30.2,0.0);
glutSolidCube(7.0);
glPopMatrix();
//main cube
glTranslatef(0.0,-.6,0.0);
glutSolidCube(2.0);
//main gumbazz
glPushMatrix();
glScaled(0.8,1.0,0.8);
glTranslatef(0.0,1.5,0.0);
glutSolidSphere(0.8,80,120);
glPopMatrix();
glTranslatef(0.0,1.0,0.0);
glScaled(1.2,0.25,1.2);
glutSolidCube(0.9);
//gumbaz pointer
glPushMatrix();
glScaled(0.03,0.5,0.03);
glTranslatef(0.0,10.8,0.0);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//Minars
glPushMatrix();
glTranslated(2,-1.9,2);
glScaled(.2,10.5,.2);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//minar's sphere
glPushMatrix();
glTranslated(2,0.8,2);
glScaled(0.3,1.5,0.3);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//Minars
glPushMatrix();
glTranslated(-2,-1.9,2);
glScaled(.2,10.5,.2);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//minar's sphere
glPushMatrix();
glTranslated(-2,0.8,2);
glScaled(0.3,1.5,0.3);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//Minars
glPushMatrix();
glTranslated(-2,-1.9,-2);
glScaled(.2,10.5,.2);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//minar's sphere
glPushMatrix();
glTranslated(-2,0.8,-2);
glScaled(0.3,1.5,0.3);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//Minars
glPushMatrix();
glTranslated(2,-1.9,-2);
glScaled(.2,10.5,.2);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//minar's sphere
glPushMatrix();
glTranslated(2,0.8,-2);
glScaled(0.3,1.5,0.3);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//short Minars
glPushMatrix();
glTranslated(0.6,-0.5,0.6);
glScaled(.2,11.5,.2);
glutSolidSphere(0.2,80,120);
glPopMatrix();
//short minar's sphere
glPushMatrix();
glTranslated(0.6,0.5,0.6);
glScaled(0.3,1.5,0.3);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//short Minars
glPushMatrix();
glTranslated(0.6,-0.5,-0.6);
glScaled(.2,11.5,.2);
glutSolidSphere(0.2,80,120);
glPopMatrix();
glScaled(0.3,1.5,0.3);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//short Minars
glPushMatrix();
glPopMatrix();
//short Minars
glPushMatrix();
glTranslated(-0.6,-0.5,-0.6);
glScaled(.2,11.5,.2);
glutSolidSphere(0.2,80,120);
glPopMatrix();
//short minar's sphere
glPushMatrix();
glTranslated(-0.6,0.5,-0.6);
glScaled(0.3,1.5,0.3);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//short Minars
glPushMatrix();
glTranslated(-0.6,-0.5,0.6);
glScaled(.2,11.5,.2);
glutSolidSphere(0.2,80,120);
glPopMatrix();
//short minar's sphere
glPushMatrix();
glTranslated(-0.6,0.5,0.6);
glScaled(0.3,1.5,0.3);
glutSolidSphere(0.4,80,120);
glPopMatrix();
For More projects and tutorial Visit OpenGL Projects .
This Articles is also cross posted on OpenGL Projects .
Here, we are going to develop basic structure of Taj Mahal in computer graphics. In this tutorial I will tell how to make Taj like structure using the OpenGL. We will develop simple structure, not exactly same as it looks in real but some what idealistic. This project is mainly mean for the VTU Computer Graphics mini-projects.
Taj Mahal is basically a structure with many minars and gumbazz. We will use the simple objects like spheres and cubes to build these units. First for the main part we use box or a large cube and then point small sphere over them. Thereafter, we place a small cubical structure with very low height, a egg like sphere is also placed over it. Similarly,we going to place four long minars over each four corners.
We are also developing the wired framed structure of the Taj as well. In the wired framed Taj, the large cube block will go transparent and the two tombs will be place in the middle with small cubes.
Lets start coding!
/* Draw the bottom box */
glPushMatrix();
glScaled(0.8,0.04,0.8);
glTranslatef(0.0,-30.2,0.0);
glutSolidCube(7.0);
glPopMatrix();
//main cube
glTranslatef(0.0,-.6,0.0);
glutSolidCube(2.0);
//main gumbazz
glPushMatrix();
glScaled(0.8,1.0,0.8);
glTranslatef(0.0,1.5,0.0);
glutSolidSphere(0.8,80,120);
glPopMatrix();
glTranslatef(0.0,1.0,0.0);
glScaled(1.2,0.25,1.2);
glutSolidCube(0.9);
//gumbaz pointer
glPushMatrix();
glScaled(0.03,0.5,0.03);
glTranslatef(0.0,10.8,0.0);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//Minars
glPushMatrix();
glTranslated(2,-1.9,2);
glScaled(.2,10.5,.2);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//minar's sphere
glPushMatrix();
glTranslated(2,0.8,2);
glScaled(0.3,1.5,0.3);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//Minars
glPushMatrix();
glTranslated(-2,-1.9,2);
glScaled(.2,10.5,.2);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//minar's sphere
glPushMatrix();
glTranslated(-2,0.8,2);
glScaled(0.3,1.5,0.3);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//Minars
glPushMatrix();
glTranslated(-2,-1.9,-2);
glScaled(.2,10.5,.2);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//minar's sphere
glPushMatrix();
glTranslated(-2,0.8,-2);
glScaled(0.3,1.5,0.3);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//Minars
glPushMatrix();
glTranslated(2,-1.9,-2);
glScaled(.2,10.5,.2);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//minar's sphere
glPushMatrix();
glTranslated(2,0.8,-2);
glScaled(0.3,1.5,0.3);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//short Minars
glPushMatrix();
glTranslated(0.6,-0.5,0.6);
glScaled(.2,11.5,.2);
glutSolidSphere(0.2,80,120);
glPopMatrix();
//short minar's sphere
glPushMatrix();
glTranslated(0.6,0.5,0.6);
glScaled(0.3,1.5,0.3);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//short Minars
glPushMatrix();
glTranslated(0.6,-0.5,-0.6);
glScaled(.2,11.5,.2);
glutSolidSphere(0.2,80,120);
glPopMatrix();
glScaled(0.3,1.5,0.3);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//short Minars
glPushMatrix();
glPopMatrix();
//short Minars
glPushMatrix();
glTranslated(-0.6,-0.5,-0.6);
glScaled(.2,11.5,.2);
glutSolidSphere(0.2,80,120);
glPopMatrix();
//short minar's sphere
glPushMatrix();
glTranslated(-0.6,0.5,-0.6);
glScaled(0.3,1.5,0.3);
glutSolidSphere(0.4,80,120);
glPopMatrix();
//short Minars
glPushMatrix();
glTranslated(-0.6,-0.5,0.6);
glScaled(.2,11.5,.2);
glutSolidSphere(0.2,80,120);
glPopMatrix();
//short minar's sphere
glPushMatrix();
glTranslated(-0.6,0.5,0.6);
glScaled(0.3,1.5,0.3);
glutSolidSphere(0.4,80,120);
glPopMatrix();
For More projects and tutorial Visit OpenGL Projects .
This Articles is also cross posted on OpenGL Projects .
please sent me where to download it...
ReplyDeletemy mail a.faddly@gmail.com
hello sir... iam 6th sem cs student ..can u plzz send me code for any simple and good project using open GL .. plzz mail it to sharanya1994.sk@gmail.com
DeleteIF You had posted some of the explanation with regards to this you might have got the better responses.
ReplyDeletehey how to change the color of taj mahal to white .....
ReplyDeleteit can be done via full code get it from opengl projects
Deletesir hw to add crack function
ReplyDeletewhat kind of crack u want?
Deletesirplease can send me code for blast furnace .
ReplyDeleteMy email: sunilg751@gmail.com
it's not with me!
Deletecan u give ur full code plz..
ReplyDeletemy email-id : prakashkumarsdr@gmail.com
sir can u plz send me code fr nuclear power plant
ReplyDeletedownload from opengl projects.in
Deleteplease can you send full code of taj mahal for college project by saturday, to this email id rizwanag429@gmail.com
ReplyDeleteplease can you send full code of taj mahal to my gmail jetgondapriyanka@gmail.com its arjent n ppt also
ReplyDeleteevn i need full code for taj mahal plzz send me on
ReplyDeleteveereshsajjan18@gmail.com
any one help me to send a code for triangle my email address is
ReplyDeleteaxadkhan90@gmail.com
i submit the project tuesday so plz snd me source code of triangle.i shall be very thank ful.rajeev sir can u help me my email address is
ReplyDeleteaxadkhan90@gmail.com
check your email!
DeleteThanks
thanks a lot Rajeev sir
ReplyDeleteRajeev sir please snd me the code of flag
ReplyDeletemy email id is axadkhan 90@gmail.com
i shll submit the project tomarrow please help
also snd me the software plz sir
ReplyDeleteany one hlp me
ReplyDeleteMr.Rajiv sir, please do send me. vikilingam@gmail.com
ReplyDeleteMr.Rajiv sir, please do send me. vikilingam@gmail.com
ReplyDeleteHello. Can you send me the full code for this Taj Mahal. Thank you. sarahathirah_91@yahoo.com
ReplyDeleteHi sir can you send me full code for Taj Mahal plz my mail id is ranirathid870@gmail.com
ReplyDeleteplz send me full code l.uvy@hotmail.com im need nassesory
ReplyDeleteplz send me full code l.uvy@hotmail.com im need nassesory
ReplyDeletepls send me full code of taj mahal... i need to submit the project tomorrow... send to kusumanmurthy@gmail.com
ReplyDeletePlz sir can u send me a code for movement of boat using opengl
ReplyDeleteOr else full code of taj mahal ...i need it urgent sir plz ....send to sushmitha.kulal121@gmail.com
ReplyDelete