Re: A92: About 3D.


[Prev][Next][Index][Thread]

Re: A92: About 3D.




In a message dated 11/25/98 5:02:22 PM Eastern Standard Time, kkirton@acex.com
writes:

> Floating point math would give you great precision, but the price would
>  be speed.  Instead, you could use scaled integers as coordinates.  That
>  is, all of your coordinates are multiplied by 1000 for example.  Then
>  you'd adjust your perspective to compensate for your scale:
>  
>  screen_x = (x/z)/1000
>  screen_y = (y/z)/1000
>  
>  The 68000 can easily handle integer division, and scaling like this gives
>  you precision to 1.0x10-3.  You can also scale sine and cosine tables in
>  the same fashion (really speeds up rotation).  Thus, you get the advantage
>  of high speed rendering plus a little added precision for accuracy.
>  
>  Have fun!
>  
>  Keith Kirton
>  kkirton@acex.com

it would probably be faster to use a scale of 65536 or some other power of 2

~Adamman