Artificial intelligent assistant

Rotating triangle by 1 degree I have a triangle with the coordinates (0, 20), (15, -10), (-15, -10). So the centre of the triangle is 0,0. I want to rotate this by one degree. Im using the formula: x' = cos(theta)*x - sin(theta)*y y' = sin(theta)*x + cos(theta)*y Yet when I work out the coordinate for angle rotation of 1, I get completely inexplicable coordinates: (-16.82941969615793, -3.3554222481086295), (16.51924443610106, 8.497441825246927), (0.31017526005686946, -5.142019577138298) Which when plotted out looks nothing like the original triangle being rotated by 1 degree. I've made a simple demo in javascript here. What could i be possibly doing wrong?

You rotate your triangle by $1 \text{rad}\approx 57.3^{\circ}$. To rotate it by $1^{\circ}$ set `theta=Math.Pi/180` or `theta=3.14/180`

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy ab2459097ab5b0a22865aef3357b270f