Skip to content

jadwinder/Computer_Graphics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Computer Graphics Practicals

This repository contains a collection of Computer Graphics programs implemented in C . The programs demonstrate various graphical functions using the Graphics.h library in C.

📌 List of Practicals

  1. Display Text Styles – Print "Computer Graphics" using 5 different font styles.
  2. Line Styles – Draw lines with various styles.
  3. Basic Shapes – Draw fundamental shapes like lines, rectangles, triangles, squares, circles, ellipses, arcs, and polygons.
  4. Shapes Using linerel() – Implement basic shapes using the linerel() function.
  5. Filled Rectangles – Draw 3 rectangles with different fill styles using setfillstyle() and floodfill().
  6. Colorful Hut – Create a hut with different colors.
  7. Monument Drawing – Draw the Eiffel Tower or any other building.
  8. Smiley Face – Implement a smiley face using graphics functions.
  9. Bar Chart – Display a bar chart using graphical elements.
  10. Pie Chart – Draw a pie chart with different segments.
  11. Sine Wave – Draw a sine wave .
  12. Concentric Circle – Made a "Concentric Circle" with the help of different colors.

🛠 Technologies Used

  • Programming Language: C
  • Graphics Library: graphics.h
  • Compiler: Turbo C++ / Dev-C++ (configured for BGI graphics)

🚀 Getting Started

Prerequisites

To run these programs, ensure you have:

  • A C compiler that supports graphics.h (e.g., Turbo C++, Dev-C++, or CodeBlocks with WinBGIm).
  • The BGI graphics library properly set up in your compiler.

How to Run

  1. Clone the repository:
    git clone https://github.com/jadwinder/Computer_Graphics.git
    cd Computer_Graphics
    

Here are the screenshots of all the programs:

  1. WAP to print "Computer Graphics" using 5 font styles. [Hint: use settextstyle() and outtextxy() functions] image

  2. WAP to print lines with different styles. image

  3. WAP to draw basic shapes [Hint: line, rectangle, triangle, square, circle, ellipse, arc and polygon] image

  4. WAP to draw basic shapes using linerel() function [Hint: rectangle, triangle , square and polygon] image

  5. WAP to draw 3 rectangles with different fill styles. [Hint: use setfillstyle() and floodfill() functions. image

  6. WAP to draw a hut and fill color. image

  7. WAP to draw an Eiffel Tower. image

  8. WAP to draw a Smiley Face. image

  9. WAP to draw Bar Chart. image

  10. WAP to draw a Pie Chart. image

  11. WAP to draw a sine wave. image

  12. WAP to draw a concentric circle. image

About

A repository related to the different programs of Computer Graphics in C

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages