two questions
Scott Stone
sstone at turbolinux.com
Fri Jan 29 09:24:13 PST 1999
On Fri, 29 Jan 1999, Nathan Hurst wrote:
> On Wed, 27 Jan 1999, Paul Lowe wrote:
>
> > Anyone here know the fundamentals to sprite rotation. I don't have the
> > math skills, but don't know where to start. I am currently in Algebra 2.
>
> Do a web search on this! It is well documented. But basically, you use
> the fact that sin(x+y) = sin(x)cos(y) + cos(x)sin(y) (and similarly for
> cos) to form a rotation matrix:
>
> cos(a) sin(a)
> -sin(a) cos(a)
>
> which you then use to step through the source image while outputing the
> pixels rasterscan fashion to the dest. As the matrix takes the same time
> no matter what its form, you can scale, shear, rotate, reflect the image.
> Going from here it is only a small thought step to full blown n-d
> texturemapping on an m-surface :-)
he said Algebra 2 - in my high school, at least (bear with me, this was 6
years ago), you didn't learn any significant trigonometry until after
Algebra 2.... YMMV.
Dont' assume that it's simple. It's simple after you've had calculus and
a college-level class in matrices and vectors (that was a kick ass class,
btw).
--------------------------------------------------
Scott M. Stone <sstone at turbolinux.com>
Head of TurboLinux English / Systems Administrator
Pacific HiTech, Inc. (http://www.turbolinux.com)
More information about the SDL
mailing list