# Tag Archives: computer-graphics

## OpenGL program for simple Animation (Revolution) in C

OpenGL is a cross-language, cross-platform API for rendering 2D and 3D Vector Graphics. Using this, we can make a lot of design as well as… Read More »

## Mid-Point Circle Drawing Algorithm

The mid-point circle drawing algorithm is an algorithm used to determine the points needed for rasterizing a circle. We use the mid-point algorithm to calculate… Read More »

## OpenGL program for Simple Ball Game

Prerequisite – OpenGL OpenGL is a cross-language, cross-platform API for rendering 2D and 3D Vector Graphics. Using this, we can make a lot of design… Read More »

## Getting started with OpenGL

Open Graphics Library (OpenGL) is a cross-language (language inependent), cross-platform (platform independent) API for rendering 2D and 3D Vector Graphics(use of polygons to represent image).… Read More »

## Scan-line Polygon filling using OPENGL in C

Figures on a computer screen can be drawn using polygons. To fill those figures with color, we need to develop some algorithm.There are two famous… Read More »

## Anti-aliased Line | Xiaolin Wu’s algorithm

Anti-Aliased Line Drawing Below is the image showing line drawn with Bresenham’s line algorithm (left) and Xiaolin Wu’s line algorithm (right) which smooths the line.… Read More »

## 2D Transformation in Computer Graphics | Set 1 (Scaling of Objects)

A scaling transformation alters size of an object. In the scaling process, we either compress or expand the dimension of the object. Scaling operation can… Read More »

## How to add “graphics.h” C/C++ library to gcc compiler in Linux

While trying c graphic programming on Ubuntu, I figured out that graphic.h is not a standard C library and it is not supported by gcc… Read More »

## Draw a circle without floating point arithmetic

Given a radius of a circle, draw the circle without using floating point arithmetic. Following program uses a simple concept. Let the radius of the… Read More »

## Polygon Clipping | Sutherland–Hodgman Algorithm

A convex polygon and a convex clipping area are given. The task is to clip polygon edges using the Sutherland–Hodgman Algorithm. Input is in the… Read More »

## Point Clipping Algorithm in Computer Graphics

Clipping: In computer graphics our screen act as a 2-D coordinate system. it is not necessary that each and every point can be viewed on… Read More »

## Mid-Point Line Generation Algorithm

Given coordinate of two points A(x1, y1) and B(x2, y2) such that x1 < x2 and y1 < y2. The task to find all the… Read More »

## Bresenham’s Line Generation Algorithm

Given coordinate of two points A(x1, y1) and B(x2, y2). The task to find all the intermediate points required for drawing line AB on the… Read More »

## DDA Line generation Algorithm in Computer Graphics

In any 2-Dimensional plane if we connect two points (x0, y0) and (x1, y1), we get a line segment. But in the case of computer… Read More »

## Line Clipping | Set 1 (Cohen–Sutherland Algorithm)

Given a set of lines and a rectangular area of interest, the task is to remove lines which are outside the area of interest and… Read More »