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
A Tech Enthusiast. Computer Engineer.