Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!star.cs.vu.nl!mmblom From: mmblom@cs.vu.nl (Marc Blom) Newsgroups: comp.sys.amiga.programmer Subject: Re: Fast 3d Graphics Keywords: fast 3d optimizing assembly cycles Message-ID: <9576@star.cs.vu.nl> Date: 6 Apr 91 18:33:53 GMT Article-I.D.: star.9576 References: <9529@star.cs.vu.nl> <1047@cbmger.UUCP> <20338@cbmvax.commodore.com> <1073@cbmger.UUCP> Sender: news@cs.vu.nl Lines: 55 Newsgroups: comp.sys.amiga.programmer Subject: Re: Fast 3d Graphics Summary: Expires: References: <20338@cbmvax.commodore.com> <9554@star.cs.vu.nl> <1073@cbmger.UUCP> Sender: Followup-To: Distribution: Organization: Fac. Wiskunde & Informatica, VU, Amsterdam Keywords: fast 3d optimizing assembly cycles In article <1073@cbmger.UUCP> peterk@cbmger.UUCP (Peter Kittel GERMANY) writes: >In article <9554@star.cs.vu.nl> mmblom@cs.vu.nl (Marc Blom) writes: >> >> >>I wish I knew how to use tables without taking too much memory: I'm using >>360 degrees around each angle, so to multiply a coordinate with a sin/cos >>(this is one table) value i would need 360 words PER coordinate, > >No, you can cut down this by a factor of 4 by making use of the identities >of sin and cos for offsets of n*90 degrees. This is common technique. > Yes, I know and i am using this, i just forgot it. >> I'm now >>using coordinates that range from -16K to + 16K. I don't even want to >>calculate this ! (22.5 meg !) Offcourse i could use less percision, for >>instance only rotating by an even number of degrees (0,2,4...,360) and >>don't use such a large a coordinate system, but i don't want to compromise >>between speed/presicion just yet ! > >Hmm, why is the size of the coordinate system important? >In first attempt I would only make a table of sin and cos values in some >arbitrary stepping. If you need high precision, then for only one quadrant >in small steps; else for the whole circle in bigger steps. In this system >you save the sin/cos evaluation, but you have still to multiply your >coordinates with these factors. > I think i misunderstood you, I am allready using tables for the sin/cos values, I thought you meant tables for the multiplies, then the coordinate system's size is very important, the larger your coordinate system, the larger the multable. >-- >Best regards, Dr. Peter Kittel // E-Mail to \\ Only my personal opinions... >Commodore Frankfurt, Germany \X/ {uunet|pyramid|rutgers}!cbmvax!cbmger!peterk -- Marc Blom, Vrije Universiteit Amsterdam, Email: mmblom@cs.vu.nl | short .sig