Tuesday, June 12, 2012

3D Solar System Simulation graphics project in SharpGL(OpenGL for C#)

I have work in this project “3D Solar System Simulation” as a graphics course. It may not be accurate as our solar system but perfect for learning OpenGL in c#(SharpGL). For accurate simulation we have to do little research effort which I haven’t time to do so. I have created this within one week and provide the platform for simulation of solar system. All eight planet revolve around the sun in elliptical path and also rotated about their own axis. You can see my technique how I make the possible  for rotation in its own axis and revolution around the sun simultaneously. There are some limitation in this project which I will discuss below.You can also download the complete project with source code from below.
The requirement to run and learn this project:-
  1. Os windows 7 and visual studio IDE
  2. You must add the template for SharpGL
  3. Basic knowledge of OpenGL ,C# and windows form.

The things you learn in this project:
  1. Timer control in windows form
  2. Texture mapping technique in Sphere
  3. Creating the dynamic array using List in C#
  4. Generating the co-ordinate for elliptical path
  5. Rotation method in OpenGL in C#(SharpGL)
The feature of the project:
  1. Due to texture mapping which had provided the real look for all planet
  2. All planet revolve around the sun and as well as rotate about their own axis
  3. Sun stay in stationary position
Limitation of project:
  1. The ring of the saturn is not drawn
  2. The rotation and revolution speed may not be accurate
  3. The asteroid belt and stars  hasn’t added.
Recommendation for you, features that can be added in this project
  1. You can improve the limitation by adding the ring for saturn , asteroid belt and stars in the sky
  2. Do little research to make the speed of rotation and revolution accurate
  3. Change the viewing direction and make the path of planet by making the thin elliptical ring and give the name by rendering text.
The output screen of project look like this:

You can download the complete project file with source code and exe file from here or below. If you face the any problem regarding the project then leave the comment and you can also mail me.
Download: Simulation_of_SolarSystem

9 comments:

  1. Can this 3D Solar System change to wpf(c#) form?

    ReplyDelete
    Replies
    1. I have used ShapGL for windows form. For wpf you have to install SharpGL template for WPF. Then create the Project for SharpGL for WPF. SharpGL code is same for both WPF and windows form you just need to change the code form windows form to WPF. You can do it easily.

      Delete
    2. Could you tell me how to texture mapping in wpf,I had read your article (Texture mapping in SharpGL (OpenGL in C#) sample program for windows form )
      but the code is c not c#. Thanks for your help

      Delete
  2. Do u have the source code for stack n queue data structures

    ReplyDelete
  3. Hello Check my Solar System in C# it has a class to draw stars with GL_POINT
    http://www.codeproject.com/Articles/577259/D-solar-system-with-OpenGL-and-Csharp

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete