Search Projects

Wednesday, April 18, 2012

Build Taj Mahal mini projects in OpenGL, Computer Graphics

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();



Project Docs : 

50 comments:

  1. sir i need the updation of the project memory blocks sir....the updations are
    1) 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)

    ReplyDelete
  2. hi nice wrk dear, cn u plz email me d full source code of dis tajmahal program for my mini project...
     

    ReplyDelete
  3. You 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.

    Subscribe to email news letter to get the updates as soon it will be on the board.

    ReplyDelete
    Replies
    1. can you tell when it will be avialabel to download the code

      Delete
  4. awesome please send me code and all files of it

    ReplyDelete
  5. source 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...............

    ReplyDelete
  6. Rajeev sir,could you please send me the complete source code of this project...please do the needful

    ReplyDelete
  7.  Since almost all codes are there, u can develop ur self if problem persist have a comment here

    ReplyDelete
  8. sir plz send me complete code and files of it................
    shilpa13.shree05@gmail:disqus .com

    ReplyDelete
  9. plz gv us source code

    ReplyDelete
  10. can u pls post complete code of tajmahal

    ReplyDelete
  11. can i plsss get complete source code for tis  program.....

    ReplyDelete
  12. can u pls post complete code of tajmahal

    ReplyDelete
  13.  the whole projects is here , you just need to code the main function and a display function that's it!

    ReplyDelete
  14. can u plz put put the entire code?

    ReplyDelete
  15.  already said just put main function and run it.........

    ReplyDelete
  16. can i get some new topics of cg project

    ReplyDelete
  17. Plz send full code of taj mahal

    ReplyDelete
  18. open gl means what that is one language??
    can u give me full code

    ReplyDelete
  19. as i said b4 everthing is here u just need to call main function nothing else.....

    ReplyDelete
  20. opengl 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.

    ReplyDelete
  21. pls gv d main function.....

    ReplyDelete
  22. as usual add the things that u add in normal programs that's it

    ReplyDelete
  23. Plz send full code of taj mahal

    ReplyDelete
  24. can 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

    ReplyDelete
  25. pls send the source code

    ReplyDelete
  26. send me complete source code of tajmahal

    ReplyDelete
  27. hai 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.

    ReplyDelete
  28. rajeev sir,can u give me a 3d project,fo me.idont wich project i select.so please help me.

    ReplyDelete
  29. sir,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.

    ReplyDelete
  30. sir can u plz send me taj mahal's coding to my mail

    kalaiselvi5mjkpr5@gmail.com

    ReplyDelete
  31. praveenchaudhary3@gmail.com Please send the code

    ReplyDelete
  32. hello Rajeev Kumar Singh,

    can u send me complete code of this mini project with lighting effects....

    ReplyDelete
  33. can u plz mail me the complete project at sheikh.abm@gmail.com

    ReplyDelete
  34. can we do this project in visualstuido2005 version...?

    ReplyDelete
  35. u r just a piece of SHIT....we wan complete projects not your ideas

    ReplyDelete
  36. sir can u please send me the entire code

    nemish.kamath@gmail.com
    thank you

    ReplyDelete
  37. sir can u please mail me the source code

    pavan_sudhindra@ymail.com

    thank you

    ReplyDelete
  38. please send me the complete code.............please
    my e-mail address "auvyauvy@gmail.com"

    ReplyDelete
  39. sir plzz mail me full code of taj mahal ..please at ripun0145@gmail.com
    please @Rajeevkumarsingh

    ReplyDelete
  40. ☺☻Surbhi☻☺November 8, 2013 at 1:14 AM

    sir..,Can you please send me complete code ....

    surbhi.09.c@gmail.com

    ReplyDelete
  41. 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

    ReplyDelete
  42. can u send this project plz bro faisal.ahmedbcse@gmail.com

    ReplyDelete
  43. pls send dis taj mahal project to my mail arpithab92@gmail.com

    ReplyDelete
  44. sir can u send me project topic nd coding to my mail arpithab92@gmail.com

    ReplyDelete
  45. cn u plz email me d full source code of dis tajmahal program for my mini project...

    ReplyDelete
  46. Please send the complete source code to anjithaalila@gmail.com
    Plz.....plz..sir

    ReplyDelete