Rotation

Introduction

Given a buffered image, we’ll rotate each pixel P[x, y] such that even after rotation, rotated pixels will be on same line as they were before rotation i.e. lets take a set of pixels lying on straight line before rotation and after rotation you’ll notice those same pixels are on straight line, just position has changed.

Results

Clockwise Rotation

Angle of Rotation Image
image
-30° image
-60° image
-90° image
-120° image
-150° image
-180° image
-210° image
-240° image
-270° image
-300° image
-330° image
-360° image

AntiClockwise Rotation

Angle of Rotation Image
image
30° image
60° image
90° image
120° image
150° image
180° image
210° image
240° image
270° image
300° image
330° image
360° image

Thanking you :wink: