Search Projects

Sunday, August 31, 2014

Phases of Moon - VTU 6th sem mini project

We have seen many OpenGL Projects for vtu 6th sem mini project, but this is quite as simple as of others. Today we are going to talk about the project related to moon. There are many phase of moon , it is define as - The lunar phase or phase of the moon is the shape of the illuminated portion of the Moon as seen by an observer, usually on Earth

phase of moon vtu mini project

Today for VTU 6th sem mini project in the computer graphics lab we are going to have the phases of moon. In the this program we showcase the camera orbits a lit moon to simulate the phases of the moon. This program used the OOP used in C++, the use of the classes and the methods.

First we create a class for the moon.  In the class moon we create an OpenGL display list, which is  created with create(), and the draw() method calls it.We have use the sphere to feature the moon, which has radius 1 centered at the origin. Another class which we have created is orbiter, this is an object that flies on a circle of a certain radius on the xz plane. The radius to it is supplied at the time construction. Since there is one one moon so it must be static, hence we declared the moon to be static variable. 

How we are showing the phase? It's easy by using the lightning property of OpenGL. We have used the GL_LIGHT0 to focus the light on the moon, making the all phase visible as it go. Pointing in the direction of vertex 1,1,1 it's is possible to show all the moon phases.

Future Addition to phase of moon vtu mini project

  • Add the name of the phases of moon as it's go.
  • Add interaction to the project.
  • In this, adding the zoom option is wonderful thought.

No comments:

Post a Comment