Calculating coordinates to rotate

polar: radius r from the origin (0, 0) and angle ø between the x axis.
x: r cosø
y: r sinø
transform: rotating point (x, y) around the origin (0, 0) by angle ø.
x: x cosø - y sinø
y: x sinø + y cosø
「三角関数で座標を回転するふたつの計算方法」
http://f-site.org/articles/2011/09/22000000.html