As the title, I am required not to use any library. Here is so far what I have accomplished:
from math import acos, atan, pi, cos, sin def rotate(image, angle,