Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COMPUTER GRAPHICS OPENGL SHAPES PROJECT

OVERVIEW: This is a simple OpenGL (GLUT) C++ program that draws basic 2D shapes like squares, triangles, arrow heads, and coordinate axes using primitive OpenGL functions.

FEATURES:

Draws X and Y coordinate axes Draws two colored squares Draws an arrow head shape Draws two different colored triangles Uses basic OpenGL primitives like GL_LINES, GL_POLYGON, and GL_TRIANGLES

CODE STRUCTURE:

AxisXY(): Draws the X-axis and Y-axis using GL_LINES.

Square(): Draws a red square using GL_POLYGON.

Square2(): Draws a green square using GL_POLYGON.

ArraowHead(): Draws a green arrow head using GL_TRIANGLES.

Triangle1(): Draws a purple triangle using GL_TRIANGLES.

Triangle2(): Draws a yellow triangle using GL_TRIANGLES.

display(): Clears the screen and calls all shape functions to display them.

Graph Plot: image https://www.geogebra.org/

REQUIREMENTS:

Windows OS C++ IDE (Code::Blocks recommended) OpenGL (GLUT / FreeGLUT installed)

HOW TO RUN:

Compile the program using OpenGL libraries Run the executable file A window will open showing all the shapes

LEARNING PURPOSE: This project helps to learn:

Basics of OpenGL Drawing 2D shapes Understanding coordinate systems Using functions to organize graphics code

AUTHOR: student project using OpenGL (GLUT)

About

Small task from my computer graphics course

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages