Professional Documents
Culture Documents
CHAPTER-1
INTRODUCTION
1.1 Computer Graphics
Computers have become a powerful tool for the rapid and economical production
of pictures. There is virtually no area in which graphical displays cannot be used to some
advantage, and so it is not surprising to find the use of computer graphics so widespread.
Although early applications in engineering and science had to rely on expensive and
cumbersome equipment, advances in computer technology have made interactive computer
graphics a practical tool. Today, we find computer graphics used routinely in such diverse
areas as science, engineering, medicine, business, industry, government, art, entertainment,
advertising, education, and training. Computer graphics is concerned with all aspects of
synthesizing and manipulating images.
It is always difficult to try to categorize endeavors in any field, but some of the major
fields that computer graphics has an impact on can be summarized as follows:
Mechanical designer, architects, cartographers to display information.
It is used for creating user interface like menus, windows, icons and pointing devices.
Functions in main GL library name function names that begin with the letter ‘gl’.
GLU library uses only GL functions but contains code for creating objects and simplify
viewing.
To interface with the window system and to get input from external devices GLUT
library is used, which is a combination of three libraries GLX for X windows, ‘wgl’ for
Windows and ‘agl’ for Macintosh.
These libraries are included in the application program using preprocessor directives.
E.g.: #include<GL/glut.h>
The following figure shows the library organization in OpenGL.
Graphics system and functions can be considered as a black box, a term used to denote a
system whose properties are only described by its inputs and output without knowing the
internal working.
Inputs to graphics system are functions calls from application program, measurements
from input devices such as mouse and keyboard.
Outputs are primarily the graphics sent to output devices.
API’s are described through functions in its library. These functions are divided
into seven major groups.
1) Primitive Functions:
Primitive functions define the low level objects or atomic entities that a system can
display, the primitives include line segments, polygons, pixels, points, text and various types
of curves and surfaces.
2) Attribute Functions:
Attribute Functions allow us to perform operations ranging from choosing the color
to display a line segment, to packing a pattern to fill inside any solid figure.
3) Viewing Functions:
Viewing functions allow us to specify various views.
4) Transformation Functions:
Transformation functions allow us to carry out transformation of objects such as
rotation,translation and scaling.
5) Input Functions:
Input functions allow us to deal with the diverse forms of input that characterize
modern graphics system. It deals with devices such as keyboard, mouse and data tablets.
6) Control Functions:
Functions enable us to communicate with the window system, to initialize the
programs, and to deal with any errors that occur during the execution of the program.
7) Query Functions:
Query Functions provides information about the API.
CHAPTER-2
SYSTEM SPECIFICATION
System requirements are intended to communicate in precise way, the functions that
the system must provide. To reduce ambiguity, they may be written in a structured form of
natural language supplemented by tables and system models.
CHAPTER-3
SYSTEM DESIGN
3.1 EXISTING SYSTEM
Existing system for a graphics is the TC++. This system will support only the 2D
graphics. 2D graphics package being designed should be easy to use and understand. It
should provide various options such as free hand drawing, line drawing, polygon drawing,
filled polygons, flood fill, translation, rotation, scaling, clipping etc. Even though these
properties were supported, it was difficult to render 2D graphics cannot be very difficult to
get a 3 Dimensional object. Even the effects like lighting, shading cannot be provided. So we
go for Microsoft Visual Studio software.
hardware platforms.
3. With openGL we can draw a small set of geometric primitives such as points,
lines and polygons etc.
4. It provides double buffering which is vital in providing transformations.
CHAPTER-4
DESIGN
4.1 Design-Flow Diagram
Start
First
page
Keyboard
function
The flow diagram explains the flow of the moving bus. The start symbol
indicates the start of execution. Once we start execution the welcome screen appears.
There are options in the screen for move the bus. IF we select first option using
CHAPTER-5
IMPLEMENTATION
Initiates a new primitive of type mode and starts the collection of vertices. Values of
mode include GL_POINTS, GL_LINES and GL_POLYGON.
5.1.2 voidglEnd( );
Sets the present RGB colors. Valid types are int(i ), float ( f ) and double ( d ). The
maximum and minimum values of the floating-point types are 1.0 and 0.0, respectively.
Sets the present RGBA clear color used when clearing the color buffer. Variables of
GLclampf are floating-point numbers between 0.0 and 1.0.
Creates a window on the display. The string title can be used to label the window.
The return value provides a reference to the window that can be used where there are
multiple windows.
Specifies the initial position of the top-left corner of the window in pixels.
Request a display with the properties in mode. The value of mode is determined by
the logical OR of operation including the color model (GLUT_RGB, GLUT_INDEX) and
buffering (GLUT_SINGLE, GLUT_DOUBLE);
5.1.9 voidglFlush( );
Initializes GLUT. The arguments from main are passed in and can be used by the
application.
Cause the program to enter an event processing loop. It should be the last statement in
main.
Registers the display function func that is executed when the window needs to be
redrawn.
CHAPTER-6
TESTING
Unit Testing
Individual components are tested to ensure that they operate correctly. Each component is
tested independently, without other system components.
Module Testing
A module is a collection of dependent components such as a object class, an abstract
datatype or some looser collection of procedures and functions. A module related
components, so can be tested without other system modules.
System Testing
This is concerned with finding errors that result from unanticipated interaction between
sub-system interface problems.
Acceptance Testing
The system is tested with data supplied by the system customer rather than simulated test
data.
CHAPTER-7
SNAPSHOTS
In this chapter the results of the project are described. The snapshot of the project showing
various functionalities like start animation, stop animation and retrieval are showcased.
CONCLUSION
The wireframe snowman has been tested under Windows 10 and has been found to
provide ease of use and manipulation to the user. The Automated lift pump created for the
Windows 7 operating system can be used to draw lines, boxes, circles, and polygons. It has
a very simple and aesthetic user interface.
We found designing and developing this Automated lift pump as a very interesting
and learning experience. It helped us to learn about computer graphics, design of Graphical
User Interfaces, interface to the user, user interaction handling and screen management.
The graphics editor provides all and more than the features that have been detailed in the
university syllabus.
REFERENCES
3. https://www.microsoft.com/en-in/download
4. https://www.stackoverflow.com/questions/