[A83] Re: Faster Multiplication


[Prev][Index][Thread]

[A83] Re: Faster Multiplication




Rotating in that manner is not feasible for 3D programs. Your rotation math
is not accurate enough and after a while the numbers will degenerate and
make the picture look funny. You have to store the X Y and Z rotation for
all objects and rotate them those amounts each frame. Which requires O(n^3)
multiplications as I mentioned earlier. For reference, see Matt Shepcar's
Torus demo for the 86.

-----Original Message-----
From: assembly-83-bounce@lists.ticalc.org
[mailto:assembly-83-bounce@lists.ticalc.org]On Behalf Of Gavin Olson
Sent: Thursday, May 31, 2001 4:15 PM
To: assembly-83@lists.ticalc.org
Subject: [A83] Re: Faster Multiplication

WIth a fast line routine and trig tables (not run-time calcing), you
canpull some decent wire-framing by these equations:

X Axis:

X'=Xcos(Tx)-Ysin(Tx)
Y'=Xsin(Tx)+Ycos(Tx)
Z'=Z

Y Axis:

X'=X
Y'=Ycos(Ty)-Zsin(Ty)
Z'=Ysin(Ty)+Zcos(Ty)

Z Axis:

X'=Zsin(Tz)+Xcos(Tz)
Y'=Y
Z'=Zcos(Tz)-Xsin(Tz)

So, for rotation about 1 axis, that's like 4 lookups, 4 mutiplications, and
2 add/subtracts.  Not a lot of math for 1 point, but a beastly amount for a
lot of points.  You could probably reduce the equations but bringing them
all together, and that couldg et some big speed gains with lotsof points.
Then all you need is fast, greyscale, fill, simply because flat fill in
black only is hard to see.





References: