SlideShare a Scribd company logo
1 of 11
Assignment
Drawing of Niger National Flag in C++ by using OpenGL
Submitted by
Name : SH Rajøn
Batch : 1410
Student of Department of Computer Science and Engineering 0f IUBAT
IUBAT- International University of Business Agriculture and Technology
Date : 18th March,2020
Figure: Niger National Flag
In this flag there are fourth primitives are used.
Assignment’s Description:
This Computer Graphics Assignments as mentioned above draw Flag of Niger.
As we can see in the Assignments output image above. In this Assignment, there is
no user interaction as well as the Assignment is static one. A basic OpenGL
program has included header files, global variable declaration, draw function, init
function and main function. This program has only these basic functions, since it
not required having anything else. Just draw the primitives to give a propershape
of flag.
First Primitives (1stQuad):
Here is the graph for first primitive of that flag
Codefor this primitive:
glColor3f(0.698, 0.133, 0.133);
glBegin(GL_QUADS);
glVertex2d(30.0,15.0);
glVertex2d(30.0,5.0);
glVertex2d(-30.0,5.0);
glVertex2d(-30.0,15.0);
glEnd();
glFlush();
SecondPrimitive (2nd Quad):
Here is the graph for Second primitive of the flag
Codefor this primitive:
glColor3f(1.000, 0.843, 0.000);
glBegin(GL_QUADS);
glVertex2d(30.0,5.0);
glVertex2d(30.0,-5.0);
glVertex2d(-30.0,-5.0);
glVertex2d(-30.0,5.0);
glEnd();
glFlush();
Third Primitive (3rd
Quad):
Here is the graph for Third primitive of the flag
Codefor this primitive:
glColor3f((-30.0,5.0);
glBegin(GL_QUADS);
glVertex2d(30.0,-5.0);
glVertex2d(30.0,-15.0);
glVertex2d(-30.0,-15.0);
glVertex2d(-30.0,-5.0);
glEnd();
glFlush();
Fourth Primitive (Circle):
Here is the graph for fourth primitive of the flag
Codefor this primitive:
glPushMatrix();
glColor3f(255,140,0);
glScalef(1.9,1.5,1.5);
glutSolidSphere(3,50.5,2);
glPopMatrix();
glEnd();
glFlush();
}
Code:
//Name : SH Rajøn
//ID : 1410
//Assignment No : 1
//Assignment Name : Flag of Niger
#include<windows.h>
#include<GL/glut.h>
void flag()
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(255,140,0);
glBegin(GL_QUADS);
glVertex2d(30.0,15.0);
glVertex2d(30.0,5.0);
glVertex2d(-30.0,5.0);
glVertex2d(-30.0,15.0);
glEnd();
glFlush();
glColor3f(255,255,255);
glBegin(GL_QUADS);
glVertex2d(30.0,5.0);
glVertex2d(30.0,-5.0);
glVertex2d(-30.0,-5.0);
glVertex2d(-30.0,5.0);
glEnd();
glFlush();
glColor3f(0,100,0);
glBegin(GL_QUADS);
glVertex2d(30.0,-5.0);
glVertex2d(30.0,-15.0);
glVertex2d(-30.0,-15.0);
glVertex2d(-30.0,-5.0);
glEnd();
glFlush();
glPushMatrix();
glColor3f(255,140,0);
glScalef(1.6,1.5,1.5);
glutSolidSphere(3,50.5,10);
glPopMatrix();
glEnd();
glFlush();
}
void Initialize()
{
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glClearColor(.96,0.87,0.70,0.0);
glOrtho(-40, 40, -20, 20, -20, 20);
}
int main(int Argc, char** Argv)
{
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(1170,620);
glutInitWindowPosition(50,50);
glutCreateWindow("SH Rajøn");
Initialize();
glutDisplayFunc(flag);
glutMainLoop();
return 0;
}
Niger National Flag

More Related Content

What's hot

Ear recognition system
Ear recognition systemEar recognition system
Ear recognition system
Piyush Mittal
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Opersys inc.
 

What's hot (20)

08 android multimedia_framework_overview
08 android multimedia_framework_overview08 android multimedia_framework_overview
08 android multimedia_framework_overview
 
BIOMETRIC SECURITY SYSTEM
BIOMETRIC SECURITY SYSTEMBIOMETRIC SECURITY SYSTEM
BIOMETRIC SECURITY SYSTEM
 
Steganography
SteganographySteganography
Steganography
 
AGDK tutorial step by step
AGDK tutorial step by stepAGDK tutorial step by step
AGDK tutorial step by step
 
Information hiding
Information hidingInformation hiding
Information hiding
 
Survey on Deep Neural Network Watermarking techniques
Survey on Deep Neural Network Watermarking techniquesSurvey on Deep Neural Network Watermarking techniques
Survey on Deep Neural Network Watermarking techniques
 
LAS16-406: Android Widevine on OP-TEE
LAS16-406: Android Widevine on OP-TEELAS16-406: Android Widevine on OP-TEE
LAS16-406: Android Widevine on OP-TEE
 
Solution challenge ppt 2022
Solution challenge ppt 2022Solution challenge ppt 2022
Solution challenge ppt 2022
 
Lesson 1 - Introduction to Programming .pdf
Lesson 1 - Introduction to Programming .pdfLesson 1 - Introduction to Programming .pdf
Lesson 1 - Introduction to Programming .pdf
 
Face Detection
Face DetectionFace Detection
Face Detection
 
Ear recognition system
Ear recognition systemEar recognition system
Ear recognition system
 
Visual programming lecture
Visual programming lecture Visual programming lecture
Visual programming lecture
 
Face detection
Face detectionFace detection
Face detection
 
Elgamal &amp; schnorr digital signature scheme copy
Elgamal &amp; schnorr digital signature scheme   copyElgamal &amp; schnorr digital signature scheme   copy
Elgamal &amp; schnorr digital signature scheme copy
 
CHF Lesson 2 - Software and Software Categories.pdf
CHF Lesson 2 - Software and Software Categories.pdfCHF Lesson 2 - Software and Software Categories.pdf
CHF Lesson 2 - Software and Software Categories.pdf
 
color detection using open cv
color detection using open cvcolor detection using open cv
color detection using open cv
 
Steganography presentation
Steganography presentationSteganography presentation
Steganography presentation
 
Container based android
Container based androidContainer based android
Container based android
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
 
Face detection ppt
Face detection pptFace detection ppt
Face detection ppt
 

Similar to Niger National Flag

Computer graphics
Computer graphicsComputer graphics
Computer graphics
amitsarda3
 
Graphics software
Graphics softwareGraphics software
Graphics software
Mohd Arif
 

Similar to Niger National Flag (20)

Ghana National Flag
Ghana National FlagGhana National Flag
Ghana National Flag
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
Computer graphics practical(jainam)
Computer graphics practical(jainam)Computer graphics practical(jainam)
Computer graphics practical(jainam)
 
Lab Practices and Works Documentation / Report on Computer Graphics
Lab Practices and Works Documentation / Report on Computer GraphicsLab Practices and Works Documentation / Report on Computer Graphics
Lab Practices and Works Documentation / Report on Computer Graphics
 
Computer Graphics Project Report on Sinking Ship using OpenGL
Computer Graphics Project Report on Sinking Ship using OpenGL Computer Graphics Project Report on Sinking Ship using OpenGL
Computer Graphics Project Report on Sinking Ship using OpenGL
 
openGL basics for sample program (1).ppt
openGL basics for sample program (1).pptopenGL basics for sample program (1).ppt
openGL basics for sample program (1).ppt
 
openGL basics for sample program.ppt
openGL basics for sample program.pptopenGL basics for sample program.ppt
openGL basics for sample program.ppt
 
Graphics Programming in C
Graphics Programming in CGraphics Programming in C
Graphics Programming in C
 
OpenGL Introduction
OpenGL IntroductionOpenGL Introduction
OpenGL Introduction
 
Graphic Design Lab File.docx
Graphic Design Lab File.docxGraphic Design Lab File.docx
Graphic Design Lab File.docx
 
Number plate recognition system using matlab.
Number plate recognition system using matlab.Number plate recognition system using matlab.
Number plate recognition system using matlab.
 
Performance Anaysis for Imaging System
Performance Anaysis for Imaging SystemPerformance Anaysis for Imaging System
Performance Anaysis for Imaging System
 
05-Debug.pdf
05-Debug.pdf05-Debug.pdf
05-Debug.pdf
 
1 introduction computer graphics
1 introduction computer graphics1 introduction computer graphics
1 introduction computer graphics
 
Introduction to 2D/3D Graphics
Introduction to 2D/3D GraphicsIntroduction to 2D/3D Graphics
Introduction to 2D/3D Graphics
 
Final major presentation
Final major presentationFinal major presentation
Final major presentation
 
COSC 426 Lect. 3 -AR Developer Tools
COSC 426 Lect. 3 -AR Developer ToolsCOSC 426 Lect. 3 -AR Developer Tools
COSC 426 Lect. 3 -AR Developer Tools
 
Graphics software
Graphics softwareGraphics software
Graphics software
 
Pixel shaders
Pixel shadersPixel shaders
Pixel shaders
 
Deep Learning Edge
Deep Learning Edge Deep Learning Edge
Deep Learning Edge
 

More from SH Rajøn (7)

CD/DVD Drive Error Cause Detection and Solution
CD/DVD Drive Error Cause Detection and SolutionCD/DVD Drive Error Cause Detection and Solution
CD/DVD Drive Error Cause Detection and Solution
 
Movie Rating Site [for presentation]
Movie Rating Site [for presentation]Movie Rating Site [for presentation]
Movie Rating Site [for presentation]
 
Random Access Memory [for presentation]
Random Access Memory [for presentation]Random Access Memory [for presentation]
Random Access Memory [for presentation]
 
Airline Management System [for presentation]
Airline Management System [for presentation]Airline Management System [for presentation]
Airline Management System [for presentation]
 
Airline management system
Airline management systemAirline management system
Airline management system
 
Airline ticket reservation system
Airline ticket reservation systemAirline ticket reservation system
Airline ticket reservation system
 
Random Access Memory ( RAM)
Random Access Memory ( RAM)Random Access Memory ( RAM)
Random Access Memory ( RAM)
 

Recently uploaded

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Recently uploaded (20)

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 

Niger National Flag