Quantcast
Channel: computer-graphics– GeeksforGeeks
Browsing all 114 articles
Browse latest View live

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 » The post OpenGL program for simple Animation...

View Article


Program to find line passing through 2 Points

Given two points P and Q in the coordinate plane, find the equation of the line passing through both the points. This kind of conversion… Read More » The post Program to find line passing through 2...

View Article


2D Transformation | Rotation of objects

We have to rotate an object by a given angle about a given pivot point and print the new co-ordinates. Examples: Input : {(100, 100),… Read More » The post 2D Transformation | Rotation of objects...

View Article

Bresenham’s circle drawing algorithm

It is not easy to display a continuous smooth arc on the computer screen as our computer screen is made of pixels organized in matrix… Read More » The post Bresenham’s circle drawing algorithm appeared...

View Article

Translation of objects in computer graphics

In computer graphics, we have seen how to draw some basic figures like line and circles. In this post we will discuss on basics of… Read More » The post Translation of objects in computer graphics...

View Article


Neighbors of a point on a circle using Bresenham’s algorithm

Given a center of a circle and its radius. our task is to find the neighbors of any point on the discrete circle. Examples: Input… Read More » The post Neighbors of a point on a circle using...

View Article

Snowflakes Fractal using Python

To create Snowflake fractals using Python programming What are fractals A fractal is a never-ending pattern. Fractals are infinitely complex patterns that are self-similar across… Read More » The post...

View Article

Koch Curve or Koch Snowflake

What is Koch Curve? The Koch snowflake (also known as the Koch curve, Koch star, or Koch island) is a mathematical curve and one of… Read More » The post Koch Curve or Koch Snowflake appeared first on...

View Article


Vector vs Raster Graphics

Before we begin with what vector graphics and raster graphics are, we must understand a few basic terms: Pixel : In Computer graphics a pixel,… Read More » The post Vector vs Raster Graphics appeared...

View Article


Rendering a Triangle using OpenGL(using Shaders)

In this article we’ll see how to render a triangle using OpenGL. A triangle is probably the simplest shapes you can draw in OpenGL after… Read More » The post Rendering a Triangle using OpenGL(using...

View Article

Cubic Bezier Curve Implementation in C

What is a bezier curve? So a Bezier curve is a mathematically defined curve used in two-dimensional graphic applications like abode illustrator,inkscape etc.The curve is… Read More » The post Cubic...

View Article

bar() function in C graphics

The header file graphics.h contains bar() function which is used to draw a 2-dimensional, rectangular filled in bar. Syntax : void bar(int left, int top,… Read More » The post bar() function in C...

View Article

Draw ellipse in C graphics

Program to draw ellipse in C using graphics.h header file. graphics.h library is used to include and facilitate graphical operations in program. C graphics using… Read More » The post Draw ellipse in C...

View Article


Draw a line in C++ graphics

graphics.h library is used to include and facilitate graphical operations in program. graphics.h functions can be used to draw different shapes, display text in different… Read More » The post Draw a...

View Article

Draw Rectangle in C graphics

rectangle() is used to draw a rectangle. Coordinates of left top and right bottom corner are required to draw the rectangle. left specifies the X-coordinate… Read More » The post Draw Rectangle in C...

View Article


Draw circle in C graphics

The header file graphics.h contains circle() function which draws a circle with center at (x, y) and given radius. Syntax : circle(x, y, radius); where,… Read More » The post Draw circle in C graphics...

View Article

pieslice() function in C

pieslice() draws and fills a pie slice with center at (x, y) and given radius r. The slice travels from s_angle to e_angle which are… Read More » The post pieslice() function in C appeared first on...

View Article


How to include graphics.h in CodeBlocks?

Compiling graphics codes on CodeBlocks IDE shows an error: “Cannot find graphics.h”. This is because graphics.h runs is not available in the library folder of… Read More » The post How to include...

View Article

outtextxy() function in C

The header file graphics.h contains outtextxy() function which displays the text or string at a specified point (x, y) on the screen. Syntax : void… Read More » The post outtextxy() function in C...

View Article

A-Buffer Method

Prerequisite : depth-buffer (or Z Buffer) method A-Buffer method in computer graphics is a general hidden face detection mechanism suited to medium scale virtual memory… Read More » The post A-Buffer...

View Article
Browsing all 114 articles
Browse latest View live