Upload
megha-kamath
View
215
Download
0
Embed Size (px)
Citation preview
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
1/33
Atria Institute of Technology
2011
Approximation of Nucleus
of an AtomA mini project report
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
2/33
VISVESVARAYA TECHNOLOGICAL UNIVERSITY
BELGAUM
COMPUTER GRAPHICS & VISUALIZATION
LABORATORY MINI-PROJECT REPORT ON
APPROXIMATION OF NUCLEUS OF AN ATOM
SUBMITTED BY
MOUNESH B P NAGARAJ PAI S SUMANTH H S
1AT08CS066 1AT08CS068 1AT08CS106
Submitted by partial fulfillment of the requirement for the award of the
Degree of Bachelor of Engineering
In
Computer Science & Engineering
UNDER THE GUIDANCE OF
Mr.I DAYANAND SOANS Mrs.BHUVANESHWARI RAJU
Professor Lecturer
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
3/33
Anandnagar,Bangalore-560024
Atria Institute of TechnologyAnandanagar,Bangalore-560024
CERTIFICATE
This is to certify that the project entitled Approximation
of nucleus of an atom has been successfully
completed by
NAGARAJ PAI S
1AT08CS068
In partial fulfillment for the Computer Graphics &
Visualization Laboratory [06CSL67] VI semester, BE
Computer Science during 2010-2011.
Signature of guide signature of co-
guide
Prof. I Dayanand Soans Mrs.Bhuvaneshwari Raju
Signature of HOD
Prof. M.Basavaraju
External viva:
(Name of the Internal/External Examiner with Signature & Date)
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
4/33
Examiner 1
Examiner 2
ACKNOWLEDGEMENT
Behind every success there is a master hand. A master hand will create
unperturbed concentration, dedication and encouragement in everything good
and bad, without whose blessing this would have never come into existence.
I thankDr. Shivakumar, Principal, Atria Institute of Technology for not
only providing us with excellent facilities, but also for offering his unending
encouragement that has made this project a success today.
Esteemed gratitude is due to Prof. M. Basavaraju, HOD of Computer
Science & Engineering for his valued co-operation in completion of this
report.
I am also extremely grateful to my project guide & coordinator, Prof. I
Dayanand Soans & Mrs. Bhuvaneshwari Raju for thier constant support and
advice throughout the course of preparation of this document.
I would also like to extend my sincere gratitude to the faculty and non-
teaching staff of the department of CSE for extending their technical suggestionand being a constant source of inspiration behind this seminar.
Finally, I would like to thank all friends and well-wishers who helped me
with the content of this report, without which the seminar would not have
become a reality.
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
5/33
MOUNESH B P NAGARAJ PAI S SUMANTH H S
1AT08CS066 1AT08CS068 1AT08CS106
ABSTRACT
This 3D project is used to create an environment consisting of 2 objects
on which various functionalities have been applied.
When you trigger some defined keyboard strokes various events
Occur such as zoom on the objects on display, objects rotation,
Lighting effects, 3D spin of objects, orthographic and perspective consideration
of object on display etc. These functions have been implemented using various
OpenGL routines and libraries.
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
6/33
CONTENTS
1. Introduction.1
1.1 Brief outline of project.2
1.2 Organization of rest of the report...3
2. Requirement Specifications....4
3. System design...6
4. Detailed Design.....94.1 Data and Type Definitions9
4.2 Top Level Pseudocode.....13
5. Testing..17
5.1 Test plan17
5.1.1 Unit testing17
5.1.2 System testing....17
5.2 Test results /snapshots..18
5.2.1 System testing18
6.Conclusion and scope for further enhancement20
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
7/33
7. Appendix21
7.1 Appendix-121
7.1.1 Bibliography.21
7.1.1.1 Reference books/papers....21
7.1.1.2 Web sites21
7.2 Appendix-222
7.2.1 Development tools.22
7.2.2 Hardware environments...22
7.2.3 Software environments22
7.2.4 Other development tools...23
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
8/33
App.of nucleus of an Atom 2011
INTRODUCTION
Introduction To OpenGL:
OpenGL (Open Graphics Library) is a standard specification defining a
cross-language, cross-platform API for writing applications that
produce 2D and 3D computer graphics. The interface consists of over 250
different function calls which can be used to draw complex three-dimensional
scenes from simple primitives. OpenGL is widely used in CAD, virtual reality,scientific visualization, information visualization, flight simulation, and video
games.
OpenGL specifies a set of "commands" or immediately executed
functions. Each command directs a drawing action or causes special effects. A
list of these commands can be created for repetitive effects. OpenGL is
independent of the windowing characteristics of each operating system, but
provides special "glue" routines for each operating system that enable OpenGL to
work in that system's windowing environment. OpenGL comes with a large
number of built-in capabilities requestable through the API. These include hidden
surface removal, alpha blending (transparency), antialiasing , texture
mapping, pixel operations, viewing and modeling transformations, and
atmospheric effects (fog, smoke, and haze).
Dept. of CSE AIT Page 1
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
9/33
App.of nucleus of an Atom 2011
Brief outline of the project:
The program is implemented in Visual C++ using OpenGL. It is an
interactive program with keyboard.
The keyboard is used for interacting with the objects on display:
Various functionality have been implemented with some specific keyboard
strokes, the objects are shaded smoothly with
a 3D effect, spin is implemented with a recursive routine and also different
direction in viewing of the objects have been included.
These functions have been implemented using various OpenGL routines and
libraries.
The goal of this program is to implement an environment having
two nucleus with electron in specific orbit about the nucleus .
The electron are made to spin about its nucleus in specific 3D
Predefined path. With specific key strokes the nucleus is made to revolve about
each other with simultaneous rotation of electron. We can also switch between
orthographic and perspective viewing.
Dept. of CSE AIT Page 2
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
10/33
App.of nucleus of an Atom 2011
Organization of the project:
This project is about implementing an Open GL with a set of glut key
words. glut.h, glut32.dll and glut32.lib functions are compatible only with the
Microsoft visual basic.
THIS PROJECT CONTAINS THE FOLLOWING KEY WORDS
glClearColor () => to clear the screen, use black.
glutInitWindowsSize() => to set the size of the output screen.
glLoadIdentity() => to load the identity matrix.
glutDisplay() => to display the output screen again and again.
glutTimerFunc() => to set the timer.
glutCreateWindow() => to create window for output.
glutKeyboardFunc() => allows the user to use keyboard for interaction.
glutIdleFunc() => invoked when there are no events in the event queue.
glutMouseFunc() => allows the user to use mouse for interaction.
glPushMatrix() => to push the attributes.
glTranslatef() => to translate the object from one positon to other.
glPopMatrix() => after carry over function attributes will be popped.
Dept. of CSE AIT Page 3
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
11/33
App.of nucleus of an Atom 2011
REQUIREMENT SPECIFICATIONS
Introduction:
Computer Graphics started with the display of data on hardcopy plotters
and cathode ray tube screens soon after the introduction of computer themselves.
It includes the creation, storage, and manipulation of models and images of
objects. These models include physical, mathematical, engineering, architectural
and even conceptual or abstract structures, natural phenomenon, and so on.
Computer Graphics today is largely interactive- the user controls the contents,
structure, and appearance of objects and their displayed images by using input
devices, such as keyboard, mouse or touch sensitive panel on the screen.
Graphics provides one of the most natural means of communicating with
the computer, since our highly developed 2D and 3D pattern- recognition
abilities allow us to perceive and process pictorial data rapidly and efficiently. In
many design, implementation, and construction processes, the information
pictures can give is virtually indispensable.
OpenGL is an open specification for an applications program interface for
defining 2D and 3D objects. The specification is cross-language, cross-platform
API for writing applications that produce 2D and 3D computer graphics. It
renders 3D objects to the screen, providing the same set of instructions on
different computers and graphics adapters. Thus it allows us to write an
application that can create the same effects in any operating system using any
OpenGL-adhering graphics adapter.
OpenGL is a low-level, procedural API, requiring the programmer to
dictate the exact steps required to render a scene. OpenGLs low-level design
Dept. of CSE AIT Page 4
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
12/33
App.of nucleus of an Atom 2011
requires programmers to have a good knowledge of the graphics pipeline, but
also gives a certain amount of freedom to implement novel rendering algorithms.
Hardware Requirements
IBM Compatible Computer
Pentium processor
128MB RAM
40GB hard disk
Standard keyboard
VGA Color Monitor
Mouse
Software Requirements
An MS-DOS based operating system Windows 98,Windows 2000 or
Windows XP, Windows 7, Windows Vista is the platform required to
develop the 2D and 3D graphics applications.
A Visual C/C++ compiler is required for compiling the source code to
make the executable file which can then be directly executed.
A built in graphics library like glut and glut32, and header file like
glut.h and also dynamic link libraries glut and glut32, and header file
like glut.h and also dynamic link libraries glut and glut32 are requiredfor creating the 3D layout.
Input Interface
Key board
Mouse
Output Interface
Monitor
Dept. of CSE AIT Page 5
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
13/33
App.of nucleus of an Atom 2011
SYSTEM DESIGN
Introduction:
This project aims the approximation of nucleus of an atom. It is designed
to do basic operations such as rotation, lighting.
It also provides user interface through keyboard.
Design Overview:
Here we have presented the rotation of electrons around nucleus of He
and Ne. It is designed to do basic operations such as rotation, lighting, and
toggling. It also provides user interface through pop-up menus and keyboard.
We use keyboard for selecting and performing various operations on the
objects. Pop up menu bar contains options as shading, transparency, light with
ON/OFF, slow down, slow up and quit.
Transformation functions namely translation, rotation and scaling on the
objects are provided.
The keyboard function is also used so that we can use the keys as
specified in the code to different operations. The appropriate operations will be
performed with corresponding keys.
The lighting function also is used for project, here we can provide the
light and also disable it.
Dept. of CSE AIT Page 6
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
14/33
App.of nucleus of an Atom 2011
Detailed description of components:
int main(int argc, char** argv)
Initializes the GLUT library and sets up all the callbacks (display
and menu). Also, the window is created, and its name, position and size are
specified.
Void sprint (int x, int y, char *st)
This function is used to display roman character output.
void display(void)
Various objects are being created and output callback function is
being called.
Void init (void)
This function will set various light property.
Void reshape(int w, int h)
This function is called when the window is resized.
Static void Time Event (int te)
This creates the spinning of objects on display.
Dept. of CSE AIT Page 7
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
15/33
App.of nucleus of an Atom 2011
Void keyboard (unsigned char key, int x, int y)
This function is used to read the keyboard.
Void Draw_atom_He(GLfloat x ,GLfloat y ,GLfloat z ,int
elec , int orbit)
This function is used to draw the atom He using push and pop matrix.
Void Draw_atom_Ne(GLfloat x ,GLfloat y ,GLfloat z ,int
elec , int orbit)
This function is used to draw the atom He using push and pop matrix.
Chosen system architecture:
Dept. of CSE AIT Page 8
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
16/33
App.of nucleus of an Atom 2011
DETAILED DESIGN
This project is developed using Microsoft Visual C++ with openGL as an
academic project using keyboard and mouse. This project is implented by
makink use of extensive use of library functions offered by graphic package of
OPENGL. A number of user defined functions also have been used and a
summary of those functions follows this list of standard library functions.
DATA & TYPE DEFINITIONS:
glBegin (GLenum mode);
It defines the type of primitives that the vertices define. Each subsequent
execution og glVertex3f pecifies the x,y,z coordinates of a location in space.
glEnd (void);
It ends the list of vertices.
glClear (GLbitfield mask);
It is used to make the screen solid and white.
glClearColor (GLclampf red, GLclampf green, GLclampf blue,
GLclampf alpha);
The background color is set with this API where the last argument specifies adegree of transparency.
glEnable (GLenum cap);
We enable different algorithms by this function call.
glutInit( );
This function defines the interaction between the windowing system and the
OpenGL.
Declaration:
Dept. of CSE AIT Page 9
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
17/33
App.of nucleus of an Atom 2011
glutInit(&argc,argv);
glutInitDisplayMode( );
Here we specify RGB color system and also double buffering.
Declaration:
glutInitDisplayMode(GLUT_RGB|GLUT_DOUBLE);
glutInitWindowSize( );
This function specifies a window in the top left corner of the display.
Declaration:
glutInitWindowSize(900,700);
glutCreateWindow( );
This creates an OpenGL window using the glut function where the title at
the top of the window is given by the string inside the parameter of the
above function.Declaration:
glutCreateWindow(Use of 3D shapes and Transformation);
glutReshapeFunc( );
The Reshape Event is generated whenever the window is resized,
such as user interaction
Declaration:
glutReshapeFunc(myReshape);
glutDisplayFunc( );
Graphics are sent to screen through a function called the display call back, here
the function named func will be called whenever the windowing system
determines that OpenGL window needs to be redisplayed.
Declaration:
Dept. of CSE AIT Page 10
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
18/33
App.of nucleus of an Atom 2011
glutDisplayFunc(display);
glutIdleFunc( );
glutidle function checks idle callback i.e it can perform a
background processing task or continous animation when windows system
events are not being received.
Declaration:
glutIdle(myIdleFunc);
glutMouseFunc( );
This function handles mouse click events.
Declaration:
glutMouseFunc(myMouse);
glutKeyboardFunc( );
This function handles keyboard events.Declaration:
glutKeyboardFunc(myKey);
glColor3f( );
In RGB color we have three attributes to set. The first is clear color,which is
set to black and we can select the rendering color for points by setting the state of
variable to black by using the following function call.
Declaration:
glClearColor(0.0,0.0,0.0,0.0);
glColor(0.0,0.0,0.0);
Void dislpay(void)
Dept. of CSE AIT Page 11
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
19/33
App.of nucleus of an Atom 2011
This function is the callback function for DispalyFunc. This function is
mandatory because GLUT requires that all programs have a display callback.
Void myReshape(int w,int h)
This function is used whenever the window is resized. In our programs we need
the required display callback for drawing because the primitives are generated
when a mouse event occurs.
Dept. of CSE AIT Page 12
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
20/33
App.of nucleus of an Atom 2011
TOP LEVEL PSEUDOCODE:
STEP I:
In the declaration section, light properties are set, variables, light values
are being defined.
STEP II:
First, in the main function, the GLUT library is initialized and a session is
negotiated with the windows system. In addition, the callbacks are set for thedisplay and keyboard functions.
STEP III:
In the display callback function, various objects are being created and
output callback function is being called.
STEP IV:
In the output function, i.e. Sprint() , the callback is set for the displaying the
text in Roman style.
To draw He atom:
void Draw_atom_He( x coordinate, y coordinate, z coordinate, no.of electrons,
no.of orbits)
{
glPushMatrix();
glTranslatef( x, y, z);
glColor3f( 1.0, 0.0, 0.0);
glutSolidSphere( 5, 16, 8); //to draw He nucleus
Dept. of CSE AIT Page 13
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
21/33
App.of nucleus of an Atom 2011
glPushMatrix();
glColor3f( 1.0, 1.0, 1.0);
glRotatef(orbit, 0, 0, 1);
glutSolidTorus( 0.12, 10, 16, 32);
glPushMatrix();
glTranslatef(0, 10, 0);
glColor3f(0.0, 0.0, 1.0);
glutSolidSphere( 1, 16, 8); //to draw electrons
glPopMatrix();
glPushMatrix();
glTranslatef(0, -10, 0);
glColor3f(0.0, 0.0, 1.0);
glutSolidSphere( 1, 16, 8);
glPopMatrix();
glPopMatrix();
glPopMatrix();
}
To draw Ne atom:
void Draw_atom_Ne( x coordinate, y coordinate, z coordinate, no.of electrons,
no.of orbits)
{
int i;
glPushMatrix();
Dept. of CSE AIT Page 14
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
22/33
App.of nucleus of an Atom 2011
glTranslatef( x, y, z);
glColor3f( 1.0, 0.0, 0.0);
glutSolidSphere( 5, 16, 8); //to draw Ne nucleus.
glPushMatrix();
glColor3f( 1.0, 1.0, 1.0);
glRotatef(orbit, 0, 0, 1);
glutSolidTorus( 0.12, 10, 16, 32);
glPushMatrix();
glTranslatef(0, 10, 0);
glColor3f(0.0, 0.0, 1.0);
glutSolidSphere( 1, 16, 8);
glPopMatrix();
glPushMatrix();
glTranslatef(0, -10, 0);
glColor3f(0.0, 0.0, 1.0);
glutSolidSphere( 1, 16, 8);
glPopMatrix();
glPushMatrix();
glColor3f( 1.0, 1.0, 1.0);
glRotatef(25, 1.0, 0.0, 0.0);
glRotatef(360 - orbit, 0, 0, 1);
glutSolidTorus( 0.12, 15, 16, 32);
for ( i=0; i < 10; i++) //we need to show 10 electrons.
{
glPushMatrix();
Dept. of CSE AIT Page 15
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
23/33
App.of nucleus of an Atom 2011
glRotatef((360/10) * i, 0.0, 0.0, 1.0);
glTranslatef(0, 15, 0);
glColor3f(0.0, 0.0, 1.0);
glutSolidSphere( 1, 16, 8);
glPopMatrix();
}
glPopMatrix();
glPopMatrix();
glPopMatrix();
}
User interface:
void keyboard ( key, x, y)
{
If case:v or V
view_state = abs(view_state -1); //change to view state
else if case:l orL
light_state = abs(light_state -1); //change the light state
else if (key ESC): //to exit
exit(0);
else if(case 'r')
r=spin++;
else if(case 'e') and(i==0)
{
i=1;
else i=0;
}
else if(case 'z'): //to stop the spinning
s=0;
Dept. of CSE AIT Page 16
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
24/33
App.of nucleus of an Atom 2011
else if (case 'x'): //to start the spinning
s=1;
}
TESTING
Unit testing:
In unit testing we test the individual components in the system.
Atom Design:
In atom design we add draw_atom_He and draw_atom_Ne functions that
creates the atoms.
Translation:
Translation function will be performed when the corresponding key is
pressed and appropriate keys.
Keyboard :Depending upon the key pressed the corresponding function executes such
as for ortho and perspective view etc
System Testing:
In this we integrate all the components and check the working of the overall
system. Our source code for approximation performs certain basic operations
such as rotation, coloring, lighting, texturing and toggling through the interfaces-
pop menus and keyboard. Various options are available for shading, texture,
transparency, light ON/OFF, and quit. We show the motion of the nucleus of the
atom finally.
Translation:
input: points for translation along with the related functions will be called
output: the object will be translated according to the keys pressed.
Keyboard :
Input: characters entered by the user
Output: corresponding action will be performed
Dept. of CSE AIT Page 17
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
25/33
App.of nucleus of an Atom 2011
System testing:
The interfaces that we have used in this project are keyboard and pop-menu.
Pop-menu bar and keyboard is provided for selecting and performing variousoperations on the objects.
SNAP SHOTS
SYSTEM TESTING:
Dept. of CSE AIT Page 18
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
26/33
App.of nucleus of an Atom 2011
Dept. of CSE AIT Page 19
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
27/33
App.of nucleus of an Atom 2011
CONCLUSION & FUTURE ENHANCEMENTS
The goal of this program is to implement an environment having
two nucleuses with electron in specific orbit about the nucleus.
The electron are made to spin about its nucleus in specific 3D
Predefined path. With specific key strokes the nucleus is made to revolve about
each other with simultaneous rotation of electron. We can also switch between
orthographic and perspective viewing.
As a future enhancement, I would like to implement this program for
changing the different other objects. I would also like to implement this program
for changing the size of various objects.
Dept. of CSE AIT Page 20
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
28/33
App.of nucleus of an Atom 2011
APPENDIX
APPENDIX-1BIBILIOGRAPHY:
Reference Text books:
1. Edward Angel:
Interactive Computer Graphics: A Top-Down Approach with
OpenGL
2. F.S. Hill, Jr.:
Computer Graphics Using OpenGL
3. Donald Hearn and Pauline Baker:
Computer Graphics- OpenGL Version
4. Richard S. Wright, Jr. and Michael Sweet:
Dept. of CSE AIT Page 21
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
29/33
App.of nucleus of an Atom 2011
The OpenGL Super Bible
5. Dave Shreiner, Mason Woo, Jackie Neider and Tom Davis:
OpenGL Programming Guide
6. Shalini Govil-Pai:
Principles of Computer Graphics: Theory and Practice Using
OpenGL
Websites:
http://nehe.gamedev.net/
www.sourcecode.com
www.opengl.com
APPENDIX-2
Development tools:
Microsoft Visual Studio 2005/08
Hardware Requirements:
IBM Compatible Computer
Pentium processor
128MB RAM
40GB hard disk
Standard keyboard
Dept. of CSE AIT Page 22
http://nehe.gamedev.net/http://www.sourcecode.com/http://www.opengl.com/http://nehe.gamedev.net/http://www.sourcecode.com/http://www.opengl.com/7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
30/33
App.of nucleus of an Atom 2011
VGA Color Monitor
Mouse
Software Requirements:
An MS-DOS based operating system Windows 98, Windows 2000 or
Windows XP, Windows 7, Windows Vista is the platform required to
develop the 2D and 3D graphics applications.
A Visual C/C++ compiler is required for compiling the source code to
make the executable file which can then be directly executed. A built in graphics library like glut and glut32, and header file like
glut.h and also dynamic link libraries glut and glut32, and header file like
glut.h and also dynamic link libraries glut and glut32 are required for
creating the 3D layout.
Other devolopement tools:
1. glClear
Takes a single argument that is the bitwise OR of several values
indicating which buffer is to be cleared.
2. glClearColor
Specifies the red, green, blue, and alpha values used by glClear to clear
the color buffers.
3. glColor3f
Dept. of CSE AIT Page 23
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
31/33
App.of nucleus of an Atom 2011
Set the current color.
4. glDisable
Disables various capabilities.
6. glEnable
Enables various capabilities.
7. glFlush
Force execution of GL commands in finite time.
8. glLoadIdentity
Replaces the current matrix with the identity matrix.
9. glMatrixMode
Sets the current matrix mode, mode can be GL_MODELVIEW orGL_PROJECTION.
10. glPopMatrix
Pops the current matrix stack, replacing the current matrix with the onebelow it on the stack.
11. glPushMatrix
Pushes the current matrix stack down by one, duplicating the current
matrix.
12. glScalef
Multiply the current matrix by a general scaling matrix.
Dept. of CSE AIT Page 24
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
32/33
App.of nucleus of an Atom 2011
13. glTranslatef
Produces a translation by (x,y,z).
14. gluLookAt
Define a viewing transformation.
15. gluPerspective
Specifies a viewing frustum into the world coordinate system.
16. glutCreateWindow
Creates a top-level window.
17. glutDisplayFunc
Sets the display callback for the current window.
18. glutIdleFunc
Sets the global idle callback.
19.glutInit
Initializes the GLUT library.
20. glutInitDisplayMode
Sets the initial display mode.
22. glutKeyboardFunc
Sets the keyboard callback for the current window.
Dept. of CSE AIT Page 25
7/31/2019 App.of Nucleus of an Atom_rep_final_nagaraj
33/33
App.of nucleus of an Atom 2011
23.glutMainLoop
Enters the GLUT event processing loop.
24. glutSwapBuffers
Swaps the buffers of the current window if double buffered.