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();
//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();
//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();
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();
//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();
//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();
sir i need the updation of the project memory blocks sir....the updations are
ReplyDelete1) inspite of geometrical obejcts i want to add numbers.
2) While displaying the score i want the time also to be displayed..(How much time we took to solve that puzzel)
hi nice wrk dear, cn u plz email me d full source code of dis tajmahal program for my mini project...
ReplyDeleteYou can get the Taj Project from this blog, but you can make it your own as structure has been given with code. All you have to do is to post some display and keyboard, mouse interactions functions.
ReplyDeleteSubscribe to email news letter to get the updates as soon it will be on the board.
can you tell when it will be avialabel to download the code
Deleteawesome please send me code and all files of it
ReplyDeletesource code is mentioned here but there is need to add up some other functions so, get the code and work out in display your self...............
ReplyDeleteRajeev sir,could you please send me the complete source code of this project...please do the needful
ReplyDeleteSince almost all codes are there, u can develop ur self if problem persist have a comment here
ReplyDeletesir plz send me complete code and files of it................
ReplyDeleteshilpa13.shree05@gmail:disqus .com
plz gv us source code
ReplyDeletesent to u
ReplyDeletecode has been sent 2 u
ReplyDeletecan u pls post complete code of tajmahal
ReplyDeletecan i plsss get complete source code for tis program.....
ReplyDeletecan u pls post complete code of tajmahal
ReplyDeletethe whole projects is here , you just need to code the main function and a display function that's it!
ReplyDeletecan u plz put put the entire code?
ReplyDeletealready said just put main function and run it.........
ReplyDeletecan i get some new topics of cg project
ReplyDeletePlz send full code of taj mahal
ReplyDeleteopen gl means what that is one language??
ReplyDeletecan u give me full code
as i said b4 everthing is here u just need to call main function nothing else.....
ReplyDeleteopengl is platform for coding the graphics and it can be implemented on c, c++ as well as java. you can see it on the apple's products like of iphone. also counter striker is made from this.
ReplyDeletepls gv d main function.....
ReplyDeleteas usual add the things that u add in normal programs that's it
ReplyDeletePlz send full code of taj mahal
ReplyDeletecan u plzzz send me the source code for rendering "RAVAN with FIRE" as output in opengl...to ma email...i.i...."harika.87p@gmail.com
ReplyDeletepls send the source code
ReplyDeletesend me complete source code of tajmahal
ReplyDeletehai iam ayeshu can u send complete project code of taj mahal for my mini project.i need it.please.alon with main function.i will be waiting.
ReplyDeleterajeev sir,can u give me a 3d project,fo me.idont wich project i select.so please help me.
ReplyDeletesir,iwant a 3d project in opengl please provide me with tat type of project,i selected taj mahal but it is not in 3d.please help.iam waiting.please send project to my mail.
ReplyDeletesir can u plz send me taj mahal's coding to my mail
ReplyDeletekalaiselvi5mjkpr5@gmail.com
praveenchaudhary3@gmail.com Please send the code
ReplyDeletehello Rajeev Kumar Singh,
ReplyDeletecan u send me complete code of this mini project with lighting effects....
can u plz mail me the complete project at sheikh.abm@gmail.com
ReplyDeletecan we do this project in visualstuido2005 version...?
ReplyDeletesir can u please send me the entire code
ReplyDeletenemish.kamath@gmail.com
thank you
sir can u please mail me the source code
ReplyDeletepavan_sudhindra@ymail.com
thank you
please send me the complete code.............please
ReplyDeletemy e-mail address "auvyauvy@gmail.com"
sir plzz mail me full code of taj mahal ..please at ripun0145@gmail.com
ReplyDeleteplease @Rajeevkumarsingh
sent u...........
ReplyDeletesir..,Can you please send me complete code ....
ReplyDeletesurbhi.09.c@gmail.com
hello sir,hope you r seeing this text..plz send the main function of this code sir...i tried it,bt itz nt working ...so plz i request u to mail at zeba14rocks@gmail.com
ReplyDeletecan u send this project plz bro faisal.ahmedbcse@gmail.com
ReplyDeletepls send dis taj mahal project to my mail arpithab92@gmail.com
ReplyDeletesir can u send me project topic nd coding to my mail arpithab92@gmail.com
ReplyDeletecn u plz email me d full source code of dis tajmahal program for my mini project...
ReplyDeletePlease send the complete source code to anjithaalila@gmail.com
ReplyDeletePlz.....plz..sir