Search Projects

Sunday, May 8, 2011

Solar System Mini-Project in OpenGL

OpenGL Projects is new initiative in the field of education.OpenGL Projects is one site that provides source code and materials for VTU 6th sem CSE students. Our first Program is - Solar System. Download source code of solar system in OpenGL and read the description below.

solar system

DescriptionProgram to demonstrate how to use a local  coordinate method to position parts of a  model in relation to other model parts. Draws a simple solar system, with a sun, planet and  a moon.
Based on sample code from the OpenGL programming guide by Woo, Neider, Davis.  Addison-Wesley.

Software accompanying the book:  3D Computer Graphics: A Mathematical Introduction with OpenGL, by S. Buss, Cambridge University Press, 2003.

USAGE: Press "r" key to toggle (off and on) running the animation.
               Press "s" key to single-step animation.
               The up arrow key and down array key control the time step used in the animation rate.
               Each key  press multiplies or divides the times by a factor of two (2).
               Press ESCAPE to exit.


Project Code: Downloads *
* Also required the header file Download .h file

37 comments:

  1. need some project with easy source code so that we can understand the code by own..

    ReplyDelete
  2. Can i add more planet to it?
    If yes then how? can you email me the source code for the modification.
    my email is coolmrbabu24@yahoo.com

    ReplyDelete
  3. does this project work ?? 

    ReplyDelete
  4. y is it worst??

    ReplyDelete
  5. Yes it works perfectly.

    You try to downloads both the main file and the header file as well. If you try to not get both, the program will not run. 

    What is the problem? Unless you post the problem it will not going to get solve. Try to post what is not happening or what has happened. Tell the problem!

    ReplyDelete
  6. give us the simplest code possible.we need to explain everything to our teachers.orelse give explaination of eac function for what reason it is used.

    ReplyDelete
  7. dere is no option for downloading the main code.

    ReplyDelete
  8. there is no download option for main code ... please let me how to download

    ReplyDelete
  9. Download link is revised now anyone can download it.............

    ReplyDelete
  10. due to to some problem it had not been public so not avial to download

    ReplyDelete
  11. glRotatef( 360.0*DayOfYear/365.0, 0.0, 1.0, 0.0 ); 
     
    i am bit confused with this line of code :( could u help plz 

    ReplyDelete
  12. 360 is for the angle of sphere
    DayOfYear of the year represent the day
    365 is total no of days taken

    ReplyDelete
  13. please get me source code on solar system on computer graphics using opengl

    ReplyDelete
  14.  download link for the purpose of downloading

    ReplyDelete
  15. `key_r' cannot be used as a function
    what to do now??

    ReplyDelete
  16. yOU ARE MISSSING THE FOLLOWING FUNCTION -




    static void Key_r(void)

    {

    if ( singleStep ) { // If ending single step mode

    singleStep = GL_FALSE;

    spinMode = GL_TRUE; // Restart animation

    }

    else {

    spinMode = !spinMode; // Toggle animation on and off.

    }

    }

    ReplyDelete
  17. hello sir ....can give me a abstract n report for solar system plzzzzz

    ReplyDelete
  18. i need a abstract n project report....can u mail me to ch.sangmesh@gmail.com plzzz

    ReplyDelete
  19. i need a abstract n project report....can u mail me to prithvipru@gmail.com please.....

    ReplyDelete
  20. i need a abstract n project report....can u mail me to tejupm30@gmail.com plzz plz

    ReplyDelete
  21. it really helps! thank you <3

    ReplyDelete
  22. I am getting tons of errors:(

    Solar.c:66: warning: conflicting types for ‘Key_up’

    Solar.c:66: error: static declaration of ‘Key_up’ follows non-static declaration

    Solar.c:39: error: previous implicit declaration of ‘Key_up’ was here

    Solar.c:71: warning: conflicting types for ‘Key_down’

    Solar.c:71: error: static declaration of ‘Key_down’ follows non-static declaration

    Solar.c:42: error: previous implicit declaration of ‘Key_down’ was here

    Solar.c: In function ‘Animate’:

    Solar.c:83: error: ‘GL_COLOR_BUFFER_BIT’ undeclared (first use in this function)

    Solar.c:83: error: ‘GL_DEPTH_BUFFER_BIT’ undeclared (first use in this function)

    Solar.c:85: error: ‘spinMode’ undeclared (first use in this function)

    Solar.c:133: error: ‘singleStep’ undeclared (first use in this function)

    Solar.c:134: error: ‘GL_FALSE’ undeclared (first use in this function)

    Solar.c: In function ‘OpenGLInit’:

    Solar.c:144: error: ‘GL_FLAT’ undeclared (first use in this function)

    Solar.c:147: error: ‘GL_DEPTH_TEST’ undeclared (first use in this function)

    Solar.c: In function ‘ResizeWindow’:

    Solar.c:160: error: ‘GL_PROJECTION’ undeclared (first use in this function)

    Solar.c:165: error: ‘GL_MODELVIEW’ undeclared (first use in this function)

    Solar.c: In function ‘main’:

    Solar.c:175: error: ‘GLUT_DOUBLE’ undeclared (first use in this function)

    Solar.c:175: error: ‘GLUT_RGB’ undeclared (first use in this function)

    Solar.c:175: error: ‘GLUT_DEPTH’ undeclared (first use in this function)

    ReplyDelete
  23. Documents/c/CHARD/Solar.h:1:1: error: unterminated comment
    Documents/c/CHARD/Solar.c:31:13: warning: conflicting types for ‘Key_r’ [enabled by default]
    Documents/c/CHARD/Solar.c:31:13: error: static declaration of ‘Key_r’ follows non-static declaration
    Documents/c/CHARD/Solar.c:21:3: note: previous implicit declaration of ‘Key_r’ was here
    Documents/c/CHARD/Solar.c:67:13: error: redefinition of ‘Key_r’
    Documents/c/CHARD/Solar.c:31:13: note: previous definition of ‘Key_r’ was here
    Documents/c/CHARD/Solar.c:78:13: warning: conflicting types for ‘Key_s’ [enabled by default]
    Documents/c/CHARD/Solar.c:78:13: error: static declaration of ‘Key_s’ follows non-static declaration
    Documents/c/CHARD/Solar.c:25:3: note: previous implicit declaration of ‘Key_s’ was here
    Documents/c/CHARD/Solar.c:84:13: warning: conflicting types for ‘Key_up’ [enabled by default]
    Documents/c/CHARD/Solar.c:84:13: error: static declaration of ‘Key_up’ follows non-static declaration
    Documents/c/CHARD/Solar.c:58:3: note: previous implicit declaration of ‘Key_up’ was here
    Documents/c/CHARD/Solar.c:89:13: warning: conflicting types for ‘Key_down’ [enabled by default]
    Documents/c/CHARD/Solar.c:89:13: error: static declaration of ‘Key_down’ follows non-static declaration
    Documents/c/CHARD/Solar.c:61:3: note: previous implicit declaration of ‘Key_down’ was here
    [gomzy@gomzy ~]$
    [gomzy@gomzy ~]$ gcc -lGL -lGLU -lglut Documents/c/CHARD/Solar.c -o s
    In file included from Documents/c/CHARD/Solar.c:1:0:
    Documents/c/CHARD/Solar.h:1:1: error: unterminated comment
    Documents/c/CHARD/Solar.c:31:13: warning: conflicting types for ‘Key_r’ [enabled by default]
    Documents/c/CHARD/Solar.c:31:13: error: static declaration of ‘Key_r’ follows non-static declaration
    Documents/c/CHARD/Solar.c:21:3: note: previous implicit declaration of ‘Key_r’ was here
    Documents/c/CHARD/Solar.c:67:13: error: redefinition of ‘Key_r’
    Documents/c/CHARD/Solar.c:31:13: note: previous definition of ‘Key_r’ was here
    Documents/c/CHARD/Solar.c:78:13: warning: conflicting types for ‘Key_s’ [enabled by default]
    Documents/c/CHARD/Solar.c:78:13: error: static declaration of ‘Key_s’ follows non-static declaration
    Documents/c/CHARD/Solar.c:25:3: note: previous implicit declaration of ‘Key_s’ was here
    Documents/c/CHARD/Solar.c:84:13: warning: conflicting types for ‘Key_up’ [enabled by default]
    Documents/c/CHARD/Solar.c:84:13: error: static declaration of ‘Key_up’ follows non-static declaration
    Documents/c/CHARD/Solar.c:58:3: note: previous implicit declaration of ‘Key_up’ was here
    Documents/c/CHARD/Solar.c:89:13: warning: conflicting types for ‘Key_down’ [enabled by default]
    Documents/c/CHARD/Solar.c:89:13: error: static declaration of ‘Key_down’ follows non-static declaration
    Documents/c/CHARD/Solar.c:61:3: note: previous implicit declaration of ‘Key_down’ was here



    what to do?????

    ReplyDelete
  24. can u hlp to resolve this,,, error cmes when i jst copy ur cody past it as it is and run in vc++

    ReplyDelete
  25. Big Styluses, little styluses, little styluses that expand into big
    styluses - You can get a starter kit that has all the stuff you need to take advantage of all the great features of
    the 3DS and the items that come in the starter kit
    are the color of the 3DS. Further, to spice things up, Nintendo
    is also re-releasing vintage. Even the DSi XL has the same (albeit larger) screens on both the upper and lower parts of the console.


    Review my blog post :: 3ds emulator

    ReplyDelete
  26. By way of this technique people will have a way to download themes,
    extensions, programs, etc. It is the toughest precious stone that is 2nd.
    No jailbreak means no open, easy as that.

    my website ... download Redsn0w - http://www.fotos-amor.net -

    ReplyDelete
  27. Asking questions are in fact pleasant thing if you are not understanding anything entirely, except
    this post offers pleasant understanding yet.

    Also visit my weblog; zombie survival gear

    ReplyDelete
  28. Hello There. I found your blog using msn. This is an extremely well written article.
    I'll be sure to bookmark it and come back to rewad more of your
    useful information. Thanks for the post. I'll definitely comeback.


    Take a look at my blog :: venapro negative reviews

    ReplyDelete
  29. Magnificent beat ! I would like to apprentice while you amend your web site,
    how can i subscribe for a blog web site? The account aided me a acceptable deal.
    I had been a little bit acquainted of this your broadcast
    provided bright clear idea

    Here is my web site; clash of clans builder hack

    ReplyDelete
  30. These are nothing but video plays that bike race cheats can be installed on the road.
    With Snake, and bike race cheats a day in age technology has added
    a new game anyway so they do something too that's gamification. Keep in mind the growing popularity of free mobile games tend to
    be as simple as it gains more traction in the market.

    Visit my homepage bike race unlimited money

    ReplyDelete
  31. Very nice openGl project............

    ReplyDelete
  32. Yes it works perfectly.

    You try to downloads both the main file and the header file as well. If you try to not get both, the program will not run. 

    What is the problem? Unless you post the problem it will not going to get solve. Try to post what is not happening or what has happened. Tell the problem!

    ReplyDelete
  33. The King Casino Company - Ventureberg
    It was born in 출장샵 1934. The Company septcasino offers luxury hotels, If you don't have https://deccasino.com/review/merit-casino/ a poker ventureberg.com/ room in your house, then you'll find a poker room in the wooricasinos.info

    ReplyDelete