Currently browsing tag

Computer Graphics

Computer Graphics cg mini project illumination model free download

Computer Graphics (cg) mini project illumination model free download To download the project click here . This project is based on various algorithms used in computer graphics. Illumination is the key feature of the project. It draws two shapes namely diamond and cone. The two objects are rotated about various …

3D Rotation Algorithm about arbitrary axis with CC code

3D Rotation Algorithm about arbitrary axis with C/C++ code When an object is to be rotated about an axis that is not parallel to one of the coordinate axes, we need to perform some additional transformations. In this case, we also need rotations to align the axis with a selected …

CohenSutherland Line Clipping Algorithm with CC

Cohen-Sutherland Line Clipping Algorithm with C/C++ Theory In this method, every line endpoint is assigned a four digit binary code(region code) that identifies the location of the point relative to the boundary. b1 : left  b2 : right  b3 : below  b4 : above The value 1 indicates its relative …

LiangBarsky Line Clipping Algorithm with CC

Liang-Barsky Line Clipping Algorithm with C/C++ TheoryIn Liang-Barsky algorithm, we first write the point-clipping conditions in parametric form as  Each of these for inequalities can be expressed as , k = 1, 2, 3, …..where parameter p and q are defined as Any line that is parallel to one of …

3D Transformation Translation Rotation and Scaling in CC

3D Transformation [Translation, Rotation and Scaling] in C/C++ Translation In a three-dimensional homogeneous coordinates representation, a point is translated from position P = (x, y, z) to position P’ = (x’, y’, z’) with the following equations. x’ = x + tx y’ = y + ty z’ = z …

Drawing an Ellipse with Mid Point Ellipse Algorithm in CC

Drawing an Ellipse with Mid Point Ellipse Algorithm in C/C++ The theory for drawing Ellipse with Mid Point Algorithm is same as that of Circle drawing. But the difference is that the Ellipse is divided into two regions because it has two radii. The regions are separated from each other …

Drawing a Circle with Mid Point Circle Algorithm in CC

Drawing a Circle with Mid – Point Circle Algorithm in C/C++ As in the previous line drawing algorithm, we sample at unit intervals and determine the closest pixel position to the specified circle path at each step. For a given radius r and screen center position (xc, yc), we can …

Implementing Bresenhams Line Drawing Algorithm in CC

Implementing Bresenham’s Line Drawing Algorithm in C/C++ Bresenham’s Line Drawing Algorithm is an accurate and efficient raster line-generating algorithm developed by Bresenham. In this algorithm, we first consider the scan – conversion process for lines with positive slope less than 1. Pixel positions along a line path are then determined …

Drawing Straight Line using DDA Algorithm in CC

Drawing Straight Line using DDA Algorithm in C/C++ The digital differentia analyzer (DDA) is a scan-conversion line algorithm. In this algorithm, we sample the line at unit intervals in one coordinate and determine corresponding integer values nearest the line path of the other coordinate and plot those coordinate (pixel) in …