0% found this document useful (0 votes)
138 views

Project Report Sample

This document is a project report submitted for a Bachelor of Engineering degree. It summarizes a project on developing a helicopter game using CodeBlocks. The project aims to design a game where the player controls a helicopter to dodge rectangles, and the score is based on the distance flown before crashing. The report includes an introduction outlining the objectives, motivation and problem statement of the project. It also covers literature review, system analysis, specification, design, implementation, testing and results. The report is submitted in partial fulfillment of the degree requirements at Visvesvaraya Technological University.

Uploaded by

Indraja J
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
138 views

Project Report Sample

This document is a project report submitted for a Bachelor of Engineering degree. It summarizes a project on developing a helicopter game using CodeBlocks. The project aims to design a game where the player controls a helicopter to dodge rectangles, and the score is based on the distance flown before crashing. The report includes an introduction outlining the objectives, motivation and problem statement of the project. It also covers literature review, system analysis, specification, design, implementation, testing and results. The report is submitted in partial fulfillment of the degree requirements at Visvesvaraya Technological University.

Uploaded by

Indraja J
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 27

VISVESVARAYA TECHNOLOGICAL

UNIVERSITY
BELGAUM-590 014

2020-2021

A Project Report on “HELICOPTER”

Submitted in partial fulfilment for the award of degree of Bachelor

of Engineering

Computer Science & Engineering


by

HUSNA KHANUM 1AT18CS042


ARPITHA G 1AT18CS022
Under the Guidance of

Prof. Mrs CHANDINI U


Assistant Professor,
Dept. of CSE, AIT

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


ATRIA INSTITUTE OF
TECHNOLOGY
BANGALORE- 560024
2019-20
ATRIA INSTITUTE OF TECHNOLOGY
Department of Compute Science & Engineering
BANGALORE-560024

CERTIFICATE

Certified that the project work entitled “Helicopter”, carried out by Husna khanum
(1AT18CS04) and Arpitha G(1AT18CS022), a bonafide student of Atria Institute of
Technology, in partial fulfilment for the award of Bachelor of Engineering in Computer
Science & Engineering of Visvesvaraya Technological University, Belgaum during
the academic year 2019-2020. It is certified that all corrections/suggestions indicated for
Internal Assessment have been incorporated in the Report deposited in the departmental
library. The project report has been approved as it satisfies requirement in respect of
project work prescribed for the said degree.

Signature of Guide Signature of HOD Signature of Principal


Mrs Chandini U Dr. Aishwarya P Dr. K V Narayana
Swamy

External Viva

Name of the Examiners


Signature with date

1.______________________________ ___________________________

2.______________________________ ___________________________
DECLARATION

Husna Khanum, student of VI semester B.E in Computer Science & Engineering at


Atria Institute of Technology, hereby declare that the project work entitled
“HELICOPTER” has been carried out under the supervision of Prof. Mrs Chandini U,
Assistant Professor, Dept. of CS&E, Atria Institute of Technology and submitted in
partial fulfilment of the course requirements for the award of degree in B.E in Computer
Science & Engineering of Visvesvaraya Technological University, Belagavi during the
year 2020-2021. We further declare that the report has not been submitted to any other
University for the award of any other degree.

Place: Bangalore
HUSNA KHANUM Date:
1AT18CS042

i
ABSTRACT

Nowadays we see a lot of attention is given towards safe guarding our country or in this
matter any country at their respective borders. Many army men risk their precious life on
the borders of the country to help people have a peaceful night’s sleep without any worry.
Captain AMIGO, is an army robot whose main intention is to save the lives of all the
army men on the borders. It plays the role of a CAPTAIN that is leads from front by itself
going into the risk prone areas and detecting if there is any danger to the soldiers. Also
acts like a detective by taking the live footage of the enemies at the other side of the
border and delivers the same to official in charge so that they can see what is happening
and have a clear idea about it. This robot camouflages itself according to the surrounding
area so that it doesn’t become all the way more evident to the enemies about its existence.
With these been its key features it also has many other components like PIR sensor, Gas
sensor, Metal sensor to find out more about the enemies’ place and also checks if our
country’s army men will remain safe if they walk-in by the same path.

ii
ACKNOWLEDGEMENT

We express gratitude to our institution and management for providing us with good
infrastructure, laboratory, facilities and inspiring staff, and whose gratitude was of
immense help in completion of this project successfully.

We express our sincere gratitude to Dr. K.V. NARAYANA SWAMY, Principal, Atria
Institute of Technology, for providing us the required environment and for his valuable
suggestion.
Our sincere thanks to Dr. AISHWARYA P, Head of the Dept. Computer Science and
Engineering, Atria Institute of Technology, for her valuable support and for rendering
us resources for this project work.

We express our gratitude to Prof. Mrs Chandini U, Assistant Professor, Dept. of


Computer Science and Engineering, Atria Institute of Technology, who guided us with
valuable suggestions in completing this project at every stage.

Last but not the least, the project would not have been a success without the support of
our parents and friends. Our sincere thanks should be rendered to everyone who
helped us in all possible ways.

iii
TABLE OF CONTENTS
DECLARATION………………….………………………………………...…. i

ABSTRACT…………………………………………………………………....ii

ACKNOWLEGMENT …………...……………………………………………iii

CHAPTER I INTRODUCTION…………………………………….…........................1

1.1 Objective……………………...………………...……….……………………2
1.2 Motivation………………...…………………...……………………………...2
1.3 Problem Statement……………………………………………………………2
1.4 Scope of the Study……...………………………….........………....................2
CHAPTER II LITERATURE REVIEW.........................................…......[6-10]

CHAPTER III SYSTEM ANALYSIS…...………...11

3.1 Existing System…...……………………………………………....…….……11

3.2 Proposed System.………………………………………...………….............11

CHAPTER IV SYSTEM SPECIFICATION…………….…………….………. [12-17]

4.1 Hardware Requirements ……….………………….…………………………. [12-13]

4.2 Software Requirements…….………………………………………………… [13-14]

4.3 Software Description…………………………………………………………………15

CHAPTER V DESIGN AND IMPLEMENTATION………......................................[18-41]

5.1 System Design……………………………………………………………… [18-21]


5.2 Detailed Design …………………………………………………………… [22-24]

5.2.1 Module Design and Description………………………………………… [24-26]

5.2.2 Data Flow Diagram……………………………………………………... [26-27]

5.2.3 Use case diagram……………………………………………………….. [28-31]

5.3 Implementation……………………………………………………………. [31-33]


CHAPTER VI TESTING……………………………………………...
CHAPTER VII RESULTS AND SNAPSHOT …………………………………
…………. …………
CHAPTER VIII CONCLUSION AND FUTURE ENHANCEMENT
……

.
CHAPTER I
INTRODUCTION

Computer graphics is concerned with all aspects of producing images using a


computer. The field began humbly 50 years ago, with the display of few lines on a
cathode ray tube (CRT); now, we can create images by computer that are
indistinguishable from photographs of real objects.

In this chapter we discuss about the application of computer graphics, overview of the graphic
system, graphics architectures. In this project we discuss about OpenGL- open graphics library
API- which is used to develop the application program which is the matter in question.

APPLICATIONS OF COMPUTER GRAPHICS


The applications of computer graphics are many and varied. However, we can divide them into four
major areas:

• Display of Information

• Design

• Simulation and Animation

• User interfaces

Display of Information
Classical graphics techniques arose as a medium to convey information among people. Although
spoken and written languages serve this purpose, images are easier to communicate with and
hence the computer graphics plays an important role.

Information visualization is becoming increasingly important in the field of security, medicine


weather forecasting and mapping. Medical imaging like CT, MRI, ultrasound scan is produced
by medical imaging systems but are displayed by computer graphics system.

Design
Professions such as engineering and architecture are concerned with design which is an iterative
process. The power of the paradigm of humans interacting with the computer displays was
recognized by Ivan Sutherland.

1
Simulation and animation
Graphics system, now are capable of generating sophisticated images in real time. Hence
engineers and researchers use them as simulators. The most important use has been in the training
of pilots. User interfaces

User interaction with computers has become dominated by a visual paradigm that includes
windows, icons, menus and pointing devices. Applications such as office suites, web browsers are
accustomed to this style.

1.1 Objective:
In this project we are going to design a Helicopter game using Code Blocks. This project displays a
helicopter in flight with its fan and rotor stabilizer moving.
The basic idea of the game is to dodge the rectangles and the game ends when the helicopter touches
one of the rectangles.
The score is calculated based on the distance covered by the helicopter before the crash.

1.2 Motivation:
It is a technology demonstration intended to prove that a small, lightweight helicopter can
fly in the thin atmosphere. The helicopter won’t be controlled with joysticks or keyboards.
But in the future, could use remote controls to fly helicopters. Your game can use keys on
a keyboard to make the helicopter fly.

1.3 Problem Statement:


To design and implement a helicopter game using Code Blocks.

1.4 Scope of the Study:


It can be used for gaming and entertainment purpose. It can also be extended to the development of
android application.

CHAPTER II
LITERATURE REVIEW

People use the term “computer graphics” to mean different things in different context.
Computer graphics are pictures that are generated by a computer. Everywhere you look today,
you can find examples, especially in magazines and on television. Some images look so natural
you can’t distinguish them from photographs of a real scene. Others have an artificial look,
intended to achieve some visual effects.

There are several ways in which the graphics generated by the program can be delivered.

• Frame- by- frame: A single frame can be drawn while the user waits.
• Frame-by-frame under control of the user: A sequence of frames can be drawn, as in a
corporate power point presentation; the user presses to move on to the next slide, but
otherwise has no way of interacting with the slides
• Animation: A sequence of frames proceeds at a particular rate while the user watches with
delight.
• Interactive program: An interactive graphics presentation is watched, where the user controls
the flow from one frame to another using an input device such as a mouse or keyboard, in a
manner that was unpredictable at the time the program was written.
This can delight the eye.

A GRAPHICS SYSTEM

A computer graphics system is a computer system which has five major elements:

1. Input devices

2. Processor
3. Memory
4. Frame buffer
5. Output devices
This model is general enough to include workstations and personal computers, interactive game systems,
and sophisticated image-generating systems. Although all the components, with the exception of the frame
buffer, are present in standard computer, it is the way each element is specialized for computer graphics that
characteristics this diagram as a portrait of graphics system.

3
Fig 1.1: A Graphics System

GRAPHICS ARCHITECTURES
On one side of the API is the application program. On the other side is some combination of hardware and
software that implements the functionality of the API. There are various approaches to developing
architectures to support graphics API as discussed below.

Display

Processors

Display processors had a conventional architecture that relived the general-purpose computer from the task
of refreshing the screen. These display processors included instructions to display primitives on the display
like CRT. The main advantage of display processor was that the instructions to generate the image could be
assembled once in the host and sent to display processor where they were stored in display processor’s own
memory as display list. Then the display processor would execute these programs in

display list repetitively, at a rate sufficient to avoid flicker.

Fig 1.2: Display processor Architecture

4
Pipeline

Architecture

Pipeline architecture is the process of giving output of one process as the input to other. This architecture
is prominently used in modern days with the advancement of VLSI. In graphics system; we start with a set
of objects. Each object comprises a set of graphical primitives. Each primitive comprises a set of vertices.
We can think of the collection of primitive types and vertices as defining the geometry of the scene. Thus
the graphics pipeline has four major steps for processing the image:

1. Vertex processing

2. Clipping and primitive assembly

3. Rasterization

4. Fragment processing

Vertex

Processing

Vertex processing is the first step to be performed in the pipeline architecture. Vertex Processing mainly
involves the transformation of objects, transformation of the coordinate system and projection
transforming. It also involves color computation for each vertex.

Clipping and

Primitive Assembly

Clipping and Primitive Assembly is the second step in the pipeline architecture. The output of the vertex
processor is given as the input to this stage. This step is mainly involved in the clipping of the primitive;
Clipping is necessary since the camera film has a limited size and hence cannot image the whole world at
once. This stage computes the clipping volume and considers only those vertices that falls within this
volume for image formation. Those vertices that are outside this volume do not appear in the image and
are said to be clipped.

5
COMPUTER GRAPHICS LIBRARY ORGANISATION
OpenGL stands for Open Source Graphics Library. Graphics Library is a collection of APIs
(Application Programming Interfaces).

Graphics Library functions are divided in three libraries. They are as follows-

i. GL Library (OpenGL in Windows)


ii. GLU (OpenGL Utility Library
iii. GLUT (OpenGL Utility Toolkit)

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 pre-processor directives. E.g.:
#include<GL/glut.h>
• The following figure shows the library organization in OpenGL.

Fig 2.2 Library Organization

6
CHAPTER III
SYSTEM ANALYSIS

The primary goal of our model helicopter is to provide the user with a top view
of the territory without resorting to more expensive classical aerial
photogrammetry. The system is designed to collect data for mapping and land
monitoring purposes working on areas which represent a difficult task for
already existing ground-based mobile mapping systems.

3.1 Existing System:

It is the attempt to respond to or take advantage of a particular situation and is an


essential element for correctly launching the system analysis. Although there are
no hard and fast rules as to the form and content of the project proposal, the
proposal should address the following points:

 The specifics of the business situation or problem.


 The significance of the problem to the organization.
 Alternative solutions.
 The possible use of computer information systems to solve the problem.
 The various people interested in or possessing knowledge relevant to the
problem.

3.2 Proposed System:


Proposed System means all components, including hardware and software, that
are included in the Respondent's proposal. ... The Proposed System should
include Document Management, Workflow, a Rules Engine, and Customer
Relationship Management functionality.

Proposed System In this paper, minimizing both under provisioning and over
provisioning problems under the demand and price uncertainty in cloud
computing environments is our mo.- tivation to explore a resource provisioning
strategy for cloud.

7
CHAPTER IV
SYSTEM SPECIFICATION
Requirements analysis is critical for project development. Requirements must be
documented, actionable, measurable, testable and defined to a level of detail
sufficient for system design. Requirements can be architectural, structural,
behavioural, functional, and non-functional. A software requirements
specification (SRS) is a comprehensive description of the intended purpose and
the environment for software under development.

4.1 Hardware Requirements:

• Minimum of 2GB of main memory


• Minimum of 3GB of storage
• Keyboard
• Mouse
• Display Unit
Dual-Core or AMD with minimum of 1.5GHz speed

4.2 Software Requirements:

• Windows – XP/7/8
• Microsoft Visual Studio C/C++ 7.0 and above versions
• OpenGL Files
• DirectX 8.0 and above versions
Header Files

8
• glut.h
Object File Libraries
• glut32.lib
DLL files
• glut32.dll

4.3 Software Description:

Geometric primitives are specified in the problem domain and include points,
line segments, polygons, curves and surfaces. The geometric primitives exist in
two- and three- dimensional space and hence they can be manipulated by
operations such as rotation and translation.

Raster primitives are used to convert geometric primitives into pixels. Raster
primitives, such as array of pixels, lack geometric properties and cannot be
manipulated in the same way as geometric primitives.

The basic OpenGL primitives are specified by sets of vertices. Thus the
programmer can define the objects in the following form:

glBegin(GLenum mode);

glVertex*(. . .);

9
CHAPTER V
DESIGN AND IMPLEMENTATION

HEADER FILES USED


 STDIO.H : Input and Output operations can also be performed in C++.Using the C standard input
and output Library.
 STDLIB.H : The stdlib.h header includes many memory management functions such as malloc,
calloc, free which are used to allocate or de-allocate bytes of memory.
 GLUT.H : The glut.h is a readily available library called the OpenGL
 Utility Toolkit which provides a simple interface between the System.

Parameters
Red, green, blue Specify new red, green, and blue values for the current color. Description

glColor3 variants specify new red, green, and blue values explicitly, and set the current alpha value to
1.0 implicitly.Current color values are stored in floating-point format, with unspecified mantissa and
exponent sizes. Unsigned integer color components, when specified, are linearly mapped to floating-
point values such that the largest representable value maps to 1.0 (full intensity), and zero maps to 0.0
(zero intensity). Signed integer color components, when specified, are linearly mapped to floating-point
values such that t h e m o s t positive represent able value maps to 1.0, and the most negative represent
able value maps to -1.0.Floating-point values are mapped directly.

Neither floating-point nor signed integer values are clamped to the range [0,1] before updating the current
color. However, color components are clamped to this range before they are interpolated or written into a
color buffer.

glClearColor glClearColor - specify clear values for the color buffers. C Specification void

glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) Parameters

red, green, blue, alpha Specify the red, green, blue, and alpha values used when the color buffers

are cleared. The default values are all zero. Description glClearColor specifies the red, green, blue, and

are

10
values used by glClear to clear the color buffers. Values specified by glClearColor are clamped to the

range [0,1]. glClear glClear - clear buffers to present values.

Description
The GL maintains a 3D position in window coordinates. This position, called the raster position, is used to
position pixel and bitmap write operations. It is maintained with subpixel accuracy The current raster
position consists of three window coordinates (x, y, z), a clip coordinate value (w), an eye coordinate
distance, a valid bit, and associated color data and texture coordinates. The w coordinate is a clip
coordinate, because w is not projected to window coordinates. glRasterPos4 specifies object coordinates
x, y, z, and w explicitly. glRasterPos3 specifies object coordinate x, y, and zexplicitly, while w is
implicitly set to 1. glRasterPos2 uses the argument values for x and y while implicitly setting z and w to 0
and 1. The current raster position also includes some associated color data and texture coordinates. If
lighting is enabled, then GL_CURRENT_RASTER_COLOR (inRGBAmode) or
GL_CURRENT_RASTER_INDEX (in color index mode) is set to the color produced by the lighting
calculation (see glLight, glLightModel, and glShadeModel). If lighting is disabled, current color (in
RGBA mode, state variable GL_CURRENT_COLOR) or color index (in color index mode, state variable
GL_CURRENT_INDEX) is used to update the current raster color.
GL_CURRENT_RASTER_SECONDARY_COLOR (in RGBA mode) is likewise updated.

USER DEFINED FUNCTIONS


We are using the GLUT toolkit in this program and hence the main function consist of calls to GLUT
functions to set up our window and display properties. The main has a display callback function and for
interaction it has mouse and keyboard call-back functions. The init() is used to set up user options
through OpenGL functions on GL and GLU libraries.The main function for this program is as follows:

Main Function:

void main (int argc,char **argv)

It contains calls to various functions to perform different operations. Before a programmer can open a
window, he/she must specify its characteristics: Should it be single-buffered or double-buffered? Should
it store colors as RGBA values or as color indices? Where should it appear on your display? To specify
the answers to these questions, call glutInit(), glutInitDisplayMode(), glutInitWindowSize(), and
glutInitWindowPosition() before you call glutCreateWindow() to open the window.

11
void glutInit(int argc, char **argv); glutInit() should be called before any other GLUT routine, because
it initializes the GLUT library. glutInit() will also process command line options, but the specific options
are window system dependent. For the X Window System, -iconic, -geometry, and -display are examples
of command line options, processed by glutInit(). (The parameters to the glutInit() should be the same as
those to main().) void glutInitDisplayMode(unsigned int mode);

Specifies a display mode (such as RGBA or color-index, or single- or double-buffered) for windows
created when glutCreateWindow() is called. You can also specify that the window have an associated
depth, stencil, and/or accumulation buffer. The mask argument is a bitwise ORed combination of
GLUT_RGBA or GLUT_INDEX, GLUT_SINGLE or GLUT_DOUBLE, and any of the buffer-enabling
flags: GLUT_DEPTH, GLUT_STENCIL, or GLUT_ACCUM. For example, for a double-buffered,
RGBA-mode window with a depth and stencil buffer, use GLUT_DOUBLE | GLUT_RGBA |
GLUT_DEPTH | GLUT_STENCIL. The default value is GLUT_RGBA | GLUT_SINGLE (an RGBA,
single-buffered window). void glutInitWindowSize(int width, int height); void
glutInitWindowPosition(int x, int y);

Requests windows created by glutCreateWindow() to have an initial size and position. The arguments (x,
y) indicate the location of a corner of the window, relative to the entire display. The width and height
indicate the window's size (in pixels). The initial window size and position are hints and may be
overridden by other requests.int glutCreateWindow(char *name);

Opens a window with previously set characteristics (display mode, width, height, and so on). The string
name may appear in the title bar if your window system does that sort of thing. The window is not
initially displayed until glutMainLoop() is entered, so do not render into the window until then. The
value returned is a unique integer identifier for the window. This identifier can be used for controlling
and rendering to multiple windows (each with an OpenGL rendering context) from the same application.

Display Function:

void display()

This function is used to call various functions that draw different objects to be displayed at the location
depending upon where the function call to the particular function is made and messages to be displayed.
It also has functions to set the color and also has function that forces the content of the frame buffer onto
the display (glFlush( )).

Msg Function:

void msg(char *string)

12
string is the variable which collects the string that is to be displayed which is sent as a parameter in the
function call. It uses the GLUT_BITMAP_TIMES_ROMAN_24 font to display the message.

Rectangle Function: void rectangle (int b) void rectangle1(int d) void rectangle2(int d)

These functions are responsible for drawing rectangles at various positions. The values b and d are
responsible for deciding the exact position of the rectangles.

Reset function: void reset ()

Used to reset the values of all the variables to default values.

Limit function:

void limit ()

This function is used to calculate the score.

Helicopter Function:

void helicopter(int x, int y) x and y represents the x and

y co ordinates respectively.

This function is used to draw the helicopter at the specified position. This function contains code to draw
various parts of the helicopter such as black line, head, big wing, small wing, foot, foot line.

Crashed Helicopter Function: void crashed_helicopter(int x, int y) x and y represents the co-ordinates
of the crashed helicopter.

This function is used to draw various parts of the crashed helicopter on the game over screen once the
helicopter has touched the rectangle and the game is over.

Init Function: void init(void)

This function is used to set up the window.

13
And finally for interaction- to play the game according to a player input- we have mouse and keyboard
events.

Up and Down Bar Functions:

void down_bar() void up_bar()

Used to display the Up and down green color bars present on the screen.

Mouse function:

void mouse(int btn,int state,int x,int y)

glutMouseFunc sets the mouse callback for the current window. When a user presses and releases mouse
buttons in the window, each press and each release generates a mouse callback.

The button parameter is one of GLUT_LEFT_BUTTON, GLUT_MIDDLE_BUTTON, or


GLUT_RIGHT_BUTTON. For systems with only two mouse buttons, it may not be possible to generate
GLUT_MIDDLE_BUTTON callback. For systems with a single mouse button, it may be possible to
generate only a GLUT_LEFT_BUTTON callback. The state parameter is either GLUT_UP or
GLUT_DOWN indicating whether the callback was due to a release or press respectively. The x and y
callback parameters indicate the window relative coordinates when the mouse button state changed. If a
GLUT_DOWN callback for a specific button is triggered, the program can assume a GLUT_UPcallback
for the same button will be generated (assuming the window still has a mouse callback registered) when
the mouse button is released even if the mouse has moved outside the window.

If the left mouse button is pressed the helicopter moves upwards and if the right mouse button is pressed
the helicopter moves downwards.

Keyboard function:

void mykeyboard(unsigned char key, int x, int y)

glutKeyboardFunc sets the keyboard callback for the current window. When a user types into the
window, each key press generating an ASCII character will generate a keyboard callback. The key
callback parameter is the generated ASCII character. The state of modifier keys such as Shift cannot be
determined directly; their only effect will be on the returned ASCII data. The x and y callback
parameters indicate the mouse location in window relative coordinates when the key was pressed.

When a new window is created, no keyboard callback is initially registered, and ASCII key strokes in the
window are ignored. Passing NULL to glutKeyboardFunc disables the generation of keyboard callbacks.

14
In this the input interaction happens through keyboard. Pressing Enter starts the game and pressing the
key 8 causes the helicopter to move upwards and pressing the key 2 causes the helicopter to move
downwards. Once the game is over we can restart the game by pressing the key c or exit the game by
pressing the Esc key.

5.2.1 Module Design and Description:

5.2.2 DATA FLOW DIAGRAM:

Fig 4.1: Data Flow Diagram

15

5.2.3 Use case diagram:


5.3 Implementation:
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.

16
6) Control Functions: Control 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.
17

You might also like