Page Index: Chapter No. Topic 1 2 Grid 3 Requirement Specifications
Page Index: Chapter No. Topic 1 2 Grid 3 Requirement Specifications
CHAPTER NO.
TOPIC
INTRODUCTION
GRID
REQUIREMENT SPECIFICATIONS
2.1 Hardware Requirements
2.2 Software Requirements
SYSTEM DESIGN
IMPLEMENTATION
4.1 Inbuilt Functions
4.2 Working with the window system
4.3 User Defined Functions
SNAPSHOTS
CONCLUSION
Chapter 1
INTRODUCTION
Computer Graphics
Computer Graphics concerns the pictorial synthesis of real or imaginary objects from
their computer-based models or in other words it may be the collection, combination and
representation of imaginary objects from their computer-based models. The term computer
graphics has been used in a broad sense to describe almost everything on computers that is not
text or sound. It is one of the most rapidly advancing fields of computer science and is used in
almost all fields including medical and military. It is also an effective media for communication
between man and the computer; the human can understand the information content of a display
diagram or perspective view much faster than he can understand a table of numbers. Graphical
interfaces have replaced textual interfaces as the standard means of computer interaction.
Computer Graphics has matured over the years as a discipline. Both hardware and
software are available that facilitate the production of graphical images as diverse as line
drawings in 2D to realistic renderings of natural objects in 3D. Nowadays Computer Graphics is
also making deep inroads into the business, advertising, communication medium and
entertainment industries. Today, no scientist or engineer should be without a basic understanding
of underlying principles of Computer Graphics.
Computers have become a powerful tool for rapid and economical production of
pictures, animation, games and simulation. Computer graphics is one of the most powerful and
interesting part of a computer. There is a lot that can be done in graphics apart from drawing
figures. There is virtually no area in which graphics display cannot be used to some advantage
and so it is not surprising to find the use of computer graphics so widely accepted.
OpenGL
OpenGL or Open Graphics Library is a cross language, multi-platform API for rendering
2D and 3D computer graphics. The API is typically used to interact with a GPU, to achieve
hardware-accelerated rendering. OpenGL was developed by Silicon Graphics Inc. from 1991 and
released in January 1992. It provides the actual drawing tools through a collection of functions
that are called within an application. It is easy to install and learn, and its longevity as a standard
API is being nurtured and overseen by the OpenGL Architecture Review Board (ARB), an
industry consortium responsible for guiding its evolution. It is widely used in CAD, virtual
reality, scientific visualization, information visualization, flight simulation and video games.
The OpenGL specification describes an abstract API for drawing 2D and 3D graphics.
Although its possible for the API to be implemented entirely in software, its designed to be
implemented mostly or entirely in hardware. Although the function definitions are superficially
similar to those of the C programming, they are language independent. In addition to being
language independent, it is also platform-independent. One aspect of OpenGL that suits it so well
for use in computer graphics course is its device independence or portability. A student can
develop and run a program on any available computer. OpenGL offers a rich and highly usable
API for 2D graphics and image manipulation, but its real power emerges with 3D graphics.
Characteristics of OpenGL
Chapter 2
GRID
GRID consists of user interface (GUI) which is separated into three sections:
Object Editor - Individual objects are stored and edited within the object
editor. Objects may be composed of primitives such as spheres, or more
complex shapes made by extruding polygons and adjusting the vertexes.
Materials are then applied
Properties Editor Each object created in Object Editor will have its own
properties such as width & height of cube. When object is selected, it is
highlighted & its properties are shown in the Properties Editor. User is
allowed to modify the properties.
Object List Each object in the Object editor will be listed with their
unique name. Currently selected object will be highlighted.
FEATURES
Chapter 3
REQUIREMENT SPECIFICATIONS
The basic purpose of software requirement specification (SRS) is to bridge the
communication between the parties involved in the development project.SRS is the medium
through which the users needs are accurately specified; indeed SRS forms the basis of software
development. Another important purpose of developing an SRS is helping the users understand
their own needs.
Now we will be discussing the requirement analysis of the project. This report gives the
description of the roles of users, the functional overviews of the project, input and output
characteristics and also the hardware and software for the project.
Processor :
Hard Disk :
5 GB recommended.
Memory :
Display
Keyboard :
Write a 16 bit DOS program and use assembly language for graphics.
OpenGL subsystems
OpenGL provides a powerful but primitive set of rendering commands, and all higherlevel drawing must be done in terms of these commands. Also, OpenGL programs have to use
the underlying mechanisms of the windowing system. A number of libraries exist to simplify the
programming tasks, including the following:
The OpenGL Utility Library(GLU)contains several routines that use lower-level OpenGL
commands to perform such tasks as setting up matrices for specific viewing orientations and
projections, performing polygon tessellation, and rendering surfaces. The library is provided as
part of every OpenGL implementation.
Chapter 4
SYSTEM DESIGN
The role of the user is limited in our project. User can do the following operations:
The user has to simply click on debug option then everything is automatic
FLOWCHART:
A flowchart is a common type of chart that represents an algorithm or process
showing the steps as boxes of various kinds and their order by connecting these with arrows.
Flowcharts are used in analyzing, designing, managing a process or program in various
fields.
Flowcharts used to be a popular means for describing computer algorithms. They are still
used for the purpose, modern techniques such as UML activity diagram can be considered to
be extensions of the flowchart.
Chapter 5
IMPLEMENTATION
The implementation stage of the model involves the following phases.
GLdouble.
9. glPushMatrix ( )
It pushes to the matrix stack corresponding to the current matrix mode.
10. glPopMatrix ( )
Pops from the matrix stack corresponding to the current matrix mode.
11. glColor3[i f ] (TYPE r, TYPE g, TYPE b)
It sets the present RGB colors. Valid types are byte (b), int (i), float (f),
double (d) and many more. The maximum and minimum values of the floating point
types are 1.0 and 0.0.
12. glBegin (glEnum mode)
It initiates a new primitive of type mode and starts the collection of
vertices. Values of mode include GL_POINTS, GL_LINES, and GL_POLYGON.
13. glVertex[2 3][s i d f]( TYPE xcoordinate, TYPE ycoordinate,)
It specifies the position of a vertex in 2 or 3 dimensions. The coordinates
can be specified as shorts s, int i, floats f or doubles d.
14. glEnd ( )
It terminates a list of vertices.
15. glMatrixMode(GLenum mode)
Specifies which matrix will be affected by subsequent transformations. Mode
can be GL_MODELVIEW,GL_PROJECTION.
16. void glLoadIdentity()
This function sets the current transformation matrix to an identity matrix.
17. void glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble
top, GLdouble near,GLdouble far)
glOrtho defines an 3 dimensional orthographic viewing volume with
parameters left, right, bottom, top, near, far measured from the center of the projection plane.
18. glFlush()
It flushes the color buffer and depth buffer.
19. void glutPostRedisplay ()
Request that the display call back be executed after the current call back returns.
20. glRasterPos2f()
This function specifies raster postion. Parameters are the same for glVertex().
Chapter 6
SNAPSHOTS
Chapter 7
CONCLUSION
Computer Graphics plays a major role in todays world where visualization takes
the upper hand as compared to text based interactions. This is largely true as we can see
user interfaces more attractive. All thanks to the major leaps in the field of Computer
Graphics.
Working with computer graphics and exploring its new features is really interesting.
In conclusion, it can be said that OOP's concept along with the use of graphics has a very
deep impact in programming. The usage of input device along with these makes the work
easier though the usage of mouse has been restricted to some parts in the software. But, in
spite of this limitation, it is seen that a user can handle the software without much
difficulty.
This is being my first project using an Open GL implementation. It was an effort
to demonstrate the basic Open GL functions which will help the user to gain some
knowledge about Computer Graphics. I hope this will be a stepping stone to my next such
projects.
BIBLIOGRAPHY
[1]
Edward Angel - Interactive Computer Graphics A Top Down Approach with OpenGL
5th Edition, Addison-Wesley, 2008.
[2]
F.S.Hill, Jr. - Computer Graphics Using OpenGL 2nd Edition, Pearson Education, 2001.
[3]
Donald Hearn and Pauline Baker - Computer Graphics OpenGL Version 2nd Edition,
Pearson Education, 2003.