I'm trying to create a 360 degree camera just like google street cameras (This is my whole code if you are interested)
I have a individual kind of perspective equation that map pixel [xold,yold] to [xnew,ynew] in accordance to Alpha and Beta angles as inputs.
To simplify that equation and my question, i assume i'm just trying to rotate an image. Now my question is how to rotate an image by using rotation equation on each pixel very fast on pygame or anyother intractive shell:
- xnew = xold * cos(alpha) - yold * sin(alpha)
- ynew = xold * sin(alpha) + yold * cos(alpha)
Assume pygame.transform.rotate() is not available