>Could anyone please tell me where I can find details of the mapping from
>floating-point coordinates to pixels set up by the SCALE command in
>SBasic ? I guess that it is strictly proportional on the y-axis and
>something like 3/4 on the x-axis but I would like to know the exact
>relationship.

I think the magic number you are looking for is 0.7372853

I can't remember how I originally worked this out - it was a long time ago 
now. I know I didn't PEEK the ROM - so it could be slighly out. The 
following program tests the relationship by drawing a diagonal line 
pixel-by-pixel.

100 Wsiz=200:REMark size of test window
110 OPEN#4;"scr_"&Wsiz&"x"&Wsiz&"a"&((512-Wsiz)/2)&"x"&((256-Wsiz)/2)
115 SCALE#4;Wsiz-1,0,0
120 PAPER#4;0:INK#4;7:CLS#4
140 :
150 sc=.7372853:REMark the magic number
160 FOR i=0 TO Wsiz-1
170  POINT#4;i*sc,i
180 END FOR i
190 CLOSE#4


_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Reply via email to