Ideally, to potentially be able to do full rotation of a pixel.
Yes, I have a matrix LED display in mind
I wouldn't care whether or not it is equally divided into 360 degrees.
I already have made routines that make it easy to draw to the screen.
I can do this in C on the Sony PSP like this
Where x-240, y-136 are coordinates for the centre of the screen,Code:xx = 240; yy = 30; x = xx - 240; y = yy - 136; theta = rotation; thetab = 360 - theta; thetab = (3.141592 / 180) * theta; xnew = cos(thetab)*x - sin(thetab)*y; ynew = sin(thetab)*x + cos(thetab)*y; xnew = xnew + 240; ynew = ynew + 136;
x-240,y-30 is the arbitrary point I want to rotate (the one given is a point directly above the centre of the screen),
rotation is the real angle 0-359 (0 can also be 360).
xnew and ynew are the new (rotated) coordinates.
I don't know if this works with microcontrollers even if you do use a C compiler.





Bookmarks