Skip to main content

Posts

Showing posts with the label Coding

Bresenham's Line Algorithm (THICK LINE)

Bresenham's Line Algorithm (THICK LINE) Bresenham's Line Algorithm (THICK LINE) The Bresenham algorithm is an incremental scan conversion algorithm.

Bresenham's Line Algorithm (DASHED LINE)

Bresenham's Line Algorithm (DASHED LINE) The Bresenham algorithm is an incremental scan conversion algorithm.

Bresenham's Line Algorithm (DOTTED LINE)

Bresenham's Line Algorithm (DOTTED LINE) Bresenham's Line Algorithm (DOTTED LINE) Bresenham's Line Algorithm (DOTTED LINE) The Bresenham algorithm is an incremental scan conversion algorithm.

Bresenham's Line Algorithm (SOLID LINE)

Bresenham's Line Algorithm (SOLID LINE) The Bresenham algorithm is an incremental scan conversion algorithm.

Rotation about an Arbitrary Point

Rotation about an Arbitrary Point In this program we will perform Rotation about an Arbitrary Point i.e. the shape which we will rotate won't move to different position instead it will be at a fixed position on a point. Here, first we translate the shape to Origin. Then rotate it about the given angle and translate it back to it's original position i.e. the fixed point. Translation:  Translation is defined as moving the object from one position to another position along straight line path. Rotation:  A rotation repositions all points in an object along a circular path in the plane centered at the pivot point. We rotate an object by an angle theta. New coordinates after rotation depend on both x and y • x’ = xcosθ -y sinθ • y’ = xsinθ+ ycosθ Code: If you can't see the code, then Enable JavaScript in you browser Output: Note:   Just copy the files " CGA.bgi " & " EGAVGA.bgi " from  bgi  folder to  bin . So, i...

2D Transformation

2D Transformation The 2D transformations are: 1. Translation 2. Scaling 3. Rotation 4. Reflection 5. Shear

Bezier Curve

Bezier Curve In computer graphics, we often need to draw different types of objects onto the screen. Objects are not flat all the time and we need to draw curves many times to draw an object. A curve is an infinitely large set of points. Each point has two neighbors except endpoints.

Flood Fill Algorithm

Flood Fill Algorithm Flood Fill is a seed fill algorithm similar to Boundary Fill algorithm but sometimes when it is required to fill in an area that is not defined within a single color boundary we use flood fill instead of boundary fill.

Boundary Fill Algorithm

Boundary Fill Algorithm The boundary fill algorithm works as its name. This algorithm picks a seed point inside an object and starts to fill until it encounters the boundary of the object.

Midpoint Ellipse Algorithm

Midpoint Ellipse Algorithm                  Midpoint ellipse algorithm is a method for drawing ellipses in computer graphics. This method is modified from Bresenham’s algorithm so it is sometimes known as Bresenham's circle algorithm.

Square using Midpoint Circle Algorithm

Square using Midpoint Circle Algorithm Drawing a Square using Midpoint Circle Algorithm In computer graphics, the midpoint circle algorithm is an algorithm used to determine the points needed for rasterizing a circle.  Bresenham's circle algorithm is derived from the midpoint circle algorithm. This algorithm is used to draw square. But we can draw many shapes from it with little modifications in the formula.

Coloured Circle using Midpoint Circle Algorithm

Coloured Circle using Midpoint Circle Algorithm Drawing a Coloured Circle using Midpoint Circle Algorithm In computer graphics, the midpoint circle algorithm is an algorithm used to determine the points needed for rasterizing a circle.

Circle using Midpoint Circle Algorithm

Circle using Midpoint Circle Algorithm Drawing a Circle using Midpoint Circle Algorithm In computer graphics, the midpoint circle algorithm is an algorithm used to determine the points needed for rasterizing a circle. Bresenham's circle algorithm is derived from the midpoint circle algorithm.

DDA Line Drawing Algorithm

DDA Line Drawing Algorithm Hey f riends, this post is all about drawing a line using DDA Line Drawing Algorithm. Digital Differential Analyzer (DDA) algorithm is the simple line generation algorithm.



Bestseller's in Electronics only at Amazon Best Selling Products on Amazon