Skip to main content

Posts

Showing posts from March, 2017

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.



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