Seminar Topics & Project Ideas On Computer Science Electronics Electrical Mechanical Engineering Civil MBA Medicine Nursing Science Physics Mathematics Chemistry ppt pdf doc presentation downloads and Abstract

Full Version: A Project Report On Solar System
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
A Project Report On Solar System



ABSTRACT

Our project aims at simulating the revolution of the heavenly bodies around the sun. The movement of the planets has been demonstrated by OpenGL animation. We have used here LIGHTING AND SHADING concept along with the PERSPECTIVE VIEWING to visualise the movement of the SOLAR SYSTEM. I have added rotation concept with translation. Keyboard functions are also used for interfacing. The OpenGL graphics package is aimed at supporting the requirements of the Computer Graphics package. It is a mini Graphics Project. The editor has been implemented under the OpenGL environment using the VISUAL BASIC package using the C as the language tool.

INTRODUCTION

What is OpenGL?


OpenGL is a software interface to graphics hardware. This interface consists of about150 distinct commands that you use to specify the objects and operations needed to produce interactive three-dimensional applications.
OpenGL is designed as a streamlined, hardware-independent interface to be implemented on many different hardware platforms. To achieve these qualities, no commands for performing windowing tasks or obtaining user input are included in OpenGL; instead, you must work through whatever windowing system controls the particular hardware you're using. Similarly, OpenGL doesn't provide high-level commands for describing models of three-dimensional objects. Such commands might allow you to specify relatively complicated shapes such as automobiles, parts of the body, airplanes, or molecules. With OpenGL, you must build up your desired model from a small set of geometric primitives - points, lines, and polygons.

What is GLUT?

GLUT is a complete API written by Mark Kilgard which lets you create windows and handle the messages. It exists for several platforms, that means that a program which uses GLUT can be compiled on many platforms without (or at least with very few) changes in the code.

How does OpenGL work?

OpenGL bases on the state variables. There are many values, for example the color, that remain after being specified. That means, you can specify a color once and draw several polygons, lines or what ever with this color then. There are no classes like in DirectX. However, it is logically structured. Before we come to the commands themselves, here is another thing:
To be hardware independent, OpenGL provides its own data types. They all begin with "GL". For example, GLfloat, GLint and so on. There are also many symbolic constants, they all begin with "GL_", like GL_POINTS, GL_POLYGON. Finally the commands have the prefix "gl" like glVertex3f(). There is a utility library called GLU, here the prefixes are "GLU_" and "glu". GLUT commands begin with "glut", it is the same for every library. You want to know which libraries coexist with the ones called before? There are libraries for every system, Windows has the wgl*-Functions, Unix systems glx* and so on.

How can I use GLUT?

GLUT provides some routines for the initialization and creating the window (or fullscreen mode, if you want to). Those functions are called first in a GLUT application:
In your first line you always write glutInit(&argc, argv). After this, you must tell GLUT, which display mode you want – single or double buffering, color index mode or RGB and so on. This is done by calling glutInitDisplayMode(). The symbolic constants are connected by a logical OR, so you could use glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE). In later tutorials we will use some more constants here.
After the initialization you call glCreateWindow() with the window name as parameter.
Then you can (and should) pass some methods for certain events. The most important ones are "reshape" and "display". In reshape you need to (re)define the field of view and specify a new area in the window, where OpenGL is allowed to draw to.
Display should clear the so called color buffer – let's say this is the sheet of paper – and draw our objects.
You pass the methods by glut*Func(), for example glutDisplayFunc(). At the end of the main function you call glutMainLoop(). This function doesn't return, but calls the several functions passed by glut*Func.

OPENGL RENDERING PIPELINE

Most implementations of OpenGL have a similar order of operations, a series of
processing stages called the OpenGL rendering pipeline. This ordering, as shown
in Figure 1-2, is not a strict rule of how OpenGL is implemented but provides a
reliable guide for predicting what OpenGL will do.
If you are new to three-dimensional graphics, the upcoming description may seem
like drinking water out of a fire hose. You can skim this now, but come back to Figure
1-2 as you go through each chapter in this book.
The following diagram shows the Henry Ford assembly line approach, which
OpenGL takes to processing data. Geometric data (vertices, lines, and polygons)
follow the path through the row of boxes that includes evaluators and per-vertex
operations, while pixel data (pixels, images, and bitmaps) are treated differently for
part of the process. Both types of data undergo the same final steps (rasterization and
per-fragment operations) before the final pixel data is written into the framebuffer.

LIGHT AND MATTER

From a physical perspective a surface can either emit light by self-emission or reflect light from other sources of light. When we look at a point on an object ,the color that we see is determined by multiple interactions among light sources and reflective surfaces. These interactions can be viewed as a recursive process. Mathematically this process is an integral equation ,the rendering equation which is the principle to find the shading of all surfaces in a scene.