A simple graphics algorithms written in C++ using the
graphics.h
library and compiled in CLion.
- Introduction
- Features
- Prerequisites
- How to Run
- Adding External Header and Library in CLion
- Credits
- License
This C++ graphics program is designed to illustrate fundamental drawing algorithms such as DDA line drawing, Bresenham line drawing, and circle drawing. The program creates a simple scene featuring a house and a sun.
- Implements DDA and Bresenham line drawing algorithms.
- Demonstrates circle drawing algorithms, including Midpoint and Bresenham.
- Draws a basic scene with a house and a sun.
Before running this program, ensure you have the following installed:
- CLion or any other C++ IDE.
- A compatible C++ compiler (e.g., MinGW) with support for the
graphics.h
library. - The
libbgi.a
library file. Note: Bothgraphics.h
andlibbgi.a
are included in the "Cpp-Graphics-Algorithms/Graphics"
- Clone or download this repository to your local machine.
- Open the project in CLion.
- Build and run the project.
To add the graphics.h
header in CLion, follow these steps:
- Copy
graphics.h
topath\to\CLion\bin\mingw\lib\gcc\x86_64-w64-mingw32\13.1.0\include
andpath\to\CLion\bin\mingw\lib\gcc\x86_64-w64-mingw32\13.1.0\include\c++
- Restart Clion.
To add the libbgi.a
library to your project in CLion, follow these steps:
- Copy
libbgi.a
topath\to\CLion\bin\mingw\lib\gcc\x86_64-w64-mingw32\13.1.0
- Open your
CMakeLists.txt
file. - Use the
target_link_libraries()
function to link the library to your executable target.Replacetarget_link_libraries(YourProjextName "\path\to\CLion\bin\mingw\lib\gcc\x86_64-w64-mingw32\13.1.0\include\libbgi.a")
YourProjextName
with the name of your Clion Project and\path\to\
with the actual path to the Clion. - Save the changes and reload the CMake project in CLion.
This program is created by o-Erebus.
This project is licensed under the MIT License.