Board index » delphi » 2D rotation
T.W.
Delphi Developer |
Tue, 02 Apr 2002 03:00:00 GMT
2D rotation
I draw a square, then I rotate each of the 4 points with
x:= round(cos(0.5)*x- sin(0.5)*y); y:= round(sin(0.5)*x + cos(0.5)*y); (y, x are relative to the middle [0,0] of this rectangle ) After that I draw again, and the square is rotated The rotation formula is OK, on paper is no distortion. Thank you v.m. |