Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: "Chris Blackwell" Newsgroups: scea.yaroze.programming.3d_graphics Subject: A reply to one of Nick's questions. Date: 8 Sep 1997 12:01:01 GMT Organization: SCEA News Server Lines: 45 Message-ID: <01bcbc4f$8c5a55e0$0e9f22cf@SmarttNet.smartt.com> NNTP-Posting-Host: vict-mx0100101.smartt.com X-Newsreader: Microsoft Internet News 4.70.1155 Hey Nick! You know, one of the reasons people may not be replying to your messages is that your crazy Mac newsreader does something wierd so that when I try to reply to your messages, the reply text I type in comes out in symbol font. It's an extremely peculiar behavior. What newsreader are you using???? Anyway, here's an idea to solve your problem. You still could perform the formula listed below, but do it using fixed point series expansions. I don't know what kind of gain you'd get, but it's worth a look. You could use series expansions converted into fixed point, and then reduce the equations to come up with an expansion that will cover your formula. You formula would break down to z = sin(atan(x/y)) x = cos(atan(x/y)) ^ 2 y = sin(atan(x/y)) ^ 2 These could then be reduced using the the following expansions: sin(x) = x - 1/6x^3 + 1/120x^5 - 1/5040x^7 + 1/362880x^9 cos(x) = 1 - 1/2x^2 + 1/24x^4 - 1/720x^6 + 1/40320x^8 atan(x) = x - 1/3x^3 + 1/5x^5 - 1/7x^7 + 1/9 x^9 I leave it to you to plug these in and do the reductions. After doing the reductions you'll have an idea of how many multiply and divides this leads to. It may be rediculous, but hey, it's an idea. -Chris --- >theta = atan2(x, y); >x1 = cos(theta); >y1 = sin(theta); >rotate vector around z axis by theta degrees ChrisB Notes: Did you mean to use phi in the next calcs?? :-) If so, my formula's above will need to be adjusted. >phi = atan2(x, z); >z = sin(theta); >x = x1 * cos(theta); >y = y1 * sin(theta);