RE: LZ: Rotation...
[Prev][Next][Index][Thread]
RE: LZ: Rotation...
Thanx abunch. I think that's what I was looking for... however, what would new x and newy represent? Thanks to all of you for your help, but I still don't quite see how to store data and how to rotate in. BTW, I made the sprite 15x15 so that it has to lines of symmetry, and is not two bytes (it wa s 17x17, but that wasted like 16 bytes or something.....)
Who wrote rinitsys.85b? That is a great example of rotation. Is that person on this list? If so, how'd you do it? rinitsys is great w/ turbo!
Buddy Smith
ti85calc@bellsouth.net
----------
From: Jonathan L Anderson[SMTP:sarlok@juno.com]
Sent: Tuesday, June 17, 1997 10:45 AM
To: list-zshell@lists.ticalc.org
Subject: Re: LZ: Rotation...
On Sun, 15 Jun 1997, Buddy Smith wrote:
>
>
> Does anyone know how to rotate a sprite on the screen (w/out USGARD,
>in case you are wondering...) I need to turn a simple 15x15 sprite
>around sideways. I'm not really quite sure how to do sin/cos
>rotations (I have no idea how sin/cos even can do rotations) but if
>someone can help it will be greatly appreciated
>
> Buddy Smith
> ti85calc@bellsouth.net
I'm not sure how to do it in Z80 asm, but basic rotation is like this:
newx = x*cos(angle) - y*sin(angle)
newy = y*cos(angle) + x*sin(angle)
Keep in mind that this rotates counter-clockwise around the origin, so
you would probably want to make the origin be in the middle of the
sprite.
Jonathan Anderson
sarlok@juno.com
- Warning
- Could not process part with given Content-Type:
application/ms-tnef
Follow-Ups: