# basic rotation

Hi,
I have a problem .
I try to create a program thats make it posible to rotate a patern 16X16 in 16 steps.
but it don't work
can anybody create me a program in basic that made this posible????

I hope

Thank you ,

Rudi "Lord Zett" Westerhof

Rotation is tough. It's Pythagoras' fault
There is no automatic solution possible for a low-res low-color screen.
Best is to use a PC graphic editor (like PSP) and edit each step by hand.

For Project Banshee we rotated a 16x16 sprite in 32 steps in Deluxepaint (on amiga ^^ and then edited the results in AGE.

no I want it don in basic
Ineed it becours it for a game im develping.

Rotation is not something you will want to do in real-time.

However:

10 SCREEN 5 : CLS : DEFINT A-Z : DEFSNG R
20 FOR I = 0 TO 15 : LINE ( I , I ) - ( 15-I , 15-I ) , 15-I , B : NEXT I
30 FOR D = 0 TO 359 ' Rotate 360 degrees
40 RZ = D * (4 * ATN (-1) ) / 180 ' Convert degrees to radians
50 RS = SIN (RZ): RC = COS (RZ)
60 FOR Y = 0 TO 15 : FOR X = 0 TO 15
70 X1 = X * RC - Y * RS
80 Y1 = X * RS + Y * RC
90 PSET (50+X1,50+Y1) , POINT ( X , Y )
100 NEXT X,Y
110 NEXT D

Still, without manual anti-aliasing it looks like shite.

And anti-aliasing in Basic will slow it down even MORE.

I think a different sprite for every position would be a better option than doing it realtime...

K.

You definitly don't want realtime rotation on an msx.

Besides, a 16x16 tile, rotated 45 degrees requires a bigger area. so your base-sprite can't be full 16x16.

lets see..

16x16

rotated 45 degrees, using pytho....blah.. that guy..: 16*16 + 16*16 = 512

sqr(512) = 22.6 .. let's say 23

so your 45 degree requires a 23x23 tile ..

GuyveR800 i thank you.
I olmost gona love you!!!!

thank you,