SlideShare a Scribd company logo
Page | 1
DYNAMIC SORTING ALGORITHM VISUALIZER USING OPENGL
A Mini Project Report Submitted by
Agnesh Shetty
4NM19CS011
Aditya A Sooda
4NM19CS008
UNDER THE GUIDANCE OF
MR.PUNEETH RP
ASSISTANT PROFESSOR GD-11
Department of Computer Science and Engineering
in partial fulfilment of the requirements for the award of the
Degree of
Bachelor of Engineering in
Computer Science & Engineering
from
Visvesvaraya Technological University,
Belagavi
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
N.M.A.M. INSTITUTE OF TECHNOLOGY
(An Autonomous Institution under VTU, Belagavi) (AICTE approved, NBA Accredited, ISO
9001:2008 Certified) NITTE -574 110, Udupi District, KARNATAKA.
(ISO 9001:2015 Certified), Accredited with ‘A’ Grade by NAAC
Page | 2
TABLE OF CONTENTS :
1. ABSTRACT AND INTRODUCTION 3-4
2. IMPLEMENTATION 4
3. SYSTEM REQUIREMENT AND SPECIFICATION 4-5
4. SCREENSHOTS 6-10
5. CONCLUSION AND FUTURE WORK 10
8. REFERENCES 11
Page | 3
ABSTRACT AND INTRODUCTION
OpenGL was originally developed by Silicon Graphics, Inc. (SGI) as a multi-
purpose, platform-independent graphics API. Since 1992, the development of
OpenGL has been overseen by the OpenGL Architecture Review Board (ARB),
which is made up of major graphics vendors and other industry leaders, currently
consisting of 3DLabs, ATI, Dell, Evans & Sutherland, Hewlett-Packard, IBM,
Intel, Matrox, NVIDIA, SGI, Sun Microsystems, and Silicon Graphics. The Role
of ARB is to establish and maintain the DYNAMIC SORTING ALGORITHM
VISUALIZER OpenGL specifications, which dictates which features must be
included when one is developing an OpenGL distribution. OpenGL is the premier
environment for developing portable, interactive 2D and 3D graphics
applications.
OpenGL intentionally provides only low-level rendering routines, allowing the
programmer a great deal of control and flexibility. The provided routines can
easily be used to build high-level rendering and modeling libraries, and in fact,
the OpenGL Utility Library(GLU), which is included in most OpenGL
distributions, does exactly that. Note that OpenGL is just a graphics library;
Unlike DirectX, it does not include support for sound, input, networking, or
anything else not directly related to graphics.
OpenGL is a collection of several hundred functions providing access to all of
the features offered by our graphics hardware. Internally, it acts as a state
machine –a collection of states that tell OpenGL what to do and that are
changed in a very well-defined manner. Using API, we can set various aspects
of the state machine, including such things as the current color, lighting, blending
Page | 4
et al. When rendering, everything drawn is affected by the current settings of the
state machine. At the core of OpenGL is the rendering pipeline. There are many
libraries available that build upon and around OpenGL to add support and
functionality beyond the low-level rendering support that it excels at. Most
important amongst them are GLU, GLUT and SDL.GLU uses only GL functions
but contains code for creating common objects and simplifying viewing. GLUT
provides support for any form of functionality related to windowing, menus or
input. SDL stands for Simple Direct Media Layer is a cross-platform multimedia
library, including support for audio, input, 2D graphics
Page | 5
IMPLEMENTATION
4.3 Functions Used :
4.3.1 void initialise (void)
In this function the swapping flag along with global variables that hold
values of X coordinates during swapping are initialized to zero. It also initializes
the array of circles that is obtained from the randomly generated sequence and
place them at equal intervals
4.3.2 void int_str( int rad,char r[] )
This function does the conversion of integer value to string value, so that it
can be passed as parameter to the bitmap output function. It takes rad as the
parameter which is the target number that needs conversion from integer to
string value.
4.3.3 void circle_draw(circle c)
This function draws the circle as per the passed circle structure variable,
which consists of the circle center coordinates along with the radius.
4.3.5 void swap_circles(circle *cc1,circle *cc2)
This function basically swaps the two key circles. Initially the X coordinates
of the two circles are assigned to the 2 global variables and swapping flag is
made TRUE.As long as the first global variable is less than or equal to second
circle X coordinate, decrement the second circle X coordinate by 1 unit.
Page | 6
4.3.6 void keyboard (unsigned char key, int x, int y)
This function just checks whether the input character is s or r or 27. Based
on the input if it is 27, exit(0) function is called, else if it is ‘s’ then sorting flag is
initialized to 1 else if ‘r’ then intialise() function is called.
4.3.7 void reshape(int w, int h)
This function is used to reshape the windowwith the new width and height
which is passed as parameters. This function is triggered whenever the
current window is reshape.
Page | 7
HARDWARE / SOFTWARE REQUIREMENTS
HARDWARE SPECIFICATION:
➢ Processor: Pentium-3 or Higher
➢ RAM: 64MB or Higher
➢ Hard Disk: 80GB or Higher
SOFTWARE SPECIFICATION:
➢ Windows , 64 bits (PC or Mac computers using Boot Camp)
➢ Any CPU (Intel i5/ i7/ Ryzen 7).
➢ Any GPU that is compatible with OpenGL 3.2. (integrated graphics cards
Intel HD 4000 or above).
➢ For Small projects 4 GB RAM, 10 GB HDD Free Space
➢ For Large projects 16 GB RAM, 40 GB HDD Free Space.
Page | 8
SCREENSHOTS OF THE PROJECT
Page | 9
Page | 10
Page | 11
CONCLUSION :
The development of mini project has given us a good exposure to openGL by
which we have learnt some of the techniques which helps in the development
of animation and gaming. Hence it is helpful for us to even take this field as our
career too and develop some other features in openGL and provide as token of
contribution to the graphics world
FUTURE SCOPE :
This project has been designed using C++, which works on the windows
platform. The project can be designed using other languages and better
graphical interfaces. The following features could have been incorporated.
• Circular and priority queues can be implemented.
• Different shading effects can be added.
• We can give transparency and fogging to the objects.
Page | 12
REFERENCES
1. Stack Overflow for some of errors:
https://stackoverflow.com
2. Glut Installation:
https://www.opengl.org/resources/libraries/glut/glut_downloads.php
3. Setting up Glut Environment:
https://www.youtube.com/watch?v=8p76pJsUP44
4. Stack and Queue operations:
https://www.geeksforgeeks.org/
5. Mingw setup:
https://sourceforge.net/projects/mingw

More Related Content

Similar to Dynamic sorting algorithm vizualizer.pdf (20)

PDF
Airplane game management system project report .pdf
Kamal Acharya
 
PDF
AN INTERNSHIP REPORT ON AIRPLANE GAME MANAGEMENT SYSTEM PROJECT REPORT.
Kamal Acharya
 
PDF
Bouncing ball content management system project report.pdf
Kamal Acharya
 
PDF
main.pdf java programming practice for programs
RavinderKSingla
 
PPT
Opengl (1)
ch samaram
 
PPT
openGL basics for sample program (1).ppt
HIMANKMISHRA2
 
PPT
openGL basics for sample program.ppt
HIMANKMISHRA2
 
PPT
Open gl
ch samaram
 
PPT
Hill ch2ed3
Kunal Verma
 
PDF
CG mini project
Mohammed Dawood
 
PPTX
Computer Graphics with OpenGL presentation Slides.pptx
AnandM62785
 
PPTX
3 CG_U1_P2_PPT_3 OpenGL.pptx
ssuser255bf1
 
PDF
CG3_ch3+ch4computergraphicsbreesenhan.pdf
VikramBhathal
 
PPT
Introduction to OpenGL.ppt
16118MdFirozAhmed
 
DOC
Data structures graphics library in computer graphics.
Daroko blog(www.professionalbloggertricks.com)
 
PPT
01.Opengl_intro-2.ppt
EngrZamaan
 
PDF
Computer Graphics Project Report on Sinking Ship using OpenGL
Sharath Raj
 
PDF
18csl67 vtu lab manual
NatsuDragoneel5
 
PDF
Angel
Chong Zhang
 
PPT
september11.ppt
CharlesMatu2
 
Airplane game management system project report .pdf
Kamal Acharya
 
AN INTERNSHIP REPORT ON AIRPLANE GAME MANAGEMENT SYSTEM PROJECT REPORT.
Kamal Acharya
 
Bouncing ball content management system project report.pdf
Kamal Acharya
 
main.pdf java programming practice for programs
RavinderKSingla
 
Opengl (1)
ch samaram
 
openGL basics for sample program (1).ppt
HIMANKMISHRA2
 
openGL basics for sample program.ppt
HIMANKMISHRA2
 
Open gl
ch samaram
 
Hill ch2ed3
Kunal Verma
 
CG mini project
Mohammed Dawood
 
Computer Graphics with OpenGL presentation Slides.pptx
AnandM62785
 
3 CG_U1_P2_PPT_3 OpenGL.pptx
ssuser255bf1
 
CG3_ch3+ch4computergraphicsbreesenhan.pdf
VikramBhathal
 
Introduction to OpenGL.ppt
16118MdFirozAhmed
 
Data structures graphics library in computer graphics.
Daroko blog(www.professionalbloggertricks.com)
 
01.Opengl_intro-2.ppt
EngrZamaan
 
Computer Graphics Project Report on Sinking Ship using OpenGL
Sharath Raj
 
18csl67 vtu lab manual
NatsuDragoneel5
 
september11.ppt
CharlesMatu2
 

Recently uploaded (20)

PPTX
Data_Analytics_Presentation_By_Malik_Azanish_Asghar.pptx
azanishmalik1
 
PDF
th International conference on Big Data, Machine learning and Applications (B...
Zac Darcy
 
PPTX
UNIT III CONTROL OF PARTICULATE CONTAMINANTS
sundharamm
 
PDF
MOBILE AND WEB BASED REMOTE BUSINESS MONITORING SYSTEM
ijait
 
PDF
A NEW FAMILY OF OPTICALLY CONTROLLED LOGIC GATES USING NAPHTHOPYRAN MOLECULE
ijoejnl
 
PDF
SMART HOME AUTOMATION PPT BY - SHRESTH SUDHIR KOKNE
SHRESTHKOKNE
 
PDF
BEE331-Week 04-SU25.pdf semiconductors UW
faemoxley
 
PDF
IEEE EMBC 2025 「Improving electrolaryngeal speech enhancement via a represent...
NU_I_TODALAB
 
PPTX
00-ClimateChangeImpactCIAProcess_PPTon23.12.2024-ByDr.VijayanGurumurthyIyer1....
praz3
 
PPTX
Abstract Data Types (ADTs) in Data Structures
mwaslam2303
 
PPTX
GitHub_Copilot_Basics...........................pptx
ssusera13041
 
PDF
Geothermal Heat Pump ppt-SHRESTH S KOKNE
SHRESTHKOKNE
 
PDF
Water Design_Manual_2005. KENYA FOR WASTER SUPPLY AND SEWERAGE
DancanNgutuku
 
PDF
Book.pdf01_Intro.ppt algorithm for preperation stu used
archu26
 
PPT
Oxygen Co2 Transport in the Lungs(Exchange og gases)
SUNDERLINSHIBUD
 
PDF
Comparative Analysis of the Use of Iron Ore Concentrate with Different Binder...
msejjournal
 
PPTX
waterconservation-211128055737.pptx Jaswanth
SandulaAnilBabu
 
PDF
13th International Conference of Networks and Communications (NC 2025)
JohannesPaulides
 
PPTX
Dolphin_Conservation_AI_txhasvssbxbanvgdghng
jeeaspirant2026fr
 
PDF
Lecture Information Theory and CodingPart-1.pdf
msc9219
 
Data_Analytics_Presentation_By_Malik_Azanish_Asghar.pptx
azanishmalik1
 
th International conference on Big Data, Machine learning and Applications (B...
Zac Darcy
 
UNIT III CONTROL OF PARTICULATE CONTAMINANTS
sundharamm
 
MOBILE AND WEB BASED REMOTE BUSINESS MONITORING SYSTEM
ijait
 
A NEW FAMILY OF OPTICALLY CONTROLLED LOGIC GATES USING NAPHTHOPYRAN MOLECULE
ijoejnl
 
SMART HOME AUTOMATION PPT BY - SHRESTH SUDHIR KOKNE
SHRESTHKOKNE
 
BEE331-Week 04-SU25.pdf semiconductors UW
faemoxley
 
IEEE EMBC 2025 「Improving electrolaryngeal speech enhancement via a represent...
NU_I_TODALAB
 
00-ClimateChangeImpactCIAProcess_PPTon23.12.2024-ByDr.VijayanGurumurthyIyer1....
praz3
 
Abstract Data Types (ADTs) in Data Structures
mwaslam2303
 
GitHub_Copilot_Basics...........................pptx
ssusera13041
 
Geothermal Heat Pump ppt-SHRESTH S KOKNE
SHRESTHKOKNE
 
Water Design_Manual_2005. KENYA FOR WASTER SUPPLY AND SEWERAGE
DancanNgutuku
 
Book.pdf01_Intro.ppt algorithm for preperation stu used
archu26
 
Oxygen Co2 Transport in the Lungs(Exchange og gases)
SUNDERLINSHIBUD
 
Comparative Analysis of the Use of Iron Ore Concentrate with Different Binder...
msejjournal
 
waterconservation-211128055737.pptx Jaswanth
SandulaAnilBabu
 
13th International Conference of Networks and Communications (NC 2025)
JohannesPaulides
 
Dolphin_Conservation_AI_txhasvssbxbanvgdghng
jeeaspirant2026fr
 
Lecture Information Theory and CodingPart-1.pdf
msc9219
 
Ad

Dynamic sorting algorithm vizualizer.pdf

  • 1. Page | 1 DYNAMIC SORTING ALGORITHM VISUALIZER USING OPENGL A Mini Project Report Submitted by Agnesh Shetty 4NM19CS011 Aditya A Sooda 4NM19CS008 UNDER THE GUIDANCE OF MR.PUNEETH RP ASSISTANT PROFESSOR GD-11 Department of Computer Science and Engineering in partial fulfilment of the requirements for the award of the Degree of Bachelor of Engineering in Computer Science & Engineering from Visvesvaraya Technological University, Belagavi DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING N.M.A.M. INSTITUTE OF TECHNOLOGY (An Autonomous Institution under VTU, Belagavi) (AICTE approved, NBA Accredited, ISO 9001:2008 Certified) NITTE -574 110, Udupi District, KARNATAKA. (ISO 9001:2015 Certified), Accredited with ‘A’ Grade by NAAC
  • 2. Page | 2 TABLE OF CONTENTS : 1. ABSTRACT AND INTRODUCTION 3-4 2. IMPLEMENTATION 4 3. SYSTEM REQUIREMENT AND SPECIFICATION 4-5 4. SCREENSHOTS 6-10 5. CONCLUSION AND FUTURE WORK 10 8. REFERENCES 11
  • 3. Page | 3 ABSTRACT AND INTRODUCTION OpenGL was originally developed by Silicon Graphics, Inc. (SGI) as a multi- purpose, platform-independent graphics API. Since 1992, the development of OpenGL has been overseen by the OpenGL Architecture Review Board (ARB), which is made up of major graphics vendors and other industry leaders, currently consisting of 3DLabs, ATI, Dell, Evans & Sutherland, Hewlett-Packard, IBM, Intel, Matrox, NVIDIA, SGI, Sun Microsystems, and Silicon Graphics. The Role of ARB is to establish and maintain the DYNAMIC SORTING ALGORITHM VISUALIZER OpenGL specifications, which dictates which features must be included when one is developing an OpenGL distribution. OpenGL is the premier environment for developing portable, interactive 2D and 3D graphics applications. OpenGL intentionally provides only low-level rendering routines, allowing the programmer a great deal of control and flexibility. The provided routines can easily be used to build high-level rendering and modeling libraries, and in fact, the OpenGL Utility Library(GLU), which is included in most OpenGL distributions, does exactly that. Note that OpenGL is just a graphics library; Unlike DirectX, it does not include support for sound, input, networking, or anything else not directly related to graphics. OpenGL is a collection of several hundred functions providing access to all of the features offered by our graphics hardware. Internally, it acts as a state machine –a collection of states that tell OpenGL what to do and that are changed in a very well-defined manner. Using API, we can set various aspects of the state machine, including such things as the current color, lighting, blending
  • 4. Page | 4 et al. When rendering, everything drawn is affected by the current settings of the state machine. At the core of OpenGL is the rendering pipeline. There are many libraries available that build upon and around OpenGL to add support and functionality beyond the low-level rendering support that it excels at. Most important amongst them are GLU, GLUT and SDL.GLU uses only GL functions but contains code for creating common objects and simplifying viewing. GLUT provides support for any form of functionality related to windowing, menus or input. SDL stands for Simple Direct Media Layer is a cross-platform multimedia library, including support for audio, input, 2D graphics
  • 5. Page | 5 IMPLEMENTATION 4.3 Functions Used : 4.3.1 void initialise (void) In this function the swapping flag along with global variables that hold values of X coordinates during swapping are initialized to zero. It also initializes the array of circles that is obtained from the randomly generated sequence and place them at equal intervals 4.3.2 void int_str( int rad,char r[] ) This function does the conversion of integer value to string value, so that it can be passed as parameter to the bitmap output function. It takes rad as the parameter which is the target number that needs conversion from integer to string value. 4.3.3 void circle_draw(circle c) This function draws the circle as per the passed circle structure variable, which consists of the circle center coordinates along with the radius. 4.3.5 void swap_circles(circle *cc1,circle *cc2) This function basically swaps the two key circles. Initially the X coordinates of the two circles are assigned to the 2 global variables and swapping flag is made TRUE.As long as the first global variable is less than or equal to second circle X coordinate, decrement the second circle X coordinate by 1 unit.
  • 6. Page | 6 4.3.6 void keyboard (unsigned char key, int x, int y) This function just checks whether the input character is s or r or 27. Based on the input if it is 27, exit(0) function is called, else if it is ‘s’ then sorting flag is initialized to 1 else if ‘r’ then intialise() function is called. 4.3.7 void reshape(int w, int h) This function is used to reshape the windowwith the new width and height which is passed as parameters. This function is triggered whenever the current window is reshape.
  • 7. Page | 7 HARDWARE / SOFTWARE REQUIREMENTS HARDWARE SPECIFICATION: ➢ Processor: Pentium-3 or Higher ➢ RAM: 64MB or Higher ➢ Hard Disk: 80GB or Higher SOFTWARE SPECIFICATION: ➢ Windows , 64 bits (PC or Mac computers using Boot Camp) ➢ Any CPU (Intel i5/ i7/ Ryzen 7). ➢ Any GPU that is compatible with OpenGL 3.2. (integrated graphics cards Intel HD 4000 or above). ➢ For Small projects 4 GB RAM, 10 GB HDD Free Space ➢ For Large projects 16 GB RAM, 40 GB HDD Free Space.
  • 8. Page | 8 SCREENSHOTS OF THE PROJECT
  • 11. Page | 11 CONCLUSION : The development of mini project has given us a good exposure to openGL by which we have learnt some of the techniques which helps in the development of animation and gaming. Hence it is helpful for us to even take this field as our career too and develop some other features in openGL and provide as token of contribution to the graphics world FUTURE SCOPE : This project has been designed using C++, which works on the windows platform. The project can be designed using other languages and better graphical interfaces. The following features could have been incorporated. • Circular and priority queues can be implemented. • Different shading effects can be added. • We can give transparency and fogging to the objects.
  • 12. Page | 12 REFERENCES 1. Stack Overflow for some of errors: https://stackoverflow.com 2. Glut Installation: https://www.opengl.org/resources/libraries/glut/glut_downloads.php 3. Setting up Glut Environment: https://www.youtube.com/watch?v=8p76pJsUP44 4. Stack and Queue operations: https://www.geeksforgeeks.org/ 5. Mingw setup: https://sourceforge.net/projects/mingw